implimentation (#17713)

This commit is contained in:
Will
2025-05-15 22:22:18 -07:00
committed by GitHub
parent e3fae9d582
commit 1711fcf3d7
5 changed files with 71 additions and 18 deletions
@@ -1167,22 +1167,6 @@
else //heal in the dark
heal_overall_damage(1,1)
// nutrition decrease
if(nutrition <= 0 && species.shrinks && size_multiplier > RESIZE_TINY)
nutrition = 0.1
if(nutrition > 0 && stat != DEAD)
var/nutrition_reduction = species.hunger_factor
for(var/datum/modifier/mod in modifiers)
if(!isnull(mod.metabolism_percent))
nutrition_reduction *= mod.metabolism_percent
if(nutrition > 1000 && species.grows) //Removing the strict check against normal max/min size to support dorms/VR oversizing
nutrition_reduction *= 5
resize(size_multiplier+0.01, animate = FALSE, uncapped = has_large_resize_bounds()) //Bringing this code in line with micro and macro shrooms
if(nutrition < 50 && species.shrinks)
nutrition_reduction *= 0.3
resize(size_multiplier-0.01, animate = FALSE, uncapped = has_large_resize_bounds()) //Bringing this code in line with micro and macro shrooms
adjust_nutrition(-nutrition_reduction)
if(noisy == TRUE && nutrition < 250 && prob(10))
var/sound/growlsound = sound(get_sfx("hunger_sounds"))
var/growlmultiplier = 100 - (nutrition / 250 * 100)
@@ -244,8 +244,6 @@
var/gluttonous // Can eat some mobs. 1 for mice, 2 for monkeys, 3 for people.
var/soft_landing = FALSE // Can fall down and land safely on small falls.
var/shrinks = FALSE // If we shrink when we have no nutrition. Not added but here for downstream's sake.
var/grows = FALSE // Same as above but if we grow when >1000 nutrition.
var/crit_mod = 1 // Used for when we go unconscious. Used downstream.
var/list/env_traits = list()
var/pixel_offset_x = 0 // Used for offsetting 64x64 and up icons.
@@ -1692,3 +1692,19 @@
..()
var/datum/component/waddle_trait/G = H.GetComponent(added_component_path)
G.waddling = trait_prefs["waddler"]
/datum/trait/neutral/nutritiongrow
name = "Growing"
desc = "After you consume enough nutrition, you start to slowly grow while metabolizing nutrition faster."
excludes = list(/datum/trait/neutral/nutritionshrink)
cost = 0
hidden = TRUE //Disabled on Virgo
added_component_path = /datum/component/nutrition_size_change/growing
/datum/trait/neutral/nutritionshrink
name = "Shrinking"
desc = "If you don't eat enough, your body starts shrinking to make up the difference!"
excludes = list(/datum/trait/neutral/nutritiongrow)
cost = 0
hidden = TRUE //Disabled on Virgo
added_component_path = /datum/component/nutrition_size_change/shrinking