Fixes some stupid behavior in computer hardware code. (#61350)

This commit is contained in:
LemonInTheDark
2021-09-13 18:30:28 -07:00
committed by GitHub
parent 2635258d0a
commit a3dfa16a98
9 changed files with 76 additions and 74 deletions
@@ -52,7 +52,6 @@
var/comp_light_luminosity = 3 //The brightness of that light
var/comp_light_color //The color of that light
/obj/item/modular_computer/Initialize()
. = ..()
START_PROCESSING(SSobj, src)
@@ -67,13 +66,10 @@
/obj/item/modular_computer/Destroy()
kill_program(forced = TRUE)
STOP_PROCESSING(SSobj, src)
for(var/H in all_components)
var/obj/item/computer_hardware/CH = all_components[H]
if(CH.holder == src)
CH.on_remove(src)
CH.holder = null
all_components.Remove(CH.device_type)
qdel(CH)
for(var/port in all_components)
var/obj/item/computer_hardware/component = all_components[port]
qdel(component)
all_components.Cut() //Die demon die
//Some components will actually try and interact with this, so let's do it later
QDEL_NULL(soundloop)
physical = null