split CookingProvider out of CraftingProvider — fixes starvation
Player report: pawns starve even with harvested crops because cooking never happens. Root cause: CraftingProvider handled both crafting-skill and cooking-skill bills with priority 4, below Plant=5 and Chop=5 in Decision's tiebreaker. Pawns endlessly harvested + chopped instead of cooking the food already on the floor; raw +25 vegetable couldn't outpace HUNGER_DECAY × 3 pawns. CraftingProvider now filters bills to required_skill == &"crafting" only. New CookingProvider (category=&"cooking", priority=6) handles required_skill == &"cooking" bills (bread, meal_from_vegetables) with identical find/score logic including the ingredient2 buffer flow. pawn.work_priorities default now includes &"cooking": 3 (matches the 9-category design spec). decision.gd category-list comment updated. WorkPriorityMatrix gains a "Cook" column. MCP runtime verified: pawns now decide `cooking(pri=3) → Craft Veggie meal at Hearth` immediately after vegetables exist; 2 bread items appeared by tick 261 of a fresh boot. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
f30c7a858b
commit
87a7beb22b
6 changed files with 240 additions and 7 deletions
|
|
@ -44,8 +44,8 @@ static func pick_next_job(pawn, work_providers: Array) -> Job:
|
|||
# and need-threshold providers (eat/sleep/doctor fire when hunger/sleep
|
||||
# thresholds trigger, not via player priority). We skip the priority filter
|
||||
# for them so a pawn can never accidentally starve because the player set
|
||||
# &"eat" to OFF. The player-configurable list is the 7 work categories:
|
||||
# construction / chop / plant / mine / crafting / haul / clean
|
||||
# &"eat" to OFF. The player-configurable list is the 8 work categories:
|
||||
# construction / cooking / chop / plant / mine / crafting / haul / clean
|
||||
# Doctor IS in the matrix (player can opt a pawn out of doctor duty) but
|
||||
# the needs-driven "go heal yourself" path bypasses this filter at Layer 3.
|
||||
#
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue