mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-06 06:52:39 +00:00
* Rename freon_gas_act to freeze_turf (#61958) This was only used from two places, neither of which involved freon. * Rename freon_gas_act to freeze_turf Co-authored-by: esainane <esainane+github@gmail.com>
40 lines
1.2 KiB
Plaintext
40 lines
1.2 KiB
Plaintext
/obj/projectile/temp
|
|
name = "freeze beam"
|
|
icon_state = "ice_2"
|
|
damage = 0
|
|
damage_type = BURN
|
|
nodamage = FALSE
|
|
flag = ENERGY
|
|
var/temperature = -50 // reduce the body temperature by 50 points
|
|
|
|
/obj/projectile/temp/on_hit(atom/target, blocked = 0)
|
|
. = ..()
|
|
if(iscarbon(target))
|
|
var/mob/living/carbon/hit_mob = target
|
|
var/thermal_protection = 1 - hit_mob.get_insulation_protection(hit_mob.bodytemperature + temperature)
|
|
|
|
// The new body temperature is adjusted by the bullet's effect temperature
|
|
// Reduce the amount of the effect temperature change based on the amount of insulation the mob is wearing
|
|
hit_mob.adjust_bodytemperature((thermal_protection * temperature) + temperature)
|
|
|
|
else if(isliving(target))
|
|
var/mob/living/L = target
|
|
// the new body temperature is adjusted by the bullet's effect temperature
|
|
L.adjust_bodytemperature((1 - blocked) * temperature)
|
|
|
|
/obj/projectile/temp/hot
|
|
name = "heat beam"
|
|
temperature = 100 // Raise the body temp by 100 points
|
|
|
|
/obj/projectile/temp/cryo
|
|
name = "cryo beam"
|
|
range = 3
|
|
temperature = -240 // Single slow shot reduces temp greatly
|
|
|
|
/obj/projectile/temp/cryo/on_range()
|
|
var/turf/T = get_turf(src)
|
|
if(isopenturf(T))
|
|
var/turf/open/O = T
|
|
O.freeze_turf()
|
|
return ..()
|