feat: add paired goat care

This commit is contained in:
Rijad Zuzo
2026-07-30 23:03:15 +02:00
parent 5511c295a5
commit d950c3da68
19 changed files with 541 additions and 61 deletions
+3 -3
View File
@@ -24,7 +24,7 @@ func select_action(
all_npcs: Array = [],
opportunity_helper: OpportunityHelperResult = null,
population_view: SimulationPopulationView = null,
animal_feed_name: String = ""
animal_feed_available: bool = false
) -> ActionSelectionResult:
if npc.is_dead:
return null
@@ -127,13 +127,13 @@ func select_action(
return ActionSelectionResult.new(
SimulationIds.ACTION_REST, -1.0, "Energy is below the rest threshold"
)
if not animal_feed_name.is_empty():
if animal_feed_available:
var feed_definition := SimulationDefinitions.get_action(SimulationIds.ACTION_FEED_ANIMAL)
if _get_cost_rejection(feed_definition, village).is_empty():
return ActionSelectionResult.new(
SimulationIds.ACTION_FEED_ANIMAL,
-1.0,
"%s is hungry; pantry food is available" % animal_feed_name
"A hungry animal is available; pantry food is available"
)
if village.food <= RELATIONSHIP_AID_PANTRY_THRESHOLD and relationship_system != null:
var trusted_starving_npc: SimNPC = relationship_system.get_trusted_starving_subject(