mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-21 03:59:59 +01:00
## About The Pull Request So while playing I had to get a bunch of unstable mutagen out of a corpse's stomach before reviving it, and thus I tried to stomach pump it. This, however, never decreased the amount in the stomach, nor did it actually create any vomit like it's supposed to. Looking into it, the issue seems to be with this line: https://github.com/tgstation/tgstation/blob/0c562fd74299f8ce92a81c0a932b8ec4862189af/code/modules/surgery/stomachpump.dm#L49 Which doesn't line up with the parameters `vomit(...)` takes: https://github.com/tgstation/tgstation/blob/0c562fd74299f8ce92a81c0a932b8ec4862189af/code/modules/mob/living/carbon/carbon.dm#L417 `vomit_type = FALSE` isn't very helpful. This mismatch seems to be due to the `vomit(...)` proc getting changed quite a while ago, but in the process forgetting to update stomach pump to use it. Based on what I found looking into this, I replaced it with the following: ```dm target_human.vomit((MOB_VOMIT_MESSAGE | MOB_VOMIT_STUN), lost_nutrition = 20, purge_ratio = 0.67) ``` Where we don't use `VOMIT_CATEGORY_DEFAULT` as that includes `MOB_VOMIT_HARM`, and we already have our own harm condition. This fixes our issue. Oh, we also fix a minor spelling issue, "brusing" to "bruising". ## Why It's Good For The Game Makes stomach pumping actually work. ## Changelog 🆑 fix: The stomach pump surgery actually works again. spellcheck: "brusing" to "bruising" in the message you get when failing the stomach pump surgery. /🆑
64 lines
2.4 KiB
Plaintext
64 lines
2.4 KiB
Plaintext
/datum/surgery/stomach_pump
|
|
name = "Stomach Pump"
|
|
possible_locs = list(BODY_ZONE_CHEST)
|
|
steps = list(
|
|
/datum/surgery_step/incise,
|
|
/datum/surgery_step/retract_skin,
|
|
/datum/surgery_step/incise,
|
|
/datum/surgery_step/clamp_bleeders,
|
|
/datum/surgery_step/stomach_pump,
|
|
/datum/surgery_step/close,
|
|
)
|
|
|
|
/datum/surgery/stomach_pump/can_start(mob/user, mob/living/carbon/target)
|
|
var/obj/item/organ/internal/stomach/target_stomach = target.get_organ_slot(ORGAN_SLOT_STOMACH)
|
|
if(HAS_TRAIT(target, TRAIT_HUSK))
|
|
return FALSE
|
|
if(!target_stomach)
|
|
return FALSE
|
|
return ..()
|
|
|
|
//Working the stomach by hand in such a way that you induce vomiting.
|
|
/datum/surgery_step/stomach_pump
|
|
name = "pump stomach (hand)"
|
|
accept_hand = TRUE
|
|
repeatable = TRUE
|
|
time = 20
|
|
success_sound = 'sound/surgery/organ2.ogg'
|
|
|
|
/datum/surgery_step/stomach_pump/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
|
display_results(
|
|
user,
|
|
target,
|
|
span_notice("You begin pumping [target]'s stomach..."),
|
|
span_notice("[user] begins to pump [target]'s stomach."),
|
|
span_notice("[user] begins to press on [target]'s chest."),
|
|
)
|
|
display_pain(target, "You feel a horrible sloshing feeling in your gut! You're going to be sick!")
|
|
|
|
/datum/surgery_step/stomach_pump/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery, default_display_results = FALSE)
|
|
if(ishuman(target))
|
|
var/mob/living/carbon/human/target_human = target
|
|
display_results(
|
|
user,
|
|
target,
|
|
span_notice("[user] forces [target_human] to vomit, cleansing their stomach of some chemicals!"),
|
|
span_notice("[user] forces [target_human] to vomit, cleansing their stomach of some chemicals!"),
|
|
span_notice("[user] forces [target_human] to vomit!"),
|
|
)
|
|
target_human.vomit((MOB_VOMIT_MESSAGE | MOB_VOMIT_STUN), lost_nutrition = 20, purge_ratio = 0.67) //higher purge ratio than regular vomiting
|
|
return ..()
|
|
|
|
/datum/surgery_step/stomach_pump/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
|
if(ishuman(target))
|
|
var/mob/living/carbon/human/target_human = target
|
|
display_results(
|
|
user,
|
|
target,
|
|
span_warning("You screw up, bruising [target_human]'s chest!"),
|
|
span_warning("[user] screws up, brusing [target_human]'s chest!"),
|
|
span_warning("[user] screws up!"),
|
|
)
|
|
target_human.adjustOrganLoss(ORGAN_SLOT_STOMACH, 5)
|
|
target_human.adjustBruteLoss(5)
|