remove extra var, floor surgery, add med gripper

This commit is contained in:
datlo
2019-01-26 02:47:38 +00:00
parent 33112e32e3
commit 9f4e602881
3 changed files with 27 additions and 9 deletions
@@ -38,16 +38,35 @@
/obj/item/gripper/paperwork
name = "paperwork gripper"
desc = "A simple grasping tool for clerical work."
icon = 'icons/obj/device.dmi'
icon_state = "gripper"
can_hold = list(
/obj/item/clipboard,
/obj/item/paper,
// /obj/item/paper_bundle,
/obj/item/card/id
)
/obj/item/gripper/medical
name = "medical gripper"
desc = "A grasping tool used to help patients up once surgery is complete."
can_hold = list()
/obj/item/gripper/medical/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, proximity, params)
var/mob/living/carbon/human/H
if(!wrapped && proximity && target && ishuman(target))
H = target
if(H.lying)
H.AdjustSleeping(-5)
if(H.sleeping == 0)
H.StopResting()
H.AdjustParalysis(-3)
H.AdjustStunned(-3)
H.AdjustWeakened(-3)
playsound(user.loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
user.visible_message( \
"<span class='notice'>[user] shakes [H] trying to wake [H.p_them()] up!</span>",\
"<span class='notice'>You shake [H] trying to wake [H.p_them()] up!</span>",\
)
/obj/item/gripper/New()
..()
can_hold = typecacheof(can_hold)
@@ -161,6 +161,7 @@
modules += new /obj/item/bonesetter(src)
modules += new /obj/item/circular_saw(src)
modules += new /obj/item/surgicaldrill(src)
modules += new /obj/item/gripper/medical(src)
emag = new /obj/item/reagent_containers/spray(src)
@@ -422,6 +423,7 @@
modules += new /obj/item/FixOVein(src)
modules += new /obj/item/bonesetter(src)
modules += new /obj/item/surgicaldrill(src)
modules += new /obj/item/gripper/medical(src)
modules += new /obj/item/melee/energy/sword/cyborg/saw(src) //Energy saw -- primary weapon
modules += new /obj/item/card/emag(src)
modules += new /obj/item/crowbar/cyborg(src)
+3 -6
View File
@@ -70,7 +70,6 @@
else if(!current_surgery.step_in_progress && ishuman(M)) //early surgery cautery
var/datum/surgery_step/generic/cauterize/C = new
var/target_zone = check_zone(selected_zone)
if(current_surgery.status == 1)
M.surgeries -= current_surgery
to_chat(user, "You stop the surgery.")
@@ -92,17 +91,17 @@
cautery_tool = user.get_inactive_hand()
if(cautery_chance)
C.begin_step(user, H, selected_zone, target_zone, cautery_tool, current_surgery)
C.begin_step(user, H, selected_zone, cautery_tool, current_surgery)
if(do_after(user, C.time * cautery_tool.toolspeed, target = M))
if(!isrobot(user))
cautery_chance *= get_location_modifier(H)
cautery_chance *= get_pain_modifier(H)
if(prob(cautery_chance))
C.end_step(user, H, selected_zone, target_zone, cautery_tool, current_surgery)
C.end_step(user, H, selected_zone, cautery_tool, current_surgery)
M.surgeries -= current_surgery
qdel(current_surgery)
else
C.fail_step(user, H, selected_zone, target_zone, cautery_tool, current_surgery)
C.fail_step(user, H, selected_zone, cautery_tool, current_surgery)
else if(!isrobot(user))
to_chat(user, "<span class='notice'>You need to hold a cautery or equivalent in your inactive hand to stop the surgery in progress.</span>")
@@ -149,8 +148,6 @@
return TRUE
if(locate(/obj/structure/table, M.loc) && (M.lying || M.weakened || M.stunned || M.paralysis || M.sleeping || M.stat))
return TRUE
if((istype(M.loc, /turf/simulated/floor) || istype(M.loc, /turf/unsimulated/floor)) && (M.lying || M.weakened || M.stunned || M.paralysis || M.sleeping || M.stat))
return TRUE
return FALSE
// Called when a limb containing this object is placed back on a body