Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vomitting now empties your stomach #6527

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion code/__DEFINES/chemistry.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/// Amount of random icon variations for pills in total
#define PILL_ICON_CHOICES 21
/* Pill icon classes to generate mappings for */
#define PILL_ICON_CLASSES list("bica", "kelo", "dex", "para", "tram", "atox", "tox", "inap", "peri", "spac", "drug", "stim", "alky", "imi", "qc", "tric", "psych", "oxy")
#define PILL_ICON_CLASSES list("bica", "kelo", "dex", "para", "tram", "atox", "tox", "inap", "peri", "spac", "drug", "stim", "alky", "imi", "qc", "tric", "psych", "oxy", "ipe")

/*
reagents defines
Expand Down
1 change: 1 addition & 0 deletions code/game/machinery/vending/vendor_types/medical.dm
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,7 @@
list("Pill Bottle (Kelotane)", floor(scale * 4), /obj/item/storage/pill_bottle/kelotane, VENDOR_ITEM_REGULAR),
list("Pill Bottle (Peridaxon)", floor(scale * 3), /obj/item/storage/pill_bottle/peridaxon, VENDOR_ITEM_REGULAR),
list("Pill Bottle (Tramadol)", floor(scale * 4), /obj/item/storage/pill_bottle/tramadol, VENDOR_ITEM_REGULAR),
list("Pill Packet (Ipecac)", floor(scale * 4), /obj/item/storage/pill_bottle/packet/ipecac, VENDOR_ITEM_REGULAR),

list("MEDICAL UTILITIES", -1, null, null),
list("Emergency Defibrillator", floor(scale * 3), /obj/item/device/defibrillator, VENDOR_ITEM_REGULAR),
Expand Down
5 changes: 5 additions & 0 deletions code/game/objects/items/reagent_containers/pill.dm
Original file line number Diff line number Diff line change
Expand Up @@ -269,3 +269,8 @@
/obj/item/reagent_container/pill/stimulant
pill_initial_reagents = list("antag_stimulant" = 10)
pill_icon_class = "stim"

/obj/item/reagent_container/pill/ipecac
pill_desc = "An Ipecac pill. Used to induce vomiting to eject toxic substances."
pill_initial_reagents = list("ipecac" = 10)
pill_icon_class = "ipe"
6 changes: 6 additions & 0 deletions code/game/objects/items/storage/firstaid.dm
Original file line number Diff line number Diff line change
Expand Up @@ -789,3 +789,9 @@
icon_state = "oxycodone_packet"
desc = "This packet contains oxycodone pills. A highly effective painkiller. Once you take them out, they don't go back in. Don't take more than 1 pill in a short period."
pill_type_to_fill = /obj/item/reagent_container/pill/oxycodone

/obj/item/storage/pill_bottle/packet/ipecac
name = "ipecac pill packet"
icon_state = "ipecac_packet"
desc = "This packet contains ipecac pills. A fast acting emetic. Once you take them out, they don't go back in."
pill_type_to_fill = /obj/item/reagent_container/pill/ipecac
18 changes: 11 additions & 7 deletions code/modules/mob/living/carbon/human/human.dm
Original file line number Diff line number Diff line change
Expand Up @@ -880,8 +880,8 @@
if(!lastpuke)
lastpuke = 1
to_chat(src, SPAN_WARNING("You feel nauseous..."))
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(to_chat), src, "You feel like you are about to throw up!"), 15 SECONDS)
addtimer(CALLBACK(src, PROC_REF(do_vomit)), 25 SECONDS)
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(to_chat), src, "You feel like you are about to throw up!"), 10 SECONDS)
addtimer(CALLBACK(src, PROC_REF(do_vomit)), 15 SECONDS)

/mob/living/carbon/human/proc/do_vomit()
apply_effect(5, STUN)
Expand All @@ -894,9 +894,13 @@
if(istype(location, /turf))
location.add_vomit_floor(src, 1)

if(length(reagents.reagent_list))
for(var/datum/reagent/ingested_chem as anything in reagents.reagent_list)
ingested_chem.volume = (ingested_chem.volume * 0.7)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This behavior of removing chems in your stomach needs to set a cooldown of something like I dunno 15 minutes or so. Doesn't need to restrict the act of vomiting nor the stun associated, but just "You heave but your stomach is empty" or something along those lines.

Effectively what this is imitating is that chems that haven't entered your bloodstream yet you can eject from your stomach without going so far as tracking the age of each reagent in the body.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This behavior of removing chems in your stomach needs to set a cooldown of something like I dunno 15 minutes or so. Doesn't need to restrict the act of vomiting nor the stun associated, but just "You heave but your stomach is empty" or something along those lines.

Effectively what this is imitating is that chems that haven't entered your bloodstream yet you can eject from your stomach without going so far as tracking the age of each reagent in the body.

That's what the percentage does in this case. It's impossible to vomit the "entirety" of whatever is in you. The larger the volume (and thus, technically a more "recently ingested" chem) the more you'll purge, the smaller values however will remove even less as say if you had 16u of a chem, even 6 vomit cycles (a very long time in this case) would reduce that number down to 2u. (200u of something though very clearly loses a lot more than that on the first purge)

Regardless, the percentage based system specifically works to target higher volume (and again: thus more recent) items in the system rather than long sitting, smaller value chems. I feel the curve that comes with 30% to be smartly applied in this case and would ask a reconsideration on a cooldown as I don't think anyone is willing to wait 15 minutes to actually use this potential avenue for the sake of vomitting twice (and there would be no reasonable way to express to the player that the 15min interval was up and their next puke will be another "good" one)

Copy link
Contributor

@Drulikar Drulikar Jun 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those are the requested changes. Merely having a percentage means nothing. Simply ingest lots of some harmless reagent to work around it. Its per reagent so this doesn't apply, but doesn't change my position. The alternative is to have a more in depth tracking of whether reagents would be new enough to still reside in the stomach.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aight well, that's way off theme and a 15 minute timer makes the entire feature useless. GG I guess.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All this ultimately is conveying stomach emptiness so this can't be abused. Behaves the same in real life. You can only vomit so much before there's nothing to vomit.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess what you mean but the timer inherent to vomit() and the random draw already means that you're naturally going to be spending 30s-50s between purges. Asking for a 900s cooldown just means that people will naturally metabolize 90u (rate @ .1 per sec) of whatever is in their system which baring a laughably horrible OD where you've ingested 200u of Bica somehow, this would never affect them. Subjecting yourself to uncontrollable stuns for a couple minutes should have a tangible reward on the other end of it, especially since the best case for this is for OD control. I don't see a world where OD control can really be abused in any capacity as being OD'd never conveys any benefits, and thus you undergo a slightly less bad outcome to not have to deal with a worse outcome. It's an emergency stopgap. The alternative is getting connected to the blood cleaner device which has zero downsides and takes seconds to purge -everything- from your system. The bonus here is that you don't have to go back to FOB, the trade off being that you're going to be screwed for two minutes while you wait (time that could have been spent going to FOB)

Regardless, I'll close this out as it's not going to be considered.

Copy link
Contributor

@Drulikar Drulikar Jun 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know how you got the notion that I was just outright denying what you intended to do. I just requested that using this substance to evoke vomiting needs to be something that can only be done sparingly, so to simulate how you actually need contents in your stomach but we don't actually simulate stomach contents getting absorbed, to just put the positive effect of it on a cooldown.

I see this as a in-field way to deal with an overdose. I would want it to be an inferior solution to hemodialysis. But this shouldn't be a tool that can just be used freely. It should only be used in an emergency like with an overdose.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If your concern was that with a cooldown like this then the 30% is too small of an effect, sure then make it 50% or something. I wasn't even hard on how long the time needed to be but IMO I think 15 mins is probably too short. Someone shouldn't be having to deal with ODs that quickly.


nutrition -= 40
apply_damage(-3, TOX)
addtimer(VARSET_CALLBACK(src, lastpuke, FALSE), 35 SECONDS)
addtimer(VARSET_CALLBACK(src, lastpuke, FALSE), 15 SECONDS)

/mob/living/carbon/human/proc/get_visible_gender()
if(wear_suit && wear_suit.flags_inv_hide & HIDEJUMPSUIT && ((head && head.flags_inv_hide & HIDEMASK) || wear_mask))
Expand Down Expand Up @@ -1707,15 +1711,15 @@

/mob/living/carbon/human/on_knockedout_trait_gain(datum/source)
. = ..()

update_execute_hud()

return .

/mob/living/carbon/human/on_knockedout_trait_loss(datum/source)
. = ..()

update_execute_hud()

return .

2 changes: 1 addition & 1 deletion code/modules/reagents/chemistry_properties/prop_neutral.dm
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@
category = PROPERTY_TYPE_IRRITANT

/datum/chem_property/neutral/emetic/process(mob/living/M, potency = 1, delta_time)
if(prob(0.5 * holder.volume * potency * delta_time) && ishuman(M))
if(prob(2.5 * holder.volume * potency * delta_time) && ishuman(M))
var/mob/living/carbon/human/H = M
H.vomit() //vomit() already has a timer on in

Expand Down
9 changes: 9 additions & 0 deletions code/modules/reagents/chemistry_reagents/medical.dm
Original file line number Diff line number Diff line change
Expand Up @@ -411,3 +411,12 @@
custom_metabolism = AMOUNT_PER_TIME(1, 200 SECONDS)
data = 0
properties = list(PROPERTY_CURING = 2)

/datum/reagent/medical/ipecac
name = "Ipecac"
id = "ipecac"
description = "A rapid acting emetic made from the ipecacuanha plant."
reagent_state = LIQUID
color = "#DEAD00"
data = 0
properties = list(PROPERTY_EMETIC = 1)
Binary file modified icons/obj/items/chemistry.dmi
Binary file not shown.
Loading