Skip to content

Commit

Permalink
Adds lactose intolerance (#22829)
Browse files Browse the repository at this point in the history
* drake nerf

* g

* vary
  • Loading branch information
SapphicOverload authored Dec 4, 2024
1 parent ee7f075 commit e39ace5
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 1 deletion.
32 changes: 32 additions & 0 deletions code/datums/traits/negative.dm
Original file line number Diff line number Diff line change
Expand Up @@ -985,3 +985,35 @@
if(!old_limb.is_organic_limb())
cybernetics_level--
update_mood()

/datum/quirk/lactose_intolerance
name = "Lactose Intolerance"
desc = "You don't tolerate milk or other dairy products."
icon = "utensils"
gain_text = span_danger("You suddenly feel intolerant towards milk.")
lose_text = span_notice("You feel like you could drink milk again.")
medical_record_text = "Patient is lactose intolerant."
value = -1

/datum/quirk/lactose_intolerance/check_quirk(datum/preferences/prefs)
var/datum/species/species_type = prefs.read_preference(/datum/preference/choiced/species)
if(initial(species_type.toxic_food) & DAIRY)
return "You're already lactose intolerant!"
species_type = new species_type()
if((TRAIT_POWERHUNGRY in species_type.inherent_traits) || (TRAIT_NOHUNGER in species_type.inherent_traits))
return "You don't eat food!"
return FALSE

/datum/quirk/lactose_intolerance/add()
if(!ishuman(quirk_holder))
return
var/mob/living/carbon/carbon_holder = quirk_holder
var/datum/species/spec = carbon_holder.dna.species
spec.toxic_food |= DAIRY
RegisterSignal(carbon_holder, COMSIG_SPECIES_GAIN, PROC_REF(on_species_gain))

/datum/quirk/lactose_intolerance/remove()
UnregisterSignal(quirk_holder, COMSIG_SPECIES_GAIN)

/datum/quirk/lactose_intolerance/proc/on_species_gain(datum/source, datum/species/new_species)
new_species.toxic_food |= DAIRY // no escape from your terrible fate
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
meat = /obj/item/reagent_containers/food/snacks/meat/slab/human/mutant/lizard
skinned_type = /obj/item/stack/sheet/animalhide/lizard
exotic_bloodtype = "L"
disliked_food = SUGAR | VEGETABLES
toxic_food = parent_type::toxic_food | DAIRY
liked_food = MEAT | GRILLED | SEAFOOD | MICE | FRUIT
inert_mutation = FIREBREATH
deathsound = 'sound/voice/lizard/deathsound.ogg'
Expand Down
5 changes: 5 additions & 0 deletions code/modules/reagents/chemistry/reagents/drink_reagents.dm
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,11 @@
glass_desc = "White and nutritious goodness!"
default_container = /obj/item/reagent_containers/food/condiment/milk

/datum/reagent/consumable/milk/on_mob_life(mob/living/carbon/M)
. = ..()
if(M.dna?.species?.toxic_food & DAIRY)
M.adjust_disgust(min(volume / 2, 5))

/datum/reagent/consumable/milk/coconut
name = "Coconut Milk"
description = "An opaque white liquid produced by the mammary glands of a coconut... wait what?"
Expand Down

0 comments on commit e39ace5

Please sign in to comment.