]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
goats eat kudzu again (#40220)
authorqwerltaz <69696513+qwerltaz@users.noreply.github.com>
Tue, 21 Oct 2025 09:46:09 +0000 (11:46 +0200)
committerGitHub <noreply@github.com>
Tue, 21 Oct 2025 09:46:09 +0000 (09:46 +0000)
* 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
Content.Shared/Nutrition/Components/FoodComponent.cs
Content.Shared/Nutrition/EntitySystems/IngestionSystem.cs
Resources/Prototypes/Body/Prototypes/Animal/ruminant.yml
Resources/Prototypes/Entities/Objects/Misc/kudzu.yml
Resources/Prototypes/NPCs/nutrition.yml

index e8fe9e4c39d503b5c6ac05b0ad120bd70a63e7e6..bc82e72692b9587e5dfbec8dbce171b28aa0baea 100644 (file)
@@ -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;
index 5f1ec4171798267acc1d78e5e87eff3d8e117920..bb135a4452bee4256a0ec62049776d610cc56026 100644 (file)
@@ -42,13 +42,6 @@ public sealed partial class FoodComponent : Component
     [DataField]
     public bool RequiresSpecialDigestion;
 
-    /// <summary>
-    ///     Stomachs required to digest this entity.
-    ///     Used to simulate 'ruminant' digestive systems (which can digest grass)
-    /// </summary>
-    [DataField]
-    public int RequiredStomachs = 1;
-
     /// <summary>
     /// The localization identifier for the eat message. Needs a "food" entity argument passed to it.
     /// </summary>
index d3271b7edbbb393df88348e60b303aff9bb79216..d4050a17ce0bdb6629259002bc60462e36be4447 100644 (file)
@@ -118,8 +118,7 @@ public sealed partial class IngestionSystem : EntitySystem
     /// <param name="user">The entity who is trying to make this happen.</param>
     /// <param name="target">The entity who is being made to ingest something.</param>
     /// <param name="ingested">The entity that is trying to be ingested.</param>
-    /// <param name="ingest">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.</param>
+    /// <param name="ingest"> When set to true, it tries to ingest. When false, it only checks if we can.</param>
     /// <returns>Returns true if we can ingest the item.</returns>
     private bool AttemptIngest(EntityUid user, EntityUid target, EntityUid ingested, bool ingest)
     {
index cd3ab1fdd78f61836b2c8aa00ffe95cb3103336f..3a213e3cdf093cf9d44deeca2e78390b1d864b82 100644 (file)
@@ -10,7 +10,6 @@
       organs:
         lungs: OrganAnimalLungs
         stomach: OrganAnimalRuminantStomach
-        stomach2: OrganAnimalRuminantStomach
         liver: OrganAnimalLiver
         heart: OrganAnimalHeart
         kidneys: OrganAnimalKidneys
index 65d507daa50cf33714de800d8e5c26f926074cce..5062ee4821fa7bdba99c20ded4e8a3852d5d2ca9 100644 (file)
@@ -80,6 +80,7 @@
             types:
               Heat: 0.5
     - type: AtmosExposed
+    - type: Edible
     - type: Kudzu
       growthTickChance: 0.3
       spreadChance: 0.4
         food:
           reagents:
           - ReagentId: Nutriment
-            Quantity: 2
+            Quantity: 0.1
     - type: Tag
       tags:
       - Ruminant
       - CrystalCyan
       rarePrototypes:
       - AnomalyFloraBulb
+    - type: Tag
+      tags:
+      - Ruminant
 
 - type: entity
   id: KudzuFlowerAngry
        types:
          Heat: 3
     - type: AtmosExposed
+    - type: Edible
     - type: SpeedModifierContacts
       walkSpeedModifier: 0.3
       sprintSpeedModifier: 0.3
     - type: Tag
       tags:
       - Meat
+      - Ruminant
 
 - type: entity
   name: dark haze
index dea065c34ffcaf49be852c3cc50ad1496c28b4ad..b95552fa13a53ffae9f26870455f6ca399a1f74f 100644 (file)
@@ -6,7 +6,7 @@
         - !type:HTNPrimitiveTask
           preconditions:
             - !type:HungryPrecondition
-              minHungerState: Starving  # See HungerThreshold enum
+              minHungerState: Peckish  # See HungerThreshold enum
           operator: !type:UtilityOperator
             proto: NearbyFood