mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-27 22:17:32 +01:00
Fixes handle_fire for mobs. Especially xenos (#15134)
Co-authored-by: joep van der velden <15887760+farie82@users.noreply.github.com>
This commit is contained in:
co-authored by
joep van der velden
parent
7b160e30be
commit
2b51794d37
@@ -37,6 +37,6 @@
|
||||
|
||||
/mob/living/carbon/alien/handle_fire()//Aliens on fire code
|
||||
. = ..()
|
||||
if(.) //if the mob isn't on fire anymore
|
||||
if(!.) //if the mob isn't on fire anymore
|
||||
return
|
||||
adjust_bodytemperature(BODYTEMP_HEATING_MAX) //If you're on fire, you heat up!
|
||||
|
||||
@@ -407,19 +407,19 @@
|
||||
|
||||
///FIRE CODE
|
||||
/mob/living/carbon/human/handle_fire()
|
||||
if(..())
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
if(HEATRES in mutations)
|
||||
return
|
||||
if(on_fire)
|
||||
var/thermal_protection = get_thermal_protection()
|
||||
var/thermal_protection = get_thermal_protection()
|
||||
|
||||
if(thermal_protection >= FIRE_IMMUNITY_MAX_TEMP_PROTECT)
|
||||
return
|
||||
if(thermal_protection >= FIRE_SUIT_MAX_TEMP_PROTECT)
|
||||
bodytemperature += 11
|
||||
else
|
||||
bodytemperature += (BODYTEMP_HEATING_MAX + (fire_stacks * 12))
|
||||
if(thermal_protection >= FIRE_IMMUNITY_MAX_TEMP_PROTECT)
|
||||
return
|
||||
if(thermal_protection >= FIRE_SUIT_MAX_TEMP_PROTECT)
|
||||
bodytemperature += 11
|
||||
else
|
||||
bodytemperature += (BODYTEMP_HEATING_MAX + (fire_stacks * 12))
|
||||
|
||||
/mob/living/carbon/human/proc/get_thermal_protection()
|
||||
var/thermal_protection = 0 //Simple check to estimate how protected we are against multiple temperatures
|
||||
|
||||
@@ -179,6 +179,9 @@
|
||||
if(on_fire && fire_stacks <= 0)
|
||||
ExtinguishMob()
|
||||
|
||||
/**
|
||||
* Burns a mob and slowly puts the fires out. Returns TRUE if the mob is on fire
|
||||
*/
|
||||
/mob/living/proc/handle_fire()
|
||||
if(fire_stacks < 0) //If we've doused ourselves in water to avoid fire, dry off slowly
|
||||
fire_stacks = min(0, fire_stacks + 1)//So we dry ourselves back to default, nonflammable.
|
||||
|
||||
@@ -144,7 +144,8 @@
|
||||
|
||||
//Robots on fire
|
||||
/mob/living/silicon/robot/handle_fire()
|
||||
if(..())
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
if(fire_stacks > 0)
|
||||
fire_stacks--
|
||||
@@ -152,8 +153,6 @@
|
||||
else
|
||||
ExtinguishMob()
|
||||
|
||||
//adjustFireLoss(3)
|
||||
return
|
||||
|
||||
/mob/living/silicon/robot/update_fire()
|
||||
overlays -= image("icon"='icons/mob/OnFire.dmi', "icon_state"="Generic_mob_burning")
|
||||
|
||||
@@ -401,7 +401,7 @@
|
||||
|
||||
/mob/living/simple_animal/handle_fire()
|
||||
if(!can_be_on_fire)
|
||||
return TRUE
|
||||
return FALSE
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user