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;
|
return 0f;
|
||||||
|
|
||||||
var nutrition = _ingestion.TotalNutrition(targetUid, owner);
|
var nutrition = _ingestion.TotalNutrition(targetUid, owner);
|
||||||
if (nutrition <= 1.0f)
|
if (nutrition == 0.0f)
|
||||||
return 0f;
|
return 0f;
|
||||||
|
|
||||||
return 1f;
|
return 1f;
|
||||||
|
|||||||
@@ -42,13 +42,6 @@ public sealed partial class FoodComponent : Component
|
|||||||
[DataField]
|
[DataField]
|
||||||
public bool RequiresSpecialDigestion;
|
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>
|
/// <summary>
|
||||||
/// The localization identifier for the eat message. Needs a "food" entity argument passed to it.
|
/// The localization identifier for the eat message. Needs a "food" entity argument passed to it.
|
||||||
/// </summary>
|
/// </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="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="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="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.
|
/// <param name="ingest"> When set to true, it tries to ingest. When false, it only checks if we can.</param>
|
||||||
/// When set to true, it tries to ingest, when false it checks if we can.</param>
|
|
||||||
/// <returns>Returns true if we can ingest the item.</returns>
|
/// <returns>Returns true if we can ingest the item.</returns>
|
||||||
private bool AttemptIngest(EntityUid user, EntityUid target, EntityUid ingested, bool ingest)
|
private bool AttemptIngest(EntityUid user, EntityUid target, EntityUid ingested, bool ingest)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -10,7 +10,6 @@
|
|||||||
organs:
|
organs:
|
||||||
lungs: OrganAnimalLungs
|
lungs: OrganAnimalLungs
|
||||||
stomach: OrganAnimalRuminantStomach
|
stomach: OrganAnimalRuminantStomach
|
||||||
stomach2: OrganAnimalRuminantStomach
|
|
||||||
liver: OrganAnimalLiver
|
liver: OrganAnimalLiver
|
||||||
heart: OrganAnimalHeart
|
heart: OrganAnimalHeart
|
||||||
kidneys: OrganAnimalKidneys
|
kidneys: OrganAnimalKidneys
|
||||||
|
|||||||
@@ -80,6 +80,7 @@
|
|||||||
types:
|
types:
|
||||||
Heat: 0.5
|
Heat: 0.5
|
||||||
- type: AtmosExposed
|
- type: AtmosExposed
|
||||||
|
- type: Edible
|
||||||
- type: Kudzu
|
- type: Kudzu
|
||||||
growthTickChance: 0.3
|
growthTickChance: 0.3
|
||||||
spreadChance: 0.4
|
spreadChance: 0.4
|
||||||
@@ -100,7 +101,7 @@
|
|||||||
food:
|
food:
|
||||||
reagents:
|
reagents:
|
||||||
- ReagentId: Nutriment
|
- ReagentId: Nutriment
|
||||||
Quantity: 2
|
Quantity: 0.1
|
||||||
- type: Tag
|
- type: Tag
|
||||||
tags:
|
tags:
|
||||||
- Ruminant
|
- Ruminant
|
||||||
@@ -148,6 +149,9 @@
|
|||||||
- CrystalCyan
|
- CrystalCyan
|
||||||
rarePrototypes:
|
rarePrototypes:
|
||||||
- AnomalyFloraBulb
|
- AnomalyFloraBulb
|
||||||
|
- type: Tag
|
||||||
|
tags:
|
||||||
|
- Ruminant
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
id: KudzuFlowerAngry
|
id: KudzuFlowerAngry
|
||||||
@@ -240,6 +244,7 @@
|
|||||||
types:
|
types:
|
||||||
Heat: 3
|
Heat: 3
|
||||||
- type: AtmosExposed
|
- type: AtmosExposed
|
||||||
|
- type: Edible
|
||||||
- type: SpeedModifierContacts
|
- type: SpeedModifierContacts
|
||||||
walkSpeedModifier: 0.3
|
walkSpeedModifier: 0.3
|
||||||
sprintSpeedModifier: 0.3
|
sprintSpeedModifier: 0.3
|
||||||
@@ -262,6 +267,7 @@
|
|||||||
- type: Tag
|
- type: Tag
|
||||||
tags:
|
tags:
|
||||||
- Meat
|
- Meat
|
||||||
|
- Ruminant
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
name: dark haze
|
name: dark haze
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
- !type:HTNPrimitiveTask
|
- !type:HTNPrimitiveTask
|
||||||
preconditions:
|
preconditions:
|
||||||
- !type:HungryPrecondition
|
- !type:HungryPrecondition
|
||||||
minHungerState: Starving # See HungerThreshold enum
|
minHungerState: Peckish # See HungerThreshold enum
|
||||||
operator: !type:UtilityOperator
|
operator: !type:UtilityOperator
|
||||||
proto: NearbyFood
|
proto: NearbyFood
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user