mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-13 16:13:19 +01:00
Nutrient Split and Diet Flag
Adds Protein and Plant-matter reagents, nutritional values of 15 Reduces nutritional value of Nutriment to 12, down from 15 Adds new flag defines for racial diets, and new dietflags var to species (must be set manually in the species definition, otherwise it will be null) Assigns each species their respective diet's flag: - Carnivores: Unathi, Slime People - Omnivores: Human, Tajaran, Kidan, Vox, IPC, Shadowpeople, Golems, Plasmaman, Nucleation, Vox Armalis - Herbivores: Skrell, Diona, Grey, Wryn Adds checks to all nutrient on_mob_life procs to handle simple_animals versus carbon/human mobs - Simple animals will heal from any nutrient source, but don't gain nutritional value since they don't appear to deplete it Adds check to Nutriment on_mob_life proc to ensure that the diet for a species has been set - Failure to set a diet flag will prevent the species from benefitting from ANY nutrients, while metabolizing the reagents normally - This is largely for ensuring the species is properly defined Adds checks to Protein and Plant-matter on_mob_life procs to handle incompatible diets - Ingesting Protein does not benefit Herbivores, but will metabolize out of the body normally -Ingesting Plant-matter does not benefit Carnivores, but will metabolize out of the body normally
This commit is contained in:
@@ -60,6 +60,11 @@
|
||||
#define HAS_SKIN_COLOR 32
|
||||
#define TAIL_WAGGING 64
|
||||
|
||||
//Species Diet Flags
|
||||
#define DIET_CARN 1
|
||||
#define DIET_OMNI 2
|
||||
#define DIET_HERB 4
|
||||
|
||||
|
||||
//bitflags for door switches.
|
||||
#define OPEN 1
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
)
|
||||
|
||||
flags = IS_WHITELISTED | HAS_LIPS | HAS_UNDERWEAR | NO_BREATHE | HAS_SKIN_COLOR | NO_SCAN | NO_SCAN | HIVEMIND
|
||||
|
||||
dietflags = DIET_HERB //bees feed off nectar, so bee people feed off plants too
|
||||
|
||||
base_color = "#704300"
|
||||
flesh_color = "#704300"
|
||||
@@ -88,6 +88,7 @@
|
||||
burn_mod = 4 // holy shite, poor guys wont survive half a second cooking smores
|
||||
brute_mod = 2 // damn, double wham, double dam
|
||||
flags = IS_WHITELISTED | NO_BREATHE | NO_BLOOD | NO_PAIN | HAS_LIPS | NO_SCAN
|
||||
dietflags = DIET_OMNI //still human at their core, so they maintain their eating habits and diet
|
||||
|
||||
has_organ = list(
|
||||
"heart" = /obj/item/organ/heart,
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
default_language = "Galactic Common"
|
||||
flags = NO_BREATHE | NO_PAIN | NO_BLOOD | NO_SCAN
|
||||
dietflags = DIET_OMNI //golems can eat anything because they are magic or something
|
||||
|
||||
blood_color = "#515573"
|
||||
flesh_color = "#137E8F"
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
unarmed_type = /datum/unarmed_attack/punch
|
||||
|
||||
flags = IS_WHITELISTED | NO_BLOOD
|
||||
dietflags = DIET_OMNI
|
||||
|
||||
//default_mutations=list(SKELETON) // This screws things up
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
flags = NO_BLOOD | NO_BREATHE | NO_SCAN
|
||||
bodyflags = FEET_NOSLIP
|
||||
dietflags = DIET_OMNI //the mutation process allowed you to now digest all foods regardless of initial race
|
||||
|
||||
/datum/species/shadow/handle_death(var/mob/living/carbon/human/H)
|
||||
H.dust()
|
||||
@@ -53,6 +53,7 @@
|
||||
var/flags = 0 // Various specific features.
|
||||
var/bloodflags=0
|
||||
var/bodyflags=0
|
||||
var/dietflags = 0 // Make sure you set this, otherwise it won't be able to digest a lot of foods
|
||||
|
||||
var/list/abilities = list() // For species-derived or admin-given powers
|
||||
|
||||
@@ -321,6 +322,7 @@
|
||||
path = /mob/living/carbon/human/human
|
||||
flags = HAS_LIPS | HAS_UNDERWEAR | CAN_BE_FAT
|
||||
bodyflags = HAS_SKIN_TONE
|
||||
dietflags = DIET_OMNI
|
||||
unarmed_type = /datum/unarmed_attack/punch
|
||||
blurb = "Humanity originated in the Sol system, and over the last five centuries has spread \
|
||||
colonies across a wide swathe of space. They hold a wide range of forms and creeds.<br/><br/> \
|
||||
@@ -348,6 +350,7 @@
|
||||
|
||||
flags = HAS_LIPS | HAS_UNDERWEAR
|
||||
bodyflags = FEET_CLAWS | HAS_TAIL | HAS_SKIN_COLOR | TAIL_WAGGING
|
||||
dietflags = DIET_CARN
|
||||
|
||||
cold_level_1 = 280 //Default 260 - Lower is better
|
||||
cold_level_2 = 220 //Default 200
|
||||
@@ -397,6 +400,7 @@
|
||||
|
||||
flags = HAS_LIPS | HAS_UNDERWEAR | CAN_BE_FAT
|
||||
bodyflags = FEET_PADDED | HAS_TAIL | HAS_SKIN_COLOR | TAIL_WAGGING
|
||||
dietflags = DIET_OMNI
|
||||
|
||||
flesh_color = "#AFA59E"
|
||||
base_color = "#333333"
|
||||
@@ -423,6 +427,7 @@
|
||||
|
||||
flags = HAS_LIPS | HAS_UNDERWEAR
|
||||
bodyflags = HAS_SKIN_COLOR
|
||||
dietflags = DIET_HERB
|
||||
|
||||
flesh_color = "#8CD7A3"
|
||||
blood_color = "#1D2CBF"
|
||||
@@ -461,6 +466,7 @@
|
||||
poison_type = "oxygen"
|
||||
|
||||
flags = NO_SCAN | IS_WHITELISTED
|
||||
dietflags = DIET_OMNI
|
||||
|
||||
blood_color = "#2299FC"
|
||||
flesh_color = "#808D11"
|
||||
@@ -514,6 +520,7 @@
|
||||
poison_type = "oxygen"
|
||||
|
||||
flags = NO_SCAN | NO_BLOOD | HAS_TAIL | NO_PAIN | IS_WHITELISTED
|
||||
dietflags = DIET_OMNI //should inherit this from vox, this is here just in case
|
||||
|
||||
blood_color = "#2299FC"
|
||||
flesh_color = "#808D11"
|
||||
@@ -546,6 +553,7 @@
|
||||
|
||||
flags = IS_WHITELISTED
|
||||
bodyflags = FEET_CLAWS
|
||||
dietflags = DIET_OMNI
|
||||
|
||||
blood_color = "#FB9800"
|
||||
|
||||
@@ -563,6 +571,7 @@
|
||||
flags = IS_WHITELISTED | NO_BREATHE | HAS_LIPS | NO_INTORGANS | NO_SCAN
|
||||
bodyflags = HAS_SKIN_COLOR
|
||||
bloodflags = BLOOD_SLIME
|
||||
dietflags = DIET_CARN
|
||||
|
||||
//ventcrawler = 1 //ventcrawling commented out
|
||||
|
||||
@@ -587,6 +596,7 @@
|
||||
primitive = /mob/living/carbon/monkey // TODO
|
||||
|
||||
flags = IS_WHITELISTED | HAS_LIPS | HAS_UNDERWEAR | CAN_BE_FAT
|
||||
dietflags = DIET_HERB
|
||||
|
||||
blood_color = "#A200FF"
|
||||
|
||||
@@ -634,6 +644,7 @@
|
||||
water and other radiation."
|
||||
|
||||
flags = NO_BREATHE | REQUIRE_LIGHT | IS_PLANT | RAD_ABSORB | NO_BLOOD | NO_PAIN
|
||||
dietflags = DIET_HERB //Diona regenerate nutrition in light, but could assimilate plantmatter if they ingest it
|
||||
|
||||
body_temperature = T0C + 15 //make the plant people have a bit lower body temperature, why not
|
||||
|
||||
@@ -719,6 +730,7 @@
|
||||
synth_temp_gain = 10 //this should cause IPCs to stabilize at ~80 C in a 20 C environment.
|
||||
|
||||
flags = IS_WHITELISTED | NO_BREATHE | NO_SCAN | NO_BLOOD | NO_PAIN | IS_SYNTHETIC | NO_INTORGANS
|
||||
dietflags = DIET_OMNI //IPCs can't eat, this is here for the sake of standardized code
|
||||
blood_color = "#1F181F"
|
||||
flesh_color = "#AAAAAA"
|
||||
|
||||
|
||||
@@ -1485,10 +1485,31 @@ datum
|
||||
/////////////////////////Food Reagents////////////////////////////
|
||||
// Part of the food code. Nutriment is used instead of the old "heal_amt" code. Also is where all the food
|
||||
// condiments, additives, and such go.
|
||||
nutriment
|
||||
nutriment // Pure nutriment, universally digestable and thus slightly less effective
|
||||
name = "Nutriment"
|
||||
id = "nutriment"
|
||||
description = "All the vitamins, minerals, and carbohydrates the body needs in pure form."
|
||||
description = "A questionable mixture of various pure nutrients commonly found in processed foods."
|
||||
reagent_state = SOLID
|
||||
nutriment_factor = 12 * REAGENTS_METABOLISM
|
||||
color = "#664330" // rgb: 102, 67, 48
|
||||
|
||||
on_mob_life(var/mob/living/M as mob)
|
||||
if(!M) M = holder.my_atom
|
||||
if(!(M.mind in ticker.mode.vampires))
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.species && H.species.dietflags) //Make sure the species has it's dietflag set, otherwise it can't digest any nutrients
|
||||
H.nutrition += nutriment_factor // For hunger and fatness
|
||||
if(prob(50)) M.heal_organ_damage(1,0)
|
||||
if(istype(M,/mob/living/simple_animal)) //Any nutrients can heal simple animals
|
||||
if(prob(50)) M.heal_organ_damage(1,0)
|
||||
..()
|
||||
return
|
||||
|
||||
protein // Meat-based protein, digestable by carnivores and omnivores, worthless to herbivores
|
||||
name = "Protein"
|
||||
id = "protein"
|
||||
description = "Various essential proteins and fats commonly found in animal flesh and blood."
|
||||
reagent_state = SOLID
|
||||
nutriment_factor = 15 * REAGENTS_METABOLISM
|
||||
color = "#664330" // rgb: 102, 67, 48
|
||||
@@ -1496,8 +1517,34 @@ datum
|
||||
on_mob_life(var/mob/living/M as mob)
|
||||
if(!M) M = holder.my_atom
|
||||
if(!(M.mind in ticker.mode.vampires))
|
||||
M.nutrition += nutriment_factor // For hunger and fatness
|
||||
if(prob(50)) M.heal_organ_damage(1,0)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.species && H.species.dietflags && !(H.species.dietflags & DIET_HERB)) //Make sure the species has it's dietflag set, otherwise it can't digest any nutrients
|
||||
H.nutrition += nutriment_factor // For hunger and fatness
|
||||
if(prob(50)) M.heal_organ_damage(1,0)
|
||||
if(istype(M,/mob/living/simple_animal)) //Any nutrients can heal simple animals
|
||||
if(prob(50)) M.heal_organ_damage(1,0)
|
||||
..()
|
||||
return
|
||||
|
||||
plantmatter // Plant-based biomatter, digestable by herbivores and omnivores, worthless to carnivores
|
||||
name = "Plant-matter"
|
||||
id = "plantmatter"
|
||||
description = "Vitamin-rich fibers and natural sugars commonly found in fresh produce."
|
||||
reagent_state = SOLID
|
||||
nutriment_factor = 15 * REAGENTS_METABOLISM
|
||||
color = "#664330" // rgb: 102, 67, 48
|
||||
|
||||
on_mob_life(var/mob/living/M as mob)
|
||||
if(!M) M = holder.my_atom
|
||||
if(!(M.mind in ticker.mode.vampires))
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.species && H.species.dietflags && !(H.species.dietflags & DIET_CARN)) //Make sure the species has it's dietflag set, otherwise it can't digest any nutrients
|
||||
H.nutrition += nutriment_factor // For hunger and fatness
|
||||
if(prob(50)) M.heal_organ_damage(1,0)
|
||||
if(istype(M,/mob/living/simple_animal)) //Any nutrients can heal simple animals
|
||||
if(prob(50)) M.heal_organ_damage(1,0)
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user