From 20e0c41995ad82c2010d7e84bcca206e6b7dd2c6 Mon Sep 17 00:00:00 2001 From: qwerltaz <69696513+qwerltaz@users.noreply.github.com> Date: Tue, 21 Oct 2025 11:46:09 +0200 Subject: [PATCH] goats eat kudzu again (#40220) * kudzu edible, food htn starts at peckish, no nutrition needed for npc to eat * fix kudzu tags * remove old stomach 2 from ruminant body * make kudzu nutrition non-zero * skip targeting food if nutrition is zero * move edible from baseKudzu --- Content.Server/NPC/Systems/NPCUtilitySystem.cs | 2 +- Content.Shared/Nutrition/Components/FoodComponent.cs | 7 ------- Content.Shared/Nutrition/EntitySystems/IngestionSystem.cs | 3 +-- Resources/Prototypes/Body/Prototypes/Animal/ruminant.yml | 1 - Resources/Prototypes/Entities/Objects/Misc/kudzu.yml | 8 +++++++- Resources/Prototypes/NPCs/nutrition.yml | 2 +- 6 files changed, 10 insertions(+), 13 deletions(-) diff --git a/Content.Server/NPC/Systems/NPCUtilitySystem.cs b/Content.Server/NPC/Systems/NPCUtilitySystem.cs index e8fe9e4c39..bc82e72692 100644 --- a/Content.Server/NPC/Systems/NPCUtilitySystem.cs +++ b/Content.Server/NPC/Systems/NPCUtilitySystem.cs @@ -185,7 +185,7 @@ public sealed class NPCUtilitySystem : EntitySystem return 0f; var nutrition = _ingestion.TotalNutrition(targetUid, owner); - if (nutrition <= 1.0f) + if (nutrition == 0.0f) return 0f; return 1f; diff --git a/Content.Shared/Nutrition/Components/FoodComponent.cs b/Content.Shared/Nutrition/Components/FoodComponent.cs index 5f1ec41717..bb135a4452 100644 --- a/Content.Shared/Nutrition/Components/FoodComponent.cs +++ b/Content.Shared/Nutrition/Components/FoodComponent.cs @@ -42,13 +42,6 @@ public sealed partial class FoodComponent : Component [DataField] public bool RequiresSpecialDigestion; - /// - /// Stomachs required to digest this entity. - /// Used to simulate 'ruminant' digestive systems (which can digest grass) - /// - [DataField] - public int RequiredStomachs = 1; - /// /// The localization identifier for the eat message. Needs a "food" entity argument passed to it. /// diff --git a/Content.Shared/Nutrition/EntitySystems/IngestionSystem.cs b/Content.Shared/Nutrition/EntitySystems/IngestionSystem.cs index d3271b7edb..d4050a17ce 100644 --- a/Content.Shared/Nutrition/EntitySystems/IngestionSystem.cs +++ b/Content.Shared/Nutrition/EntitySystems/IngestionSystem.cs @@ -118,8 +118,7 @@ public sealed partial class IngestionSystem : EntitySystem /// The entity who is trying to make this happen. /// The entity who is being made to ingest something. /// The entity that is trying to be ingested. - /// Bool that determines whethere this is a Try or a Can effectively. - /// When set to true, it tries to ingest, when false it checks if we can. + /// When set to true, it tries to ingest. When false, it only checks if we can. /// Returns true if we can ingest the item. private bool AttemptIngest(EntityUid user, EntityUid target, EntityUid ingested, bool ingest) { diff --git a/Resources/Prototypes/Body/Prototypes/Animal/ruminant.yml b/Resources/Prototypes/Body/Prototypes/Animal/ruminant.yml index cd3ab1fdd7..3a213e3cdf 100644 --- a/Resources/Prototypes/Body/Prototypes/Animal/ruminant.yml +++ b/Resources/Prototypes/Body/Prototypes/Animal/ruminant.yml @@ -10,7 +10,6 @@ organs: lungs: OrganAnimalLungs stomach: OrganAnimalRuminantStomach - stomach2: OrganAnimalRuminantStomach liver: OrganAnimalLiver heart: OrganAnimalHeart kidneys: OrganAnimalKidneys diff --git a/Resources/Prototypes/Entities/Objects/Misc/kudzu.yml b/Resources/Prototypes/Entities/Objects/Misc/kudzu.yml index 65d507daa5..5062ee4821 100644 --- a/Resources/Prototypes/Entities/Objects/Misc/kudzu.yml +++ b/Resources/Prototypes/Entities/Objects/Misc/kudzu.yml @@ -80,6 +80,7 @@ types: Heat: 0.5 - type: AtmosExposed + - type: Edible - type: Kudzu growthTickChance: 0.3 spreadChance: 0.4 @@ -100,7 +101,7 @@ food: reagents: - ReagentId: Nutriment - Quantity: 2 + Quantity: 0.1 - type: Tag tags: - Ruminant @@ -148,6 +149,9 @@ - CrystalCyan rarePrototypes: - AnomalyFloraBulb + - type: Tag + tags: + - Ruminant - type: entity id: KudzuFlowerAngry @@ -240,6 +244,7 @@ types: Heat: 3 - type: AtmosExposed + - type: Edible - type: SpeedModifierContacts walkSpeedModifier: 0.3 sprintSpeedModifier: 0.3 @@ -262,6 +267,7 @@ - type: Tag tags: - Meat + - Ruminant - type: entity name: dark haze diff --git a/Resources/Prototypes/NPCs/nutrition.yml b/Resources/Prototypes/NPCs/nutrition.yml index dea065c34f..b95552fa13 100644 --- a/Resources/Prototypes/NPCs/nutrition.yml +++ b/Resources/Prototypes/NPCs/nutrition.yml @@ -6,7 +6,7 @@ - !type:HTNPrimitiveTask preconditions: - !type:HungryPrecondition - minHungerState: Starving # See HungerThreshold enum + minHungerState: Peckish # See HungerThreshold enum operator: !type:UtilityOperator proto: NearbyFood -- 2.51.2