Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thermal guns fun #5582

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions code/modules/projectiles/ammunition/energy/special.dm
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,18 @@

/obj/item/ammo_casing/energy/temp
projectile_type = /obj/projectile/temp
select_name = "freeze"
select_name = "chill"
e_cost = 250
fire_sound = 'sound/weapons/pulse3.ogg'

/obj/item/ammo_casing/energy/temp/hot
projectile_type = /obj/projectile/temp/hot
select_name = "bake"
select_name = "heat"

/obj/item/ammo_casing/energy/temp/cryo
projectile_type = /obj/projectile/temp/cryo
select_name = "freeze"
e_cost = 500

/obj/item/ammo_casing/energy/meteor
projectile_type = /obj/projectile/meteor
Expand Down
6 changes: 2 additions & 4 deletions code/modules/projectiles/guns/energy/special.dm
Original file line number Diff line number Diff line change
Expand Up @@ -331,19 +331,17 @@
icon_state = "freezegun"
desc = "A gun that changes temperatures. Comes with a collapsible stock."
w_class = WEIGHT_CLASS_NORMAL
ammo_type = list(/obj/item/ammo_casing/energy/temp, /obj/item/ammo_casing/energy/temp/hot)
ammo_type = list(/obj/item/ammo_casing/energy/temp, /obj/item/ammo_casing/energy/temp/hot, /obj/item/ammo_casing/energy/temp/cryo)
cell_type = /obj/item/stock_parts/cell/high
pin = null
pin = /obj/item/firing_pin

/obj/item/gun/energy/temperature/security
name = "security temperature gun"
desc = "A weapon that can only be used to its full potential by the truly robust."
pin = /obj/item/firing_pin

/obj/item/gun/energy/temperature/freeze
name = "cryogenic temperature gun"
desc = "A gun that reduces temperatures. Only for those with ice in their veins."
pin = /obj/item/firing_pin
ammo_type = list(/obj/item/ammo_casing/energy/temp)

/obj/item/gun/energy/gravity_gun
Expand Down
11 changes: 6 additions & 5 deletions code/modules/projectiles/projectile/special/temperature.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
damage_type = BURN
armor_flag = ENERGY
/// What temp to trend the target towards
var/temperature = HYPOTHERMIA - 2 CELCIUS
var/temperature = HYPOTHERMIA - 50 CELCIUS
/// How much temp per shot to apply
var/temperature_mod_per_shot = 0.25
var/temperature_mod_per_shot = 0.5

/obj/projectile/temp/is_hostile_projectile()
return BODYTEMP_NORMAL - temperature != 0 // our damage is done by cooling or heating (casting to boolean here)
Expand All @@ -16,16 +16,17 @@
. = ..()
if(isliving(target))
var/mob/living/M = target
M.adjust_bodytemperature(temperature_mod_per_shot * ((100-blocked) / 100) * (temperature - M.bodytemperature), use_insulation = TRUE)
M.adjust_bodytemperature(temperature_mod_per_shot * ((100-blocked) / 100) * (temperature - M.bodytemperature), temperature, BODYTEMP_NORMAL, use_insulation = TRUE)

/obj/projectile/temp/hot
name = "heat beam"
temperature = CELCIUS_TO_KELVIN(50 CELCIUS) // Raise the body temp by 100 points
temperature = HYPERTHERMIA + 25 CELCIUS

/obj/projectile/temp/cryo
name = "cryo beam"
range = 3
temperature_mod_per_shot = 1.5 // get this guy really chilly really fast
temperature = HYPOTHERMIA - 75 CELCIUS
temperature_mod_per_shot = 2.5 // get this guy really chilly really fast

/obj/projectile/temp/cryo/on_hit(atom/target, blocked, pierce_hit)
. = ..()
Expand Down
Loading