bunch of misc fixes (#17031)

* bunch of misc fixes

* .

* more refs also new ref tracking from chomp

* oups

* eh
This commit is contained in:
Kashargul
2025-02-05 13:53:53 -05:00
committed by GitHub
parent 59a6e06ab5
commit af85f098cd
14 changed files with 243 additions and 15 deletions
+2 -2
View File
@@ -105,7 +105,7 @@ SUBSYSTEM_DEF(machines)
while(current_run.len)
var/datum/pipe_network/PN = current_run[current_run.len]
current_run.len--
if(!PN)
if(!PN || QDELETED(PN))
networks.Remove(PN)
DISABLE_BITFIELD(PN?.datum_flags, DF_ISPROCESSING)
else
@@ -122,7 +122,7 @@ SUBSYSTEM_DEF(machines)
while(current_run.len)
var/obj/machinery/M = current_run[current_run.len]
current_run.len--
if(!M || (M.process(wait) == PROCESS_KILL))
if(!istype(M) || QDELETED(M) || (M.process(wait) == PROCESS_KILL))
processing_machines.Remove(M)
DISABLE_BITFIELD(M?.datum_flags, DF_ISPROCESSING)
if(MC_TICK_CHECK)
+2 -1
View File
@@ -139,7 +139,8 @@ SUBSYSTEM_DEF(plants)
return
/datum/controller/subsystem/plants/proc/add_plant(var/obj/effect/plant/plant)
processing |= plant
if(!QDELETED(plant))
processing |= plant
/datum/controller/subsystem/plants/proc/remove_plant(var/obj/effect/plant/plant)
processing -= plant