Merge pull request #8812 from Sishen1542/surgery-hugboxing
Using the wrong tool during surgery won't hit the patient with it. Also stops medical borgs from attacking with surgical tools outside of harm intent.
This commit is contained in:
@@ -49,9 +49,14 @@
|
||||
|
||||
var/datum/surgery_step/S = get_surgery_step()
|
||||
if(S)
|
||||
if(S.try_op(user, target, user.zone_selected, user.get_active_held_item(), src, try_to_fail))
|
||||
return 1
|
||||
return 0
|
||||
var/obj/item/tool = user.get_active_held_item()
|
||||
if(S.try_op(user, target, user.zone_selected, tool, src, try_to_fail))
|
||||
return TRUE
|
||||
if(iscyborg(user) && user.a_intent != INTENT_HARM) //to save asimov borgs a LOT of heartache
|
||||
return TRUE
|
||||
if(tool.item_flags & SURGICAL_TOOL) //Just because you used the wrong tool it doesn't mean you meant to whack the patient with it
|
||||
to_chat(user, "<span class='warning'>This step requires a different tool!</span>")
|
||||
return TRUE
|
||||
|
||||
/datum/surgery/proc/get_surgery_step()
|
||||
var/step_type = steps[status]
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
icon = 'icons/obj/surgery.dmi'
|
||||
icon_state = "retractor"
|
||||
materials = list(MAT_METAL=6000, MAT_GLASS=3000)
|
||||
item_flags = SURGICAL_TOOL
|
||||
flags_1 = CONDUCT_1
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
|
||||
@@ -33,6 +34,7 @@
|
||||
icon = 'icons/obj/surgery.dmi'
|
||||
icon_state = "hemostat"
|
||||
materials = list(MAT_METAL=5000, MAT_GLASS=2500)
|
||||
item_flags = SURGICAL_TOOL
|
||||
flags_1 = CONDUCT_1
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
attack_verb = list("attacked", "pinched")
|
||||
@@ -66,6 +68,7 @@
|
||||
icon = 'icons/obj/surgery.dmi'
|
||||
icon_state = "cautery"
|
||||
materials = list(MAT_METAL=2500, MAT_GLASS=750)
|
||||
item_flags = SURGICAL_TOOL
|
||||
flags_1 = CONDUCT_1
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
attack_verb = list("burnt")
|
||||
@@ -102,6 +105,7 @@
|
||||
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
|
||||
hitsound = 'sound/weapons/circsawhit.ogg'
|
||||
materials = list(MAT_METAL=10000, MAT_GLASS=6000)
|
||||
item_flags = SURGICAL_TOOL
|
||||
flags_1 = CONDUCT_1
|
||||
force = 15
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
@@ -151,6 +155,7 @@
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
materials = list(MAT_METAL=4000, MAT_GLASS=1000)
|
||||
item_flags = SURGICAL_TOOL
|
||||
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
sharpness = IS_SHARP_ACCURATE
|
||||
@@ -209,6 +214,7 @@
|
||||
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
|
||||
hitsound = 'sound/weapons/circsawhit.ogg'
|
||||
throwhitsound = 'sound/weapons/pierce.ogg'
|
||||
item_flags = SURGICAL_TOOL
|
||||
flags_1 = CONDUCT_1
|
||||
force = 15
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
@@ -278,6 +284,7 @@
|
||||
desc = "A container for holding body parts."
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "evidenceobj"
|
||||
item_flags = SURGICAL_TOOL
|
||||
|
||||
/obj/item/organ_storage/afterattack(obj/item/I, mob/user, proximity)
|
||||
. = ..()
|
||||
|
||||
Reference in New Issue
Block a user