Files
Bubberstation/code/modules/projectiles/projectile/special/temperature.dm
NightRed fb51b24d21 Humans have more complicated body temperatures (#54550)
This changes how carbon/humans stabilize body temperature, and changes how damage and wounds are applied based on temperature.

Humans now have a core body temperature along with body temperature. The core temperature is used for natural stabilization and what viruses like fever and shivers target by raising or lowing the core temperature of the mob.
The standard body temperature still exists and acts exactly the same for most items at this time but is now treated as surface temperature in humans.

Damage from body temperature for humans is now based on the core temperature instead of body temperature now.
Humans will now receive burn wounds when the body (surface) temperature is to high for to long.

This causes you to see alerts for the area temperature before you take damage in most cases improving visibility of dangerous situations.
2020-11-24 22:37:36 -08:00

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.freon_gas_act()
return ..()