mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-11 16:14:08 +01:00
21b4095dfd
Upstream 04/17/2026 fixes https://github.com/Bubberstation/Bubberstation/issues/5549 --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: tgstation-ci[bot] <179393467+tgstation-ci[bot]@users.noreply.github.com> Co-authored-by: ArcaneMusic <41715314+ArcaneMusic@users.noreply.github.com> Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com> Co-authored-by: Rhials <28870487+Rhials@users.noreply.github.com> Co-authored-by: rageguy505 <54517726+rageguy505@users.noreply.github.com> Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com> Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com> Co-authored-by: Aliceee2ch <160794176+Aliceee2ch@users.noreply.github.com> Co-authored-by: Time-Green <7501474+Time-Green@users.noreply.github.com> Co-authored-by: Tsar-Salat <62388554+Tsar-Salat@users.noreply.github.com> Co-authored-by: SmArtKar <44720187+SmArtKar@users.noreply.github.com> Co-authored-by: Maxipat <108554989+Maxipat112@users.noreply.github.com> Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com> Co-authored-by: deltanedas <39013340+deltanedas@users.noreply.github.com> Co-authored-by: SimplyLogan <47579821+loganuk@users.noreply.github.com> Co-authored-by: loganuk <fakeemail123@aol.com> Co-authored-by: Leland Kemble <70413276+lelandkemble@users.noreply.github.com> Co-authored-by: FalloutFalcon <86381784+FalloutFalcon@users.noreply.github.com> Co-authored-by: Roxy <75404941+TealSeer@users.noreply.github.com> Co-authored-by: Lucy <lucy@absolucy.moe> Co-authored-by: siliconOpossum <138069572+siliconOpossum@users.noreply.github.com> Co-authored-by: Isratosh <Isratosh@hotmail.com> Co-authored-by: TheRyeGuyWhoWillNowDie <70169560+TheRyeGuyWhoWillNowDie@users.noreply.github.com> Co-authored-by: Neocloudy <88008002+Neocloudy@users.noreply.github.com> Co-authored-by: Alexander V. <volas@ya.ru> Co-authored-by: ElGitificador <168473461+ElGitificador@users.noreply.github.com> Co-authored-by: Twaticus <46540570+Twaticus@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com> Co-authored-by: Cameron Lennox <killer65311@gmail.com> Co-authored-by: Tim <timothymtorres@gmail.com> Co-authored-by: Iamgoofball <iamgoofball@gmail.com> Co-authored-by: Layzu666 <121319428+Layzu666@users.noreply.github.com> Co-authored-by: Arturlang <24881678+Arturlang@users.noreply.github.com> Co-authored-by: _0Steven <42909981+00-Steven@users.noreply.github.com> Co-authored-by: mrmanlikesbt <99309552+mrmanlikesbt@users.noreply.github.com> Co-authored-by: Ben10Omintrix <138636438+Ben10Omintrix@users.noreply.github.com> Co-authored-by: John F. Kennedy <54908920+MacaroniCritter@users.noreply.github.com> Co-authored-by: Cursor <102828457+theselfish@users.noreply.github.com> Co-authored-by: Josh <josh.adam.powell@gmail.com> Co-authored-by: Josh Powell <josh.powell@softwire.com> Co-authored-by: Yobrocharlie <Charliemiller5617@gmail.com> Co-authored-by: Hardly3D <66234359+Hardly3D@users.noreply.github.com> Co-authored-by: shayoki <96078776+shayoki@users.noreply.github.com> Co-authored-by: LT3 <83487515+lessthnthree@users.noreply.github.com>
117 lines
4.3 KiB
Plaintext
117 lines
4.3 KiB
Plaintext
/datum/surgery_operation/limb/amputate
|
|
name = "amputate limb"
|
|
rnd_name = "Disarticulation (Amputation)"
|
|
desc = "Sever a limb from a patient's body."
|
|
operation_flags = OPERATION_MORBID | OPERATION_AFFECTS_MOOD | OPERATION_NOTABLE
|
|
required_bodytype = ~(BODYTYPE_ROBOTIC|BODYTYPE_PEG)
|
|
implements = list(
|
|
/obj/item/shears = 0.33,
|
|
TOOL_SAW = 1,
|
|
TOOL_SCALPEL = 1,
|
|
/obj/item/melee/arm_blade = 1.25,
|
|
/obj/item/shovel/serrated = 1.33,
|
|
/obj/item/fireaxe = 2,
|
|
/obj/item/hatchet = 2.5,
|
|
/obj/item/knife/butcher = 4,
|
|
)
|
|
time = 6.4 SECONDS
|
|
preop_sound = list(
|
|
/obj/item/circular_saw = 'sound/items/handling/surgery/saw.ogg',
|
|
/obj/item = 'sound/items/handling/surgery/scalpel1.ogg',
|
|
)
|
|
success_sound = 'sound/items/handling/surgery/organ2.ogg'
|
|
all_surgery_states_required = SURGERY_SKIN_OPEN|SURGERY_BONE_SAWED
|
|
any_surgery_states_blocked = SURGERY_VESSELS_UNCLAMPED
|
|
|
|
/datum/surgery_operation/limb/amputate/get_recommended_tool()
|
|
return TOOL_SAW
|
|
|
|
/datum/surgery_operation/limb/amputate/get_default_radial_image()
|
|
return image('icons/hud/surgery_radial.dmi', "amputate")
|
|
|
|
/datum/surgery_operation/limb/amputate/state_check(obj/item/bodypart/limb)
|
|
if(limb.body_zone == BODY_ZONE_CHEST)
|
|
return FALSE
|
|
if(limb.bodypart_flags & BODYPART_UNREMOVABLE)
|
|
return FALSE
|
|
if(HAS_TRAIT(limb.owner, TRAIT_NODISMEMBER))
|
|
return FALSE
|
|
return TRUE
|
|
|
|
/datum/surgery_operation/limb/amputate/on_preop(obj/item/bodypart/limb, mob/living/surgeon, obj/item/tool, list/operation_args)
|
|
display_results(
|
|
surgeon,
|
|
limb.owner,
|
|
span_notice("You begin to sever [limb.owner]'s [limb.plaintext_zone]..."),
|
|
span_notice("[surgeon] begins to sever [limb.owner]'s [limb.plaintext_zone]."),
|
|
span_notice("[surgeon] begins to sever [limb.owner]'s [limb.plaintext_zone] with [tool]."),
|
|
)
|
|
display_pain(limb.owner, "You feel a gruesome pain in your [limb.plaintext_zone]'s joint!")
|
|
|
|
/datum/surgery_operation/limb/amputate/on_success(obj/item/bodypart/limb, mob/living/surgeon, obj/item/tool, list/operation_args)
|
|
display_results(
|
|
surgeon,
|
|
limb.owner,
|
|
span_notice("You successfully amputate [limb.owner]'s [limb.plaintext_zone]!"),
|
|
span_notice("[surgeon] successfully amputates [limb.owner]'s [limb.plaintext_zone]!"),
|
|
span_notice("[surgeon] finishes severing [limb.owner]'s [limb.plaintext_zone]."),
|
|
)
|
|
display_pain(limb.owner, "You can no longer feel your [limb.plaintext_zone]!")
|
|
if(HAS_MIND_TRAIT(surgeon, TRAIT_MORBID))
|
|
surgeon.add_mood_event("morbid_dissection_success", /datum/mood_event/morbid_dissection_success)
|
|
limb.drop_limb()
|
|
|
|
/datum/surgery_operation/limb/amputate/mechanic
|
|
name = "disassemble limb"
|
|
rnd_name = "Dissassembly (Amputation)"
|
|
required_bodytype = BODYTYPE_ROBOTIC
|
|
operation_flags = parent_type::operation_flags | OPERATION_MECHANIC
|
|
implements = list(
|
|
/obj/item/shovel/giant_wrench = 0.33,
|
|
TOOL_WRENCH = 1,
|
|
TOOL_CROWBAR = 1,
|
|
TOOL_SCALPEL = 2,
|
|
TOOL_SAW = 2,
|
|
)
|
|
time = 2 SECONDS //WAIT I NEED THAT!!
|
|
preop_sound = 'sound/items/tools/ratchet.ogg'
|
|
preop_sound = 'sound/machines/airlock/doorclick.ogg'
|
|
all_surgery_states_required = SURGERY_SKIN_OPEN
|
|
|
|
/datum/surgery_operation/limb/amputate/mechanic/state_check(obj/item/bodypart/limb)
|
|
// added requirement for bone sawed to prevent accidental head removals.
|
|
return ..() && (limb.body_zone != BODY_ZONE_HEAD || LIMB_HAS_SURGERY_STATE(limb, SURGERY_BONE_SAWED))
|
|
|
|
/datum/surgery_operation/limb/amputate/mechanic/any_required_strings()
|
|
return ..() + list(
|
|
"if operating on the head, the bone MUST be sawed",
|
|
"otherwise, the state of the bone doesn't matter",
|
|
)
|
|
|
|
/datum/surgery_operation/limb/amputate/mechanic/get_recommended_tool()
|
|
return "[TOOL_WRENCH] / [TOOL_SAW]"
|
|
|
|
/datum/surgery_operation/limb/amputate/pegleg
|
|
name = "detach wooden limb"
|
|
rnd_name = "Detach Wooden Limb (Amputation)"
|
|
required_bodytype = BODYTYPE_PEG
|
|
operation_flags = parent_type::operation_flags | OPERATION_MECHANIC
|
|
implements = list(
|
|
TOOL_SAW = 1,
|
|
/obj/item/shovel/serrated = 1,
|
|
/obj/item/fireaxe = 1.15,
|
|
/obj/item/hatchet = 1.33,
|
|
TOOL_SCALPEL = 4,
|
|
)
|
|
time = 3 SECONDS
|
|
preop_sound = list(
|
|
/obj/item/circular_saw = 'sound/items/handling/surgery/saw.ogg',
|
|
/obj/item = 'sound/items/weapons/bladeslice.ogg',
|
|
)
|
|
success_sound = 'sound/items/handling/materials/wood_drop.ogg'
|
|
all_surgery_states_required = NONE
|
|
|
|
/datum/surgery_operation/limb/amputate/pegleg/all_required_strings()
|
|
. = ..()
|
|
. += "the limb must be wooden"
|