Skip to content

Commit

Permalink
[MIRROR] Adds "Strong Stomach" quirk, a core CDDA/PZ quirk we've sore…
Browse files Browse the repository at this point in the history
…ly been missing. Also Deviant Tastes dirty food re-nerf. (#2043)

* Adds "Strong Stomach" quirk, a core CDDA/PZ quirk we've sorely been missing. Also Deviant Tastes dirty food re-nerf. (#82562)

## About The Pull Request

- Adds Strong Stomach quirk. 
   - 4 points
   - You can eat dirty food without risk of getting disease. 
- You suffer less negative effects from vomiting. Vomit stuns you for
half the duration, and you lose half as much nutrition.

- Reverts tgstation/tgstation#76864 , integrates
its effects into Strong Stomach instead.

## Why It's Good For The Game

- Lotta people (namely Lizards and sometimes Felines with Deviant
Tastes) run gimmicks involving them being a gremlin person and eating
trash off the ground, and it's rather hard to accomplish this now since
it makes you a public medbay enemy # 1. This quirk should give them an
option to avoid that.
- Also (as mentioned in the title) both CDDA and PZ have this trait and
I can't believe we're missing it! This is something in
modifiable-character-traits/quirks-101.

- I moved the effects from #76864 to this quirk because 1. I thought it
was more fitting and 2. I thought the original PR was kinda wack for
what is (generally) a neutral quirk.

## Changelog

:cl: Melbert
add: Adds the Strong Stomach quirk, which allows you to eat grimy food
without worry about disease, and makes you a bit more resilient to the
effects of vomiting.
del: Deviant Tastes no longer prevents you from getting a negative
moodlet from eating dirty food. Strong Stomach does that now.
/:cl:

---------

Co-authored-by: Jacquerel <[email protected]>

* Adds "Strong Stomach" quirk, a core CDDA/PZ quirk we've sorely been missing. Also Deviant Tastes dirty food re-nerf.

---------

Co-authored-by: MrMelbert <[email protected]>
Co-authored-by: Jacquerel <[email protected]>
  • Loading branch information
3 people authored and StealsThePRs committed Apr 18, 2024
1 parent 108a4cd commit 603b6c5
Show file tree
Hide file tree
Showing 9 changed files with 44 additions and 8 deletions.
1 change: 1 addition & 0 deletions code/__DEFINES/traits/declarations.dm
Original file line number Diff line number Diff line change
Expand Up @@ -767,6 +767,7 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define TRAIT_POSTERBOY "poster_boy"
#define TRAIT_THROWINGARM "throwing_arm"
#define TRAIT_SETTLER "settler"
#define TRAIT_STRONG_STOMACH "strong_stomach"

/// This mob always lands on their feet when they fall, for better or for worse.
#define TRAIT_CATLIKE_GRACE "catlike_grace"
Expand Down
3 changes: 2 additions & 1 deletion code/_globalvars/traits/_traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,7 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_OVERWATCHED" = TRAIT_OVERWATCHED,
"TRAIT_OVERWATCH_IMMUNE" = TRAIT_OVERWATCH_IMMUNE,
"TRAIT_PACIFISM" = TRAIT_PACIFISM,
"TRAIT_PAPER_MASTER" = TRAIT_PAPER_MASTER,
"TRAIT_PARALYSIS_L_ARM" = TRAIT_PARALYSIS_L_ARM,
"TRAIT_PARALYSIS_L_LEG" = TRAIT_PARALYSIS_L_LEG,
"TRAIT_PARALYSIS_R_ARM" = TRAIT_PARALYSIS_R_ARM,
Expand Down Expand Up @@ -421,7 +422,6 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_SHIFTY_EYES" = TRAIT_SHIFTY_EYES,
"TRAIT_SHOCKIMMUNE" = TRAIT_SHOCKIMMUNE,
"TRAIT_SIGN_LANG" = TRAIT_SIGN_LANG,
"TRAIT_PAPER_MASTER" = TRAIT_PAPER_MASTER,
"TRAIT_SILENT_FOOTSTEPS" = TRAIT_SILENT_FOOTSTEPS,
"TRAIT_SIXTHSENSE" = TRAIT_SIXTHSENSE,
"TRAIT_SKITTISH" = TRAIT_SKITTISH,
Expand All @@ -443,6 +443,7 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_STASIS" = TRAIT_STASIS,
"TRAIT_STIMULATED" = TRAIT_STIMULATED,
"TRAIT_STRONG_GRABBER" = TRAIT_STRONG_GRABBER,
"TRAIT_STRONG_STOMACH" = TRAIT_STRONG_STOMACH,
"TRAIT_STUNIMMUNE" = TRAIT_STUNIMMUNE,
"TRAIT_SUCCUMB_OVERRIDE" = TRAIT_SUCCUMB_OVERRIDE,
"TRAIT_SUICIDED" = TRAIT_SUICIDED,
Expand Down
3 changes: 2 additions & 1 deletion code/_globalvars/traits/admin_tooling.dm
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ GLOBAL_LIST_INIT(admin_visible_traits, list(
"TRAIT_OIL_FRIED" = TRAIT_OIL_FRIED,
"TRAIT_OVERWATCH_IMMUNE" = TRAIT_OVERWATCH_IMMUNE,
"TRAIT_PACIFISM" = TRAIT_PACIFISM,
"TRAIT_PAPER_MASTER" = TRAIT_PAPER_MASTER,
"TRAIT_PARALYSIS_L_ARM" = TRAIT_PARALYSIS_L_ARM,
"TRAIT_PARALYSIS_L_LEG" = TRAIT_PARALYSIS_L_LEG,
"TRAIT_PARALYSIS_R_ARM" = TRAIT_PARALYSIS_R_ARM,
Expand Down Expand Up @@ -192,7 +193,6 @@ GLOBAL_LIST_INIT(admin_visible_traits, list(
"TRAIT_SHIFTY_EYES" = TRAIT_SHIFTY_EYES,
"TRAIT_SHOCKIMMUNE" = TRAIT_SHOCKIMMUNE,
"TRAIT_SIGN_LANG" = TRAIT_SIGN_LANG,
"TRAIT_PAPER_MASTER" = TRAIT_PAPER_MASTER,
"TRAIT_SILENT_FOOTSTEPS" = TRAIT_SILENT_FOOTSTEPS,
"TRAIT_SIXTHSENSE" = TRAIT_SIXTHSENSE,
"TRAIT_SKITTISH" = TRAIT_SKITTISH,
Expand All @@ -206,6 +206,7 @@ GLOBAL_LIST_INIT(admin_visible_traits, list(
"TRAIT_STABLEHEART" = TRAIT_STABLEHEART,
"TRAIT_STABLELIVER" = TRAIT_STABLELIVER,
"TRAIT_STRONG_GRABBER" = TRAIT_STRONG_GRABBER,
"TRAIT_STRONG_STOMACH" = TRAIT_STRONG_STOMACH,
"TRAIT_STUNIMMUNE" = TRAIT_STUNIMMUNE,
"TRAIT_SURGEON" = TRAIT_SURGEON,
"TRAIT_SURGICALLY_ANALYZED" = TRAIT_SURGICALLY_ANALYZED,
Expand Down
9 changes: 7 additions & 2 deletions code/datums/components/infective.dm
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,10 @@
/datum/component/infective/proc/try_infect_eat(datum/source, mob/living/eater, mob/living/feeder)
SIGNAL_HANDLER

if(!eater.has_quirk(/datum/quirk/deviant_tastes))
eater.add_mood_event("disgust", /datum/mood_event/disgust/dirty_food)
if(HAS_TRAIT(eater, TRAIT_STRONG_STOMACH))
return

eater.add_mood_event("disgust", /datum/mood_event/disgust/dirty_food)

if(is_weak && !prob(weak_infection_chance))
return
Expand All @@ -76,6 +78,9 @@
/datum/component/infective/proc/try_infect_drink(datum/source, mob/living/drinker, mob/living/feeder)
SIGNAL_HANDLER

if(HAS_TRAIT(drinker, TRAIT_STRONG_STOMACH))
return

var/appendage_zone = feeder.held_items.Find(source)
appendage_zone = appendage_zone == 0 ? BODY_ZONE_CHEST : appendage_zone % 2 ? BODY_ZONE_R_ARM : BODY_ZONE_L_ARM
try_infect(feeder, appendage_zone)
Expand Down
2 changes: 1 addition & 1 deletion code/datums/mood_events/needs_events.dm
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
mood_change = -12

/datum/mood_event/disgust/dirty_food
description = "It was too dirty to eat..."
description = "That was too dirty to eat..."
mood_change = -6
timeout = 4 MINUTES

Expand Down
12 changes: 12 additions & 0 deletions code/datums/quirks/positive_quirks/strong_stomach.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/datum/quirk/strong_stomach
name = "Strong Stomach"
desc = "You can eat food discarded on the ground without getting sick, and vomiting affects you less."
icon = FA_ICON_FACE_GRIN_BEAM_SWEAT
value = 4
mob_trait = TRAIT_STRONG_STOMACH
gain_text = span_notice("You feel like you could eat anything!")
lose_text = span_danger("Looking at food on the ground makes you feel a little queasy.")
medical_record_text = "Patient has a stronger than average immune system...to food poisoning, at least."
mail_goodies = list(
/obj/item/reagent_containers/pill/ondansetron,
)
15 changes: 12 additions & 3 deletions code/modules/mob/living/carbon/carbon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,9 @@
if((HAS_TRAIT(src, TRAIT_NOHUNGER) || HAS_TRAIT(src, TRAIT_TOXINLOVER)) && !force)
return TRUE

if(!force && HAS_TRAIT(src, TRAIT_STRONG_STOMACH))
lost_nutrition *= 0.5

SEND_SIGNAL(src, COMSIG_CARBON_VOMITED, distance, force)

// cache some stuff that we'll need later (at least multiple times)
Expand All @@ -441,7 +444,10 @@
span_userdanger("You try to throw up, but there's nothing in your stomach!"),
)
if(stun)
Stun(20 SECONDS)
var/stun_time = 20 SECONDS
if(HAS_TRAIT(src, TRAIT_STRONG_STOMACH))
stun_time *= 0.5
Stun(stun_time)
if(knockdown)
Knockdown(20 SECONDS)
return TRUE
Expand All @@ -464,11 +470,14 @@
add_mood_event("vomit", /datum/mood_event/vomit)

if(stun)
Stun(8 SECONDS)
var/stun_time = 8 SECONDS
if(!blood && HAS_TRAIT(src, TRAIT_STRONG_STOMACH))
stun_time *= 0.5
Stun(stun_time)
if(knockdown)
Knockdown(8 SECONDS)

playsound(get_turf(src), 'sound/effects/splat.ogg', 50, TRUE)
playsound(src, 'sound/effects/splat.ogg', 50, TRUE)

var/need_mob_update = FALSE
var/turf/location = get_turf(src)
Expand Down
6 changes: 6 additions & 0 deletions code/modules/reagents/reagent_containers/pill.dm
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,12 @@
list_reagents = list(/datum/reagent/gravitum = 5)
rename_with_volume = TRUE

/obj/item/reagent_containers/pill/ondansetron
name = "ondansetron pill"
desc = "Alleviates nausea. May cause drowsiness."
icon_state = "pill11"
list_reagents = list(/datum/reagent/medicine/ondansetron = 10)

// Pill styles for chem master

/obj/item/reagent_containers/pill/style
Expand Down
1 change: 1 addition & 0 deletions tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -1841,6 +1841,7 @@
#include "code\datums\quirks\positive_quirks\skittish.dm"
#include "code\datums\quirks\positive_quirks\spacer.dm"
#include "code\datums\quirks\positive_quirks\spiritual.dm"
#include "code\datums\quirks\positive_quirks\strong_stomach.dm"
#include "code\datums\quirks\positive_quirks\tagger.dm"
#include "code\datums\quirks\positive_quirks\throwing_arm.dm"
#include "code\datums\quirks\positive_quirks\voracious.dm"
Expand Down

0 comments on commit 603b6c5

Please sign in to comment.