mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 12:41:09 +01:00
Adds (purely flavourful) unique pain messages to surgery steps, with a 30% chance for forced screaming in agonizing pain Messages are things like "You feel a horrible stabbing in your chest" and w/ever. Also see Skyrat-SS13/Skyrat-tg#5899
66 lines
3.1 KiB
Plaintext
66 lines
3.1 KiB
Plaintext
/datum/surgery/cavity_implant
|
|
name = "Cavity implant"
|
|
steps = list(
|
|
/datum/surgery_step/incise,
|
|
/datum/surgery_step/clamp_bleeders,
|
|
/datum/surgery_step/retract_skin,
|
|
/datum/surgery_step/incise,
|
|
/datum/surgery_step/handle_cavity,
|
|
/datum/surgery_step/close)
|
|
target_mobtypes = list(/mob/living/carbon/human)
|
|
possible_locs = list(BODY_ZONE_CHEST)
|
|
|
|
|
|
//handle cavity
|
|
/datum/surgery_step/handle_cavity
|
|
name = "implant item"
|
|
accept_hand = 1
|
|
implements = list(/obj/item = 100)
|
|
repeatable = TRUE
|
|
time = 32
|
|
var/obj/item/item_for_cavity
|
|
|
|
/datum/surgery_step/handle_cavity/tool_check(mob/user, obj/item/tool)
|
|
if(tool.tool_behaviour == TOOL_CAUTERY || istype(tool, /obj/item/gun/energy/laser))
|
|
return FALSE
|
|
return !tool.get_temperature()
|
|
|
|
/datum/surgery_step/handle_cavity/preop(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
|
var/obj/item/bodypart/chest/target_chest = target.get_bodypart(BODY_ZONE_CHEST)
|
|
item_for_cavity = target_chest.cavity_item
|
|
if(tool)
|
|
display_results(user, target, span_notice("You begin to insert [tool] into [target]'s [target_zone]..."),
|
|
span_notice("[user] begins to insert [tool] into [target]'s [target_zone]."),
|
|
span_notice("[user] begins to insert [tool.w_class > WEIGHT_CLASS_SMALL ? tool : "something"] into [target]'s [target_zone]."))
|
|
display_pain(target, "You can feel something being inserted into your [target_zone], it hurts like hell!")
|
|
else
|
|
display_results(user, target, span_notice("You check for items in [target]'s [target_zone]..."),
|
|
span_notice("[user] checks for items in [target]'s [target_zone]."),
|
|
span_notice("[user] looks for something in [target]'s [target_zone]."))
|
|
|
|
/datum/surgery_step/handle_cavity/success(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool, datum/surgery/surgery = FALSE)
|
|
var/obj/item/bodypart/chest/target_chest = target.get_bodypart(BODY_ZONE_CHEST)
|
|
if(tool)
|
|
if(item_for_cavity || tool.w_class > WEIGHT_CLASS_NORMAL || HAS_TRAIT(tool, TRAIT_NODROP) || istype(tool, /obj/item/organ))
|
|
to_chat(user, span_warning("You can't seem to fit [tool] in [target]'s [target_zone]!"))
|
|
return FALSE
|
|
else
|
|
display_results(user, target, span_notice("You stuff [tool] into [target]'s [target_zone]."),
|
|
span_notice("[user] stuffs [tool] into [target]'s [target_zone]!"),
|
|
span_notice("[user] stuffs [tool.w_class > WEIGHT_CLASS_SMALL ? tool : "something"] into [target]'s [target_zone]."))
|
|
user.transferItemToLoc(tool, target, TRUE)
|
|
target_chest.cavity_item = tool
|
|
return ..()
|
|
else
|
|
if(item_for_cavity)
|
|
display_results(user, target, span_notice("You pull [item_for_cavity] out of [target]'s [target_zone]."),
|
|
span_notice("[user] pulls [item_for_cavity] out of [target]'s [target_zone]!"),
|
|
span_notice("[user] pulls [item_for_cavity.w_class > WEIGHT_CLASS_SMALL ? item_for_cavity : "something"] out of [target]'s [target_zone]."))
|
|
display_pain(target, "Something is pulled out of your [target_zone]! It hurts like hell!")
|
|
user.put_in_hands(item_for_cavity)
|
|
target_chest.cavity_item = null
|
|
return ..()
|
|
else
|
|
to_chat(user, span_warning("You don't find anything in [target]'s [target_zone]."))
|
|
return FALSE
|