Fixes a DNA scanner stacktrace runtime (#19567)

* fixes a DNA scanner runtime

* Earlier return

* Code comment
This commit is contained in:
GDN
2022-11-03 17:58:26 +00:00
committed by GitHub
parent 047727d575
commit 00e33dd91a
+10 -3
View File
@@ -253,9 +253,16 @@
return ..()
/obj/machinery/dna_scannernew/crowbar_act(mob/user, obj/item/I)
if(default_deconstruction_crowbar(user, I))
for(var/obj/thing in contents) // in case there is something in the scanner
thing.forceMove(loc)
if(!panel_open)
return
. = TRUE
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
return
if(flags & NODECONSTRUCT)//We need to check for this early or the contents could be moved before it checks for the flag normally
return
for(var/obj/thing in contents) // in case there is something in the scanner
thing.forceMove(loc)
default_deconstruction_crowbar(user, I)
/obj/machinery/dna_scannernew/screwdriver_act(mob/user, obj/item/I)
if(occupant)