mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 19:52:40 +00:00
[MIRROR] Diet/Allergy System Rework
This commit is contained in:
@@ -24,6 +24,19 @@
|
||||
#define EMP_TOX_DMG 0x80 // EMPs inflict toxin damage
|
||||
#define EMP_OXY_DMG 0x100 // EMPs inflict oxy damage
|
||||
|
||||
// Species allergens
|
||||
#define MEAT 0x1 // Skrell won't like this.
|
||||
#define FISH 0x2 // Seperate for completion's sake. Still bad for skrell.
|
||||
#define FRUIT 0x4 // An apple a day only keeps the doctor away if they're allergic.
|
||||
#define VEGETABLE 0x8 // Taters 'n' carrots. Potato allergy is a thing, apparently.
|
||||
#define GRAINS 0x10 // Wheat, oats, etc.
|
||||
#define BEANS 0x20 // The musical fruit! Includes soy.
|
||||
#define SEEDS 0x40 // Hope you don't have a nut allergy.
|
||||
#define DAIRY 0x80 // Lactose intolerance, ho! Also bad for skrell.
|
||||
#define FUNGI 0x100 // Delicious shrooms.
|
||||
#define COFFEE 0x200 // Mostly here for tajara.
|
||||
#define GENERIC 0x400 // Catchall for stuff that doesn't fall into the groups above. You shouldn't be allergic to this type, ever.
|
||||
|
||||
// Species spawn flags
|
||||
#define SPECIES_IS_WHITELISTED 0x1 // Must be whitelisted to play.
|
||||
#define SPECIES_IS_RESTRICTED 0x2 // Is not a core/normally playable species. (castes, mutantraces)
|
||||
|
||||
@@ -55,6 +55,8 @@
|
||||
var/active_regen_mult = 1 // Multiplier for 'Regenerate' power speed, in human_powers.dm
|
||||
|
||||
var/taste_sensitivity = TASTE_NORMAL // How sensitive the species is to minute tastes.
|
||||
var/allergens = null // Things that will make this species very sick
|
||||
var/allergen_severity = 0.5 // How bad are reactions to the allergen? This is raw toxin damage per metabolism tick, multiplied by the amount metabolized
|
||||
|
||||
var/min_age = 17
|
||||
var/max_age = 70
|
||||
|
||||
@@ -231,6 +231,7 @@
|
||||
base_color = "#333333"
|
||||
|
||||
reagent_tag = IS_TAJARA
|
||||
allergens = COFFEE
|
||||
|
||||
move_trail = /obj/effect/decal/cleanable/blood/tracks/paw
|
||||
|
||||
@@ -321,6 +322,7 @@
|
||||
breath_heat_level_3 = 1350 //Default 1250
|
||||
|
||||
reagent_tag = IS_SKRELL
|
||||
allergens = MEAT|FISH|DAIRY
|
||||
|
||||
has_limbs = list(
|
||||
BP_TORSO = list("path" = /obj/item/organ/external/chest),
|
||||
|
||||
@@ -289,6 +289,7 @@
|
||||
tail_animation = 'icons/mob/species/tajaran/tail_vr.dmi'
|
||||
color_mult = 1
|
||||
min_age = 18
|
||||
allergens = null
|
||||
gluttonous = 0 //Moving this here so I don't have to fix this conflict every time polaris glances at station.dm
|
||||
inherent_verbs = list(/mob/living/carbon/human/proc/lick_wounds)
|
||||
heat_discomfort_level = 295 //Prevents heat discomfort spam at 20c
|
||||
@@ -305,6 +306,7 @@
|
||||
color_mult = 1
|
||||
min_age = 18
|
||||
reagent_tag = null
|
||||
allergens = null
|
||||
assisted_langs = list(LANGUAGE_EAL, LANGUAGE_ROOTLOCAL, LANGUAGE_ROOTGLOBAL, LANGUAGE_VOX)
|
||||
|
||||
//CHOMPedit: link to our wiki
|
||||
|
||||
@@ -208,6 +208,67 @@ YW change end */
|
||||
H.verbs |= /mob/living/proc/glow_toggle
|
||||
H.verbs |= /mob/living/proc/glow_color
|
||||
|
||||
<<<<<<< HEAD
|
||||
||||||| parent of 3558e37a44... Merge pull request #9751 from VOREStation/upstream-merge-7864
|
||||
/*
|
||||
//Allergen traits! Not available to any species with a base allergens var.
|
||||
/datum/trait/allergy_gluten
|
||||
name = "Allergy: Gluten"
|
||||
desc = "You're highly allergic to gluten proteins, which are found in most common grains. This trait cannot be taken by skrell or tajara."
|
||||
cost = 0
|
||||
custom_only = FALSE
|
||||
banned_species = list(SPECIES_SKRELL,SPECIES_TAJ)
|
||||
var_changes = list("allergens" = 16)
|
||||
excludes = list(/datum/trait/allergy_nuts,/datum/trait/allergy_soy)
|
||||
|
||||
/datum/trait/allergy_nuts
|
||||
name = "Allergy: Nuts"
|
||||
desc = "You're highly allergic to hard-shell seeds, such as peanuts. This trait cannot be taken by skrell or tajara."
|
||||
cost = 0
|
||||
custom_only = FALSE
|
||||
banned_species = list(SPECIES_SKRELL,SPECIES_TAJ)
|
||||
var_changes = list("allergens" = 64)
|
||||
excludes = list(/datum/trait/allergy_gluten,/datum/trait/allergy_soy)
|
||||
|
||||
/datum/trait/allergy_soy
|
||||
name = "Allergy: Soy"
|
||||
desc = "You're highly allergic to soybeans, and some other kinds of bean. This trait cannot be taken by skrell or tajara."
|
||||
cost = 0
|
||||
custom_only = FALSE
|
||||
banned_species = list(SPECIES_SKRELL,SPECIES_TAJ)
|
||||
var_changes = list("allergens" = 32)
|
||||
excludes = list(/datum/trait/allergy_gluten,/datum/trait/allergy_nuts)
|
||||
*/
|
||||
|
||||
=======
|
||||
|
||||
//Allergen traits! Not available to any species with a base allergens var.
|
||||
/datum/trait/allergy_gluten
|
||||
name = "Allergy: Gluten"
|
||||
desc = "You're highly allergic to gluten proteins, which are found in most common grains."
|
||||
cost = 0
|
||||
custom_only = FALSE
|
||||
var_changes = list("allergens" = 16)
|
||||
excludes = list(/datum/trait/allergy_nuts,/datum/trait/allergy_soy)
|
||||
|
||||
/datum/trait/allergy_nuts
|
||||
name = "Allergy: Nuts"
|
||||
desc = "You're highly allergic to hard-shell seeds, such as peanuts."
|
||||
cost = 0
|
||||
custom_only = FALSE
|
||||
var_changes = list("allergens" = 64)
|
||||
excludes = list(/datum/trait/allergy_gluten,/datum/trait/allergy_soy)
|
||||
|
||||
/datum/trait/allergy_soy
|
||||
name = "Allergy: Soy"
|
||||
desc = "You're highly allergic to soybeans, and some other kinds of bean."
|
||||
cost = 0
|
||||
custom_only = FALSE
|
||||
var_changes = list("allergens" = 32)
|
||||
excludes = list(/datum/trait/allergy_gluten,/datum/trait/allergy_nuts)
|
||||
|
||||
|
||||
>>>>>>> 3558e37a44... Merge pull request #9751 from VOREStation/upstream-merge-7864
|
||||
// Spicy Food Traits, from negative to positive.
|
||||
/datum/trait/spice_intolerance_extreme
|
||||
name = "Extreme Spice Intolerance"
|
||||
|
||||
@@ -82,6 +82,8 @@
|
||||
|
||||
var/nutriment_factor = 0
|
||||
var/strength = 10 // This is, essentially, units between stages - the lower, the stronger. Less fine tuning, more clarity.
|
||||
var/allergen_type = GENERIC // What potential allergens does this contain?
|
||||
var/allergen_factor = 0.5 // If the potential allergens are mixed and low-volume, they're a bit less dangerous. Needed for drinks because they're a single reagent compared to food which contains multiple seperate reagents.
|
||||
var/toxicity = 1
|
||||
|
||||
var/druggy = 0
|
||||
@@ -140,6 +142,9 @@
|
||||
if(halluci)
|
||||
M.hallucination = max(M.hallucination, halluci*3)
|
||||
|
||||
if(M.species.allergens & allergen_type)
|
||||
M.adjustToxLoss(((M.species.allergen_severity*allergen_factor)*4) * removed)
|
||||
|
||||
/datum/reagent/ethanol/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed)
|
||||
if(issmall(M)) removed *= 2
|
||||
M.adjust_nutrition(nutriment_factor * removed)
|
||||
@@ -184,6 +189,9 @@
|
||||
if(halluci)
|
||||
M.hallucination = max(M.hallucination, halluci)
|
||||
|
||||
if(M.species.allergens & allergen_type)
|
||||
M.adjustToxLoss((M.species.allergen_severity*allergen_factor) * removed)
|
||||
|
||||
/datum/reagent/ethanol/touch_obj(var/obj/O)
|
||||
if(istype(O, /obj/item/weapon/paper))
|
||||
var/obj/item/weapon/paper/paperaffected = O
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user