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
+5 -9
View File
@@ -162,19 +162,16 @@
if(istype(usr,/mob/living/carbon))
usr.put_in_hands(src)
/obj/item/weapon/autopsy_scanner/attack(mob/living/carbon/human/M as mob, mob/living/carbon/user as mob)
/obj/item/weapon/autopsy_scanner/do_surgery(mob/living/carbon/human/M, mob/living/user)
if(!istype(M))
return
if(!can_operate(M))
return
return 0
if(target_name != M.name)
target_name = M.name
src.wdata = list()
src.chemtraces = list()
src.timeofdeath = null
user << "<span class='notice'>A new patient has been registered.. Purging data for previous patient.</span>"
user << "<span class='notice'>A new patient has been registered. Purging data for previous patient.</span>"
src.timeofdeath = M.timeofdeath
@@ -183,10 +180,9 @@
usr << "<span class='warning'>You can't scan this body part.</span>"
return
if(!S.open)
usr << "<span class='warning'>You have to cut the limb open first!</span>"
usr << "<span class='warning'>You have to cut [S] open first!</span>"
return
for(var/mob/O in viewers(M))
O.show_message("<span class='notice'>\The [user] scans the wounds on [M.name]'s [S.name] with \the [src]</span>", 1)
M.visible_message("<span class='notice'>\The [user] scans the wounds on [M]'s [S.name] with [src]</span>")
src.add_data(S)