mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 08:08:49 +01:00
Temperature projectiles respect insulation (#48912)
About The Pull Request Guns, Spells, and mobs that use temperature based projectiles got an update so that the projectile must deal with insulation when applying temperature changes. The more insulation you have the less body temperature change you will take. This does not change how much damage you take from a projectile. The projectiles have been updated from the temperature to be set as, to the amount of change they can do. The old security temp gun would always set the body temp to 100 kelvin, now each shot tries to reduce your body temp by -50 kelvin before insulation. The reverse is also true for temp projectiles that heat you up. This does mean that naked you will take more body temp loss, and in a hard suit you have almost no temp change. (hardsuits do protect you from space cold so this follows) edit: this does not touch cryo sting, that uses frost oil. Why It's Good For The Game Better handling of temperature shots. Insulation matters in combat. Cold blooded creatures are better off with good insulation. Changelog 🆑 balance: Temperature based projectiles respect insulation /🆑
This commit is contained in:
@@ -701,5 +701,5 @@
|
||||
damage_type = BURN
|
||||
nodamage = FALSE
|
||||
armour_penetration = 100
|
||||
temperature = 50
|
||||
temperature = -200 // Cools you down greatly per hit
|
||||
flag = "magic"
|
||||
|
||||
@@ -5,21 +5,36 @@
|
||||
damage_type = BURN
|
||||
nodamage = FALSE
|
||||
flag = "energy"
|
||||
var/temperature = 100
|
||||
var/temperature = -50 // reduce the body temperature by 50 points
|
||||
|
||||
/obj/projectile/temp/on_hit(atom/target, blocked = 0)
|
||||
. = ..()
|
||||
if(isliving(target))
|
||||
if(iscarbon(target))
|
||||
var/mob/living/carbon/hit_mob = target
|
||||
var/thermal_protection = 1 // The inverse of the amount of protection
|
||||
|
||||
if(temperature > 0) // The projectile is hot
|
||||
thermal_protection -= hit_mob.get_heat_protection(hit_mob.bodytemperature + temperature)
|
||||
else // The projectile was cold
|
||||
thermal_protection -= hit_mob.get_cold_protection(hit_mob.bodytemperature + temperature)
|
||||
|
||||
// The new body temperature is adjusted by 100-blocked % of 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(((100 - blocked) / 100) * (thermal_protection * temperature))
|
||||
|
||||
else if(isliving(target))
|
||||
var/mob/living/L = target
|
||||
L.adjust_bodytemperature(((100-blocked)/100)*(temperature - L.bodytemperature)) // the new body temperature is adjusted by 100-blocked % of the delta between body temperature and the bullet's effect temperature
|
||||
// the new body temperature is adjusted by 100-blocked % of the bullet's effect temperature
|
||||
L.adjust_bodytemperature(((100 - blocked) / 100) * temperature)
|
||||
|
||||
/obj/projectile/temp/hot
|
||||
name = "heat beam"
|
||||
temperature = 400
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user