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
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
organs:
|
||||
lungs: OrganAnimalLungs
|
||||
stomach: OrganAnimalRuminantStomach
|
||||
stomach2: OrganAnimalRuminantStomach
|
||||
liver: OrganAnimalLiver
|
||||
heart: OrganAnimalHeart
|
||||
kidneys: OrganAnimalKidneys
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
- !type:HTNPrimitiveTask
|
||||
preconditions:
|
||||
- !type:HungryPrecondition
|
||||
minHungerState: Starving # See HungerThreshold enum
|
||||
minHungerState: Peckish # See HungerThreshold enum
|
||||
operator: !type:UtilityOperator
|
||||
proto: NearbyFood
|
||||
|
||||
|
||||
Reference in New Issue
Block a user