Add real farm worker harvesting

This commit is contained in:
CoalGov Deploy
2026-05-06 02:34:52 +00:00
parent 3fb2b5c323
commit cf0a71f900
5 changed files with 144 additions and 7 deletions

View File

@@ -73,4 +73,4 @@ Craft a CoalGov Super Furnace with a furnace in the center and stone in the eigh
* /cgnpc haggle <id> <buy|sell> <material> <amount> <offer> - negotiate with a trader.
* /cgnpc list - list NPC zones and CoalGov NPCs.
Worker roles are matched from the NPC name. By default, a worker named ''Farmer'' produces wheat, a worker named ''Baker'' consumes wheat to produce bread, and workers move surplus output to traders in the same NPC zone.
Worker roles are matched from the NPC name. By default, a worker named ''Farmer'' harvests and replants mature crops in its zone, a worker named ''Baker'' consumes wheat to produce bread, and workers move surplus output to traders in the same NPC zone.

View File

@@ -18,7 +18,8 @@ Create workers and a trader in that zone:
The default supply chain is:
* Farmer produces WHEAT.
* Farmer scans the farm zone for mature WHEAT, CARROTS, POTATOES, and BEETROOTS.
* Farmer walks to mature crops, harvests drops into NPC inventory, and replants if it has the seed or crop item.
* Baker pulls WHEAT from same-zone NPC inventories.
* Baker consumes 3 WHEAT to produce 2 BREAD.
* Workers keep a reserve and move surplus output to same-zone traders.
@@ -38,13 +39,24 @@ Worker roles are matched by NPC name under ''npc.worker.roles''. For example, an
tick_interval_seconds: 20
roles:
farmer:
behavior: FARM
output_material: WHEAT
output_amount: 4
crops:
- WHEAT
- CARROTS
- POTATOES
- BEETROOTS
replant: true
baker:
behavior: CRAFT
output_material: BREAD
output_amount: 2
inputs:
WHEAT: 3
farm:
action_distance: 3.0
max_scan_blocks: 512
supply_chain:
max_transfer_per_tick: 64
source_reserve: 16