From 413dd153dc2ab332b44dd894aa1ee83afb7bba8c Mon Sep 17 00:00:00 2001 From: "sieve32@gmail.com" Date: Sat, 18 Aug 2012 00:56:55 +0000 Subject: [PATCH] Changes to the Mecha Syringe Gun a bit so it actually makes sense. -Syringes can now only be loaded from tiles that are adjacent/diagonal to you, and taking windows/doors into account -As a tradeoff, you can now load syringes from storage items by clicking them -Range to analyze reagents reduced to 3 tiles, but doesn't factor obstacles -Mobs can no longer be scanned for reagents, because it didn't make much sense at all, and for balance Fixes issue 520 git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4483 316c924e-a436-60f5-8080-3fe189b3f50e --- .../mecha/equipment/tools/medical_tools.dm | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/code/game/mecha/equipment/tools/medical_tools.dm b/code/game/mecha/equipment/tools/medical_tools.dm index 2fdb53edc94..ac83b11c075 100644 --- a/code/game/mecha/equipment/tools/medical_tools.dm +++ b/code/game/mecha/equipment/tools/medical_tools.dm @@ -441,6 +441,10 @@ return if(istype(target,/obj/item/weapon/reagent_containers/syringe)) return load_syringe(target) + if(istype(target,/obj/item/weapon/storage))//Loads syringes from boxes + for(var/obj/item/weapon/reagent_containers/syringe/S in target.contents) + load_syringe(S) + return if(mode) return analyze_reagents(target) if(!syringes.len) @@ -591,6 +595,17 @@ proc/load_syringe(obj/item/weapon/reagent_containers/syringe/S) if(syringes.len= 2) + occupant_message("The syringe is too far away.") + return 0 + for(var/obj/structure/D in S.loc)//Basic level check for structures in the way (Like grilles and windows) + if(!(D.CanPass(S,src.loc))) + occupant_message("Unable to load syringe.") + return 0 + for(var/obj/machinery/door/D in S.loc)//Checks for doors + if(!(D.CanPass(S,src.loc))) + occupant_message("Unable to load syringe.") + return 0 S.reagents.trans_to(src, S.reagents.total_volume) S.forceMove(src) syringes += S @@ -601,7 +616,10 @@ return 0 proc/analyze_reagents(atom/A) - if(!A.reagents) + if(get_dist(src,A) >= 4) + occupant_message("The object is too far away.") + return 0 + if(!A.reagents || istype(A,/mob)) occupant_message("No reagent info gained from [A].") return 0 occupant_message("Analyzing reagents...")