grug wallmelting attempt

This commit is contained in:
DGamerL
2023-05-07 12:26:29 +02:00
parent 3e87e03619
commit e626504990
3 changed files with 16 additions and 6 deletions
+1 -2
View File
@@ -12,8 +12,7 @@
opacity = FALSE
density = FALSE
max_integrity = 300
resistance_flags = FIRE_PROOF
heat_proof = TRUE
var/max_temperature = 1000
glass = TRUE
explosion_block = 1
safe = FALSE
+1 -1
View File
@@ -11,7 +11,7 @@
smoothing_flags = SMOOTH_BITMASK
smoothing_groups = list(SMOOTH_GROUP_SIMULATED_TURFS, SMOOTH_GROUP_WALLS, SMOOTH_GROUP_REGULAR_WALLS)
canSmoothWith = list(SMOOTH_GROUP_WALLS, SMOOTH_GROUP_REGULAR_WALLS, SMOOTH_GROUP_REINFORCED_WALLS)
var/max_temperature = 1000
var/rotting = FALSE
var/damage = 0
@@ -133,9 +133,15 @@
//Possible spread due to radiated heat
if(location.air.temperature > FIRE_MINIMUM_TEMPERATURE_TO_SPREAD)
var/radiated_temperature = location.air.temperature*FIRE_SPREAD_RADIOSITY_SCALE
for(var/turf/simulated/T in location.atmos_adjacent_turfs)
if(!T.active_hotspot)
T.hotspot_expose(radiated_temperature, CELL_VOLUME / 4)
for(var/direction in GLOB.cardinal)
if(!(location.atmos_adjacent_turfs & direction))
var/turf/simulated/wall/W = get_step(src, direction)
if(istype(W))
W.adjacent_fire_act(W, radiated_temperature)
continue
var/turf/simulated/T = get_step(src, direction)
if(istype(T) && !T.active_hotspot)
T.hotspot_expose(radiated_temperature, CELL_VOLUME/4)
else
if(volume > CELL_VOLUME*0.4)
@@ -153,6 +159,11 @@
return 0*/
return 1
/turf/simulated/wall/proc/adjacent_fire_act(turf/simulated/wall, radiated_temperature)
if(radiated_temperature > max_temperature)
take_damage(rand(10, 20) * (radiated_temperature / max_temperature))
// Garbage collect itself by nulling reference to it
/obj/effect/hotspot/Destroy()