diff --git a/code/controllers/Processes/machinery.dm b/code/controllers/Processes/machinery.dm index c796afa1f98..b84dfaf9435 100644 --- a/code/controllers/Processes/machinery.dm +++ b/code/controllers/Processes/machinery.dm @@ -59,4 +59,4 @@ /datum/controller/process/machinery/getStatName() - return ..()+"([machines.len])" \ No newline at end of file + return ..()+"([machines.len])" diff --git a/code/controllers/Processes/turf.dm b/code/controllers/Processes/turf.dm index c1efac52f97..c93325012c5 100644 --- a/code/controllers/Processes/turf.dm +++ b/code/controllers/Processes/turf.dm @@ -1,9 +1,14 @@ -var/global/list/processing_turfs = list() +var/global/list/turf/processing_turfs = list() /datum/controller/process/turf/setup() name = "turf" - schedule_interval = 20 // every 2 seconds + schedule_interval = 30 // every 3 seconds /datum/controller/process/turf/doWork() - for(var/turf/unsimulated/wall/supermatter/SM in processing_turfs) - SM.process() + for(var/turf/T in processing_turfs) + if(T.process() == PROCESS_KILL) + processing_turfs.Remove(T) + scheck() + +/datum/controller/process/turf/getStatName() + return ..()+"([processing_turfs.len])" diff --git a/code/game/gamemodes/endgame/supermatter_cascade/blob.dm b/code/game/gamemodes/endgame/supermatter_cascade/blob.dm index d71ff249d10..dc315ac5100 100644 --- a/code/game/gamemodes/endgame/supermatter_cascade/blob.dm +++ b/code/game/gamemodes/endgame/supermatter_cascade/blob.dm @@ -23,7 +23,7 @@ processing_turfs.Remove(src) ..() -/turf/unsimulated/wall/supermatter/proc/process() +/turf/unsimulated/wall/supermatter/process() // Only check infrequently. if(next_check>world.time) return diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm index 72df25cfbed..4d14bdac045 100644 --- a/code/game/turfs/simulated/walls.dm +++ b/code/game/turfs/simulated/walls.dm @@ -15,7 +15,6 @@ var/list/global/wall_cache = list() var/damage_overlay var/global/damage_overlays[8] var/active - var/last_event var/can_open = 0 var/material/material var/material/reinf_material @@ -33,10 +32,13 @@ var/list/global/wall_cache = list() if(!isnull(rmaterialtype)) reinf_material = name_to_material[rmaterialtype] update_material() + processing_turfs |= src + +/turf/simulated/wall/process() + // Calling parent will kill processing + radiate() /turf/simulated/wall/bullet_act(var/obj/item/projectile/Proj) - - radiate() if(istype(Proj,/obj/item/projectile/beam)) ignite(2500) else if(istype(Proj,/obj/item/projectile/ion)) @@ -236,20 +238,11 @@ var/list/global/wall_cache = list() return 0 /turf/simulated/wall/proc/radiate() - var/material/M = name_to_material[material] - if(!istype(M) || !M.radioactivity) + if(!material.radioactivity) return - if(!active) - if(world.time > last_event+15) - active = 1 - for(var/mob/living/L in range(3,src)) - L.apply_effect(M.radioactivity,IRRADIATE,0) - for(var/turf/simulated/wall/T in range(3,src)) - T.radiate() - last_event = world.time - active = null - return + for(var/mob/living/L in range(3,src)) + L.apply_effect(material.radioactivity,IRRADIATE,0) return /turf/simulated/wall/proc/burn(temperature) @@ -266,19 +259,14 @@ var/list/global/wall_cache = list() D.ignite(temperature/4) /turf/simulated/wall/proc/ignite(var/exposed_temperature) - - var/material/M = name_to_material[material] - if(!istype(M) || !isnull(M.ignition_point)) + if(isnull(material.ignition_point)) return - if(exposed_temperature > M.ignition_point)//If the temperature of the object is over 300, then ignite + if(exposed_temperature > material.ignition_point)//If the temperature of the object is over 300, then ignite burn(exposed_temperature) return ..() -/turf/simulated/wall/Bumped(AM as mob|obj) - radiate() - ..() - /turf/simulated/wall/Destroy() + processing_turfs -= src dismantle_wall(null,null,1) - ..() \ No newline at end of file + ..() diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index 7af228b49c5..e5ae4e1bb9a 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -378,3 +378,6 @@ if(!LinkBlocked(src, t) && !TurfBlockedNonWindow(t)) L.Add(t) return L + +/turf/proc/process() + return PROCESS_KILL