mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-01-03 22:12:38 +00:00
Modular computers QDEL and refdrops (#17655)
* Atomization * sdfasdf --------- Co-authored-by: FluffyGhost <FluffyGhost>
This commit is contained in:
@@ -22,7 +22,10 @@
|
||||
if(parent_computer?.card_slot == src)
|
||||
parent_computer.card_slot = null
|
||||
if(stored_card)
|
||||
stored_card.forceMove(get_turf(parent_computer))
|
||||
stored_card.forceMove(get_turf(parent_computer)) //Why the hell are we not QDEL'ing the stored card if we're being destroyed? I don't know, but something might rely on it, hence...
|
||||
stored_card = null //the conservative approach is to just null the reference and hope for the best
|
||||
|
||||
QDEL_NULL(stored_item)
|
||||
parent_computer = null
|
||||
return ..()
|
||||
|
||||
@@ -49,4 +52,4 @@
|
||||
|
||||
if(parent_computer)
|
||||
parent_computer.verbs -= /obj/item/modular_computer/proc/eject_id
|
||||
parent_computer.name = parent_computer.initial_name
|
||||
parent_computer.name = parent_computer.initial_name
|
||||
|
||||
@@ -142,15 +142,21 @@
|
||||
return null
|
||||
if(!stored_files)
|
||||
return null
|
||||
|
||||
for(var/datum/computer_file/F in stored_files)
|
||||
|
||||
if(QDELETED(F))
|
||||
continue
|
||||
|
||||
if(F.filename == filename)
|
||||
return F
|
||||
|
||||
return null
|
||||
|
||||
/obj/item/computer_hardware/hard_drive/Destroy()
|
||||
if(parent_computer?.hard_drive == src)
|
||||
parent_computer.hard_drive = null
|
||||
stored_files = null
|
||||
QDEL_NULL_LIST(stored_files)
|
||||
return ..()
|
||||
|
||||
/obj/item/computer_hardware/hard_drive/Initialize(mapload)
|
||||
|
||||
Reference in New Issue
Block a user