mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Updates fire_act() implementations to work better with lower temperature fires
In some cases fire_act() wasn't even checking the applied temperature. Reworks how fire damages flooring.
This commit is contained in:
@@ -259,7 +259,7 @@ Alien plants should do something if theres a lot of poison
|
|||||||
|
|
||||||
|
|
||||||
/obj/effect/alien/weeds/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
/obj/effect/alien/weeds/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||||
if(exposed_temperature > 300)
|
if(exposed_temperature > 300 + T0C)
|
||||||
health -= 5
|
health -= 5
|
||||||
healthcheck()
|
healthcheck()
|
||||||
|
|
||||||
@@ -430,7 +430,7 @@ Alien plants should do something if theres a lot of poison
|
|||||||
Burst()
|
Burst()
|
||||||
|
|
||||||
/obj/effect/alien/egg/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
/obj/effect/alien/egg/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||||
if(exposed_temperature > 500)
|
if(exposed_temperature > 500 + T0C)
|
||||||
health -= 5
|
health -= 5
|
||||||
healthcheck()
|
healthcheck()
|
||||||
|
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
qdel(src)
|
qdel(src)
|
||||||
|
|
||||||
/obj/effect/spider/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
/obj/effect/spider/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||||
if(exposed_temperature > 300)
|
if(exposed_temperature > 300 + T0C)
|
||||||
health -= 5
|
health -= 5
|
||||||
healthcheck()
|
healthcheck()
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
if(istype(A, /turf/simulated/floor))
|
if(istype(A, /turf/simulated/floor))
|
||||||
var/turf/simulated/floor/F = A
|
var/turf/simulated/floor/F = A
|
||||||
|
|
||||||
if(F.is_plasteel_floor()) // only tiled floors
|
if(F.is_steel_floor()) // only tiled floors
|
||||||
if(tile_dir_mode)
|
if(tile_dir_mode)
|
||||||
var/D = get_dir(usr, F)
|
var/D = get_dir(usr, F)
|
||||||
if(usr.loc == F)
|
if(usr.loc == F)
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
throwforce = 1.0
|
throwforce = 1.0
|
||||||
throw_speed = 5
|
throw_speed = 5
|
||||||
throw_range = 20
|
throw_range = 20
|
||||||
flags = CONDUCT
|
flags = 0
|
||||||
origin_tech = "biotech=1"
|
origin_tech = "biotech=1"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -41,7 +41,7 @@
|
|||||||
throwforce = 1.0
|
throwforce = 1.0
|
||||||
throw_speed = 5
|
throw_speed = 5
|
||||||
throw_range = 20
|
throw_range = 20
|
||||||
flags = CONDUCT
|
flags = 0
|
||||||
|
|
||||||
/obj/item/stack/tile/wood/cyborg
|
/obj/item/stack/tile/wood/cyborg
|
||||||
name = "wood floor tile synthesizer"
|
name = "wood floor tile synthesizer"
|
||||||
@@ -63,4 +63,4 @@
|
|||||||
throwforce = 1.0
|
throwforce = 1.0
|
||||||
throw_speed = 5
|
throw_speed = 5
|
||||||
throw_range = 20
|
throw_range = 20
|
||||||
flags = CONDUCT
|
flags = 0
|
||||||
|
|||||||
@@ -102,13 +102,23 @@ var/list/wood_icons = list("wood","wood-broken")
|
|||||||
return
|
return
|
||||||
|
|
||||||
/turf/simulated/floor/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
/turf/simulated/floor/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||||
|
|
||||||
|
var/temp_destroy = get_damage_temperature()
|
||||||
if(!burnt && prob(5))
|
if(!burnt && prob(5))
|
||||||
burn_tile()
|
burn_tile(exposed_temperature)
|
||||||
else if(prob(1) && !is_plating())
|
else if(temp_destroy && exposed_temperature >= (temp_destroy + 100) && prob(1) && !is_plating())
|
||||||
make_plating()
|
make_plating() //destroy the tile, exposing plating
|
||||||
burn_tile()
|
burn_tile(exposed_temperature)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
//should be a little bit lower than the temperature required to destroy the material
|
||||||
|
/turf/simulated/floor/proc/get_damage_temperature()
|
||||||
|
if(is_steel_floor()) return T0C+1400
|
||||||
|
if(is_wood_floor()) return T0C+200
|
||||||
|
if(is_carpet_floor()) return T0C+200
|
||||||
|
if(is_grass_floor()) return T0C+80
|
||||||
|
return null
|
||||||
|
|
||||||
/turf/simulated/floor/adjacent_fire_act(turf/simulated/floor/adj_turf, datum/gas_mixture/adj_air, adj_temp, adj_volume)
|
/turf/simulated/floor/adjacent_fire_act(turf/simulated/floor/adj_turf, datum/gas_mixture/adj_air, adj_temp, adj_volume)
|
||||||
var/dir_to = get_dir(src, adj_turf)
|
var/dir_to = get_dir(src, adj_turf)
|
||||||
|
|
||||||
@@ -296,28 +306,38 @@ turf/simulated/floor/proc/update_icon()
|
|||||||
src.icon_state = "sand[pick("1","2","3")]"
|
src.icon_state = "sand[pick("1","2","3")]"
|
||||||
broken = 1
|
broken = 1
|
||||||
|
|
||||||
/turf/simulated/floor/proc/burn_tile()
|
/turf/simulated/floor/proc/burn_tile(var/exposed_temperature)
|
||||||
if(istype(src,/turf/simulated/floor/engine)) return
|
if(istype(src,/turf/simulated/floor/engine)) return
|
||||||
if(istype(src,/turf/simulated/floor/plating/airless/asteroid)) return//Asteroid tiles don't burn
|
if(istype(src,/turf/simulated/floor/plating/airless/asteroid)) return//Asteroid tiles don't burn
|
||||||
if(broken || burnt) return
|
|
||||||
if(is_steel_floor())
|
var/damage_temp = get_damage_temperature()
|
||||||
src.icon_state = "damaged[pick(1,2,3,4,5)]"
|
|
||||||
burnt = 1
|
if(broken) return
|
||||||
else if(is_steel_floor())
|
if(burnt)
|
||||||
|
if(is_steel_floor() && exposed_temperature >= damage_temp) //allow upgrading from scorched tiles to damaged tiles
|
||||||
|
src.icon_state = "damaged[pick(1,2,3,4,5)]"
|
||||||
|
broken = 1
|
||||||
|
return
|
||||||
|
|
||||||
|
if(is_steel_floor() && exposed_temperature >= T0C+300) //enough to char the floor, but not hot enough to actually burn holes in it
|
||||||
src.icon_state = "floorscorched[pick(1,2)]"
|
src.icon_state = "floorscorched[pick(1,2)]"
|
||||||
burnt = 1
|
burnt = 1
|
||||||
else if(is_plating())
|
else if(exposed_temperature >= damage_temp)
|
||||||
src.icon_state = "panelscorched"
|
if(is_steel_floor())
|
||||||
burnt = 1
|
src.icon_state = "damaged[pick(1,2,3,4,5)]"
|
||||||
else if(is_wood_floor())
|
burnt = 1
|
||||||
src.icon_state = "wood-broken"
|
else if(is_plating())
|
||||||
burnt = 1
|
src.icon_state = "panelscorched"
|
||||||
else if(is_carpet_floor())
|
burnt = 1
|
||||||
src.icon_state = "carpet-broken"
|
else if(is_wood_floor())
|
||||||
burnt = 1
|
src.icon_state = "wood-broken"
|
||||||
else if(is_grass_floor())
|
burnt = 1
|
||||||
src.icon_state = "sand[pick("1","2","3")]"
|
else if(is_carpet_floor())
|
||||||
burnt = 1
|
src.icon_state = "carpet-broken"
|
||||||
|
burnt = 1
|
||||||
|
else if(is_grass_floor())
|
||||||
|
src.icon_state = "sand[pick("1","2","3")]"
|
||||||
|
burnt = 1
|
||||||
|
|
||||||
//This proc will set floor_type to null and the update_icon() proc will then change the icon_state of the turf
|
//This proc will set floor_type to null and the update_icon() proc will then change the icon_state of the turf
|
||||||
//This proc auto corrects the grass tiles' siding.
|
//This proc auto corrects the grass tiles' siding.
|
||||||
|
|||||||
@@ -381,7 +381,8 @@
|
|||||||
|
|
||||||
/mob/living/carbon/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
/mob/living/carbon/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||||
..()
|
..()
|
||||||
bodytemperature = max(bodytemperature, BODYTEMP_HEAT_DAMAGE_LIMIT+10)
|
var/temp_inc = max(BODYTEMP_HEATING_MAX*(1-get_heat_protection()), 0)
|
||||||
|
bodytemperature = min(bodytemperature + temp_inc, exposed_temperature)
|
||||||
|
|
||||||
/mob/living/carbon/can_use_hands()
|
/mob/living/carbon/can_use_hands()
|
||||||
if(handcuffed)
|
if(handcuffed)
|
||||||
|
|||||||
@@ -764,7 +764,7 @@
|
|||||||
|
|
||||||
return thermal_protection_flags
|
return thermal_protection_flags
|
||||||
|
|
||||||
proc/get_heat_protection(temperature) //Temperature is the temperature you're being exposed to.
|
get_heat_protection(temperature) //Temperature is the temperature you're being exposed to.
|
||||||
var/thermal_protection_flags = get_heat_protection_flags(temperature)
|
var/thermal_protection_flags = get_heat_protection_flags(temperature)
|
||||||
|
|
||||||
var/thermal_protection = 0.0
|
var/thermal_protection = 0.0
|
||||||
@@ -821,7 +821,7 @@
|
|||||||
|
|
||||||
return thermal_protection_flags
|
return thermal_protection_flags
|
||||||
|
|
||||||
proc/get_cold_protection(temperature)
|
get_cold_protection(temperature)
|
||||||
|
|
||||||
if(COLD_RESISTANCE in mutations)
|
if(COLD_RESISTANCE in mutations)
|
||||||
return 1 //Fully protected from the cold.
|
return 1 //Fully protected from the cold.
|
||||||
|
|||||||
@@ -239,6 +239,12 @@
|
|||||||
adjust_fire_stacks(2)
|
adjust_fire_stacks(2)
|
||||||
IgniteMob()
|
IgniteMob()
|
||||||
|
|
||||||
|
/mob/living/proc/get_cold_protection()
|
||||||
|
return 0
|
||||||
|
|
||||||
|
/mob/living/proc/get_heat_protection()
|
||||||
|
return 0
|
||||||
|
|
||||||
//Finds the effective temperature that the mob is burning at.
|
//Finds the effective temperature that the mob is burning at.
|
||||||
/mob/living/proc/fire_burn_temperature()
|
/mob/living/proc/fire_burn_temperature()
|
||||||
if (fire_stacks <= 0)
|
if (fire_stacks <= 0)
|
||||||
|
|||||||
@@ -165,7 +165,7 @@
|
|||||||
explosion(src.loc,1,2,4)
|
explosion(src.loc,1,2,4)
|
||||||
else if (reagents.total_volume > 100)
|
else if (reagents.total_volume > 100)
|
||||||
explosion(src.loc,0,1,3)
|
explosion(src.loc,0,1,3)
|
||||||
else
|
else if (reagents.total_volume > 50)
|
||||||
explosion(src.loc,-1,1,2)
|
explosion(src.loc,-1,1,2)
|
||||||
if(src)
|
if(src)
|
||||||
qdel(src)
|
qdel(src)
|
||||||
|
|||||||
Reference in New Issue
Block a user