Fix runtime in photosynthesis element Detach()

This commit is contained in:
Elizabeth Lavenza
2024-03-28 18:54:35 -04:00
parent 90378d4da9
commit 44a5f1fdd0
+7 -6
View File
@@ -39,12 +39,13 @@
attached_atoms[target]++
/datum/element/photosynthesis/Detach(datum/target)
attached_atoms[target]--
if(!attached_atoms[target])
attached_atoms -= target
if(!length(attached_atoms))
STOP_PROCESSING(SSobj, src)
attached_atoms = null
if(attached_atoms)
attached_atoms[target]--
if(!attached_atoms[target])
attached_atoms -= target
if(!length(attached_atoms))
STOP_PROCESSING(SSobj, src)
attached_atoms = null
return ..()
/datum/element/photosynthesis/process()