From 337e49fdc37d72e37755d17eb1833858734be6d7 Mon Sep 17 00:00:00 2001 From: SinTwo Date: Thu, 5 May 2016 15:36:45 -0400 Subject: [PATCH] Fixes sleepers and advanced body scanners spitting out their parts. --- code/game/machinery/Sleeper.dm | 4 +++- code/game/machinery/adv_med.dm | 24 ++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm index fd972e757c..877dfa1065 100644 --- a/code/game/machinery/Sleeper.dm +++ b/code/game/machinery/Sleeper.dm @@ -288,7 +288,9 @@ occupant.loc = loc occupant = null for(var/atom/movable/A in src) // In case an object was dropped inside or something - if(A == beaker) + if(A == beaker || A == circuit) + continue + if(A in component_parts) continue A.loc = loc update_use_power(1) diff --git a/code/game/machinery/adv_med.dm b/code/game/machinery/adv_med.dm index 2c8ac0f598..90ff3f0d6b 100644 --- a/code/game/machinery/adv_med.dm +++ b/code/game/machinery/adv_med.dm @@ -73,6 +73,10 @@ src.icon_state = "body_scanner_1" for(var/obj/O in src) //O = null + if(O in component_parts) + continue + if(O == circuit) + continue qdel(O) //Foreach goto(124) src.add_fingerprint(usr) @@ -82,6 +86,10 @@ if ((!( src.occupant ) || src.locked)) return for(var/obj/O in src) + if(O in component_parts) + continue + if(O == circuit) + continue O.loc = src.loc //Foreach goto(30) if (src.occupant.client) @@ -118,6 +126,10 @@ update_use_power(2) src.icon_state = "body_scanner_1" for(var/obj/O in src) + if(O in component_parts) + continue + if(O == circuit) + continue O.loc = src.loc //Foreach goto(154) src.add_fingerprint(user) @@ -129,6 +141,10 @@ switch(severity) if(1.0) for(var/atom/movable/A as mob|obj in src) + if(A in component_parts) + continue + if(A == circuit) + continue A.loc = src.loc ex_act(severity) //Foreach goto(35) @@ -138,6 +154,10 @@ if(2.0) if (prob(50)) for(var/atom/movable/A as mob|obj in src) + if(A in component_parts) + continue + if(A == circuit) + continue A.loc = src.loc ex_act(severity) //Foreach goto(108) @@ -147,6 +167,10 @@ if(3.0) if (prob(25)) for(var/atom/movable/A as mob|obj in src) + if(A in component_parts) + continue + if(A == circuit) + continue A.loc = src.loc ex_act(severity) //Foreach goto(181)