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
This commit is contained in:
sieve32@gmail.com
2012-08-18 00:56:55 +00:00
parent ca02f37a6e
commit 413dd153dc

View File

@@ -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<max_syringes)
if(get_dist(src,S) >= 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("<span class=\"alert\">No reagent info gained from [A].</span>")
return 0
occupant_message("Analyzing reagents...")