mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-02-08 23:39:32 +00:00
* Fixes surgeries runtiming constantly when having the surgery initator open, fixes some surgeries missing sounds (#81307) ## About The Pull Request Fixes #79318 - See the issue for more information. I fixed the runtimes as expected, and then removed `SURGERY_REQUIRE_LIMB` from some surgeries which don't actually require a limb, such as implant removal, dissection, and living revival. I could've easily missed some, and as a result some surgeries are lost to the void and unselectable, but from what I could tell in testing it seems... fine. - Adds `SHOULD_CALL_PARENT` to surgery `can_start`. Cleans up some surgery `can_start` overrides. - Adds missing sounds to puncture repair surgery. ## Changelog 🆑 Melbert fix: Fixed Puncture Repair surgery not having surgical sounds fix: Fixed Surgery Initiator potentially showing invalid surgeries /🆑 * Fixes surgeries runtiming constantly when having the surgery initator open, fixes some surgeries missing sounds * Fixeed --------- Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com> Co-authored-by: Useroth <37159550+Useroth@users.noreply.github.com>
73 lines
3.0 KiB
Plaintext
73 lines
3.0 KiB
Plaintext
/datum/surgery/eye_surgery
|
|
name = "Eye surgery"
|
|
requires_bodypart_type = NONE
|
|
organ_to_manipulate = ORGAN_SLOT_EYES
|
|
possible_locs = list(BODY_ZONE_PRECISE_EYES)
|
|
steps = list(
|
|
/datum/surgery_step/incise,
|
|
/datum/surgery_step/retract_skin,
|
|
/datum/surgery_step/clamp_bleeders,
|
|
/datum/surgery_step/fix_eyes,
|
|
/datum/surgery_step/close,
|
|
)
|
|
|
|
//fix eyes
|
|
/datum/surgery_step/fix_eyes
|
|
name = "fix eyes (hemostat)"
|
|
implements = list(
|
|
TOOL_HEMOSTAT = 100,
|
|
TOOL_SCREWDRIVER = 45,
|
|
/obj/item/pen = 25)
|
|
time = 64
|
|
|
|
/datum/surgery/eye_surgery/can_start(mob/user, mob/living/carbon/target)
|
|
return target.get_organ_slot(ORGAN_SLOT_EYES) && ..()
|
|
|
|
/datum/surgery_step/fix_eyes/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
|
display_results(
|
|
user,
|
|
target,
|
|
span_notice("You begin to fix [target]'s eyes..."),
|
|
span_notice("[user] begins to fix [target]'s eyes."),
|
|
span_notice("[user] begins to perform surgery on [target]'s eyes."),
|
|
)
|
|
display_pain(target, "You feel a stabbing pain in your eyes!")
|
|
|
|
/datum/surgery_step/fix_eyes/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery, default_display_results = FALSE)
|
|
var/obj/item/organ/internal/eyes/target_eyes = target.get_organ_slot(ORGAN_SLOT_EYES)
|
|
user.visible_message(span_notice("[user] successfully fixes [target]'s eyes!"), span_notice("You succeed in fixing [target]'s eyes."))
|
|
display_results(
|
|
user,
|
|
target,
|
|
span_notice("You succeed in fixing [target]'s eyes."),
|
|
span_notice("[user] successfully fixes [target]'s eyes!"),
|
|
span_notice("[user] completes the surgery on [target]'s eyes."),
|
|
)
|
|
display_pain(target, "Your vision blurs, but it seems like you can see a little better now!")
|
|
target.remove_status_effect(/datum/status_effect/temporary_blindness)
|
|
target.set_eye_blur_if_lower(70 SECONDS) //this will fix itself slowly.
|
|
target_eyes.set_organ_damage(0) // heals nearsightedness and blindness from eye damage
|
|
return ..()
|
|
|
|
/datum/surgery_step/fix_eyes/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
|
if(target.get_organ_by_type(/obj/item/organ/internal/brain))
|
|
display_results(
|
|
user,
|
|
target,
|
|
span_warning("You accidentally stab [target] right in the brain!"),
|
|
span_warning("[user] accidentally stabs [target] right in the brain!"),
|
|
span_warning("[user] accidentally stabs [target] right in the brain!"),
|
|
)
|
|
display_pain(target, "You feel a visceral stabbing pain right through your head, into your brain!")
|
|
target.adjustOrganLoss(ORGAN_SLOT_BRAIN, 70)
|
|
else
|
|
display_results(
|
|
user,
|
|
target,
|
|
span_warning("You accidentally stab [target] right in the brain! Or would have, if [target] had a brain."),
|
|
span_warning("[user] accidentally stabs [target] right in the brain! Or would have, if [target] had a brain."),
|
|
span_warning("[user] accidentally stabs [target] right in the brain!"),
|
|
)
|
|
display_pain(target, "You feel a visceral stabbing pain right through your head!") // dunno who can feel pain w/o a brain but may as well be consistent.
|
|
return FALSE
|