Fixes Being On Fire

This commit is contained in:
Fox-McCloud
2015-02-26 04:56:46 -05:00
parent 5421754760
commit 164608a9ab
2 changed files with 22 additions and 18 deletions
+14 -2
View File
@@ -632,8 +632,20 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
handle_fire()
if(..())
return
var/thermal_protection = get_heat_protection(10000) //If you don't have fire suit level protection, you get a temperature increase
if((1 - thermal_protection) > 0.0001)
var/thermal_protection = 0 //Simple check to estimate how protected we are against multiple temperatures
if(wear_suit)
if(wear_suit.max_heat_protection_temperature >= FIRESUIT_MAX_HEAT_PROTECTION_TEMPERATURE)
thermal_protection += (wear_suit.max_heat_protection_temperature*0.7)
if(head)
if(head.max_heat_protection_temperature >= FIRE_HELMET_MAX_HEAT_PROTECTION_TEMPERATURE)
thermal_protection += (head.max_heat_protection_temperature*THERMAL_PROTECTION_HEAD)
thermal_protection = round(thermal_protection)
if(thermal_protection >= FIRE_IMMUNITY_SUIT_MAX_TEMP_PROTECT)
return
if(thermal_protection >= FIRESUIT_MAX_HEAT_PROTECTION_TEMPERATURE)
bodytemperature += 11
return
else
bodytemperature += BODYTEMP_HEATING_MAX
return
//END FIRE CODE
+8 -16
View File
@@ -223,19 +223,21 @@
/mob/living/proc/IgniteMob()
if(fire_stacks > 0)
on_fire = 1
src.AddLuminosity(3)
update_fire()
/mob/living/proc/ExtinguishMob()
if(on_fire)
on_fire = 0
fire_stacks = 0
src.AddLuminosity(-3)
update_fire()
/mob/living/proc/update_fire()
return
/mob/living/proc/adjust_fire_stacks(add_fire_stacks) //Adjusting the amount of fire_stacks we have on person
fire_stacks = Clamp(fire_stacks + add_fire_stacks, min = -20, max = 20)
fire_stacks = Clamp(fire_stacks + add_fire_stacks, min = -20, max = 20)
/mob/living/proc/handle_fire()
if(fire_stacks < 0)
@@ -243,25 +245,15 @@
fire_stacks = min(0, fire_stacks)//So we dry ourselves back to default, nonflammable.
if(!on_fire)
return 1
var/oxy=0
var/turf/T=loc
if(istype(T))
if(istype(T,/turf/space))
ExtinguishMob() //If there's no oxygen in the tile we're on, put out the fire
return 1
var/datum/gas_mixture/G = loc.return_air() // Check if we're standing in an oxygenless environment
if(G)
oxy=G.oxygen
if(oxy < 10 || fire_stacks <= 0)
var/datum/gas_mixture/G = loc.return_air() // Check if we're standing in an oxygenless environment
if(G.oxygen < 1)
ExtinguishMob() //If there's no oxygen in the tile we're on, put out the fire
return 1
return
var/turf/location = get_turf(src)
location.hotspot_expose(700, 50, 1)
/mob/living/fire_act()
adjust_fire_stacks(5)
if(fire_stacks > 9 && !on_fire)
IgniteMob()
adjust_fire_stacks(0.5)
IgniteMob()
//Mobs on Fire end