Skip to content

Commit

Permalink
Temperature Guns Fun (#5582)
Browse files Browse the repository at this point in the history
## About The Pull Request


## Why It's Good For The Game
We have both the thermal guns and the temperature guns already in the
game.
In their current state neither of them are ever used as the math behind
the scenes are way outdated.
This will bring them up to speed and make them actually useful now.

## Changelog
Alters how the temperature calculations are done for the temperature
guns to ensure that they'll actually change the temperature of their
targets in a meaningful way.
This makes them useable in combination with the thermal guns.

:cl:
balance: Completely rebalanced the temperature guns.
add: New firemode on the temperature guns
/:cl:
  • Loading branch information
MissClassyPineapple authored Feb 25, 2025
1 parent 255e9c4 commit de4fe74
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
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

0 comments on commit de4fe74

Please sign in to comment.