Adds do_surgery() behaviour for various items

Heath scanners, autopsy scanners, syringes, hyposprays, droppers and bottles.
This commit is contained in:
HarpyEagle
2016-06-17 19:06:56 +01:00
committed by Yoshax
parent fc063115df
commit 58b87f1a4b
7 changed files with 48 additions and 17 deletions
+10 -3
View File
@@ -24,8 +24,16 @@ REAGENT SCANNER
origin_tech = list(TECH_MAGNET = 1, TECH_BIO = 1)
var/mode = 1;
/obj/item/device/healthanalyzer/do_surgery(mob/living/M, mob/living/user)
if(user.a_intent != I_HELP) //in case it is ever used as a surgery tool
return ..()
scan_mob(M, user) //default surgery behaviour is just to scan as usual
return 1
/obj/item/device/healthanalyzer/attack(mob/living/M as mob, mob/living/user as mob)
/obj/item/device/healthanalyzer/attack(mob/living/M, mob/living/user)
scan_mob(M, user)
/obj/item/device/healthanalyzer/proc/scan_mob(mob/living/M, mob/living/user)
if ((CLUMSY in user.mutations) && prob(50))
user << text("<span class='warning'>You try to analyze the floor's vitals!</span>")
for(var/mob/O in viewers(M, null))
@@ -168,8 +176,7 @@ REAGENT SCANNER
else
user.show_message("<span class='notice'>Blood Level Normal: [blood_percent]% [blood_volume]cl. Type: [blood_type]</span>")
user.show_message("<span class='notice'>Subject's pulse: <font color='[H.pulse == PULSE_THREADY || H.pulse == PULSE_NONE ? "red" : "blue"]'>[H.get_pulse(GETPULSE_TOOL)] bpm.</font></span>")
src.add_fingerprint(user)
return
/obj/item/device/healthanalyzer/verb/toggle_mode()
set name = "Switch Verbosity"