fix six critical bugs from audit sprint
save/load round-trip: workbench bills, crop static-method, bed owner, wolf target now all survive reload via Bill.from_dict reconstruction, _spawn_crop using setup(), and a new _post_load_resolve_references pass. PlantProvider: sow path added; consumes 1 grain on a TILLED crop tile. CraftingProvider: ingredient2 supported via new KIND_DEPOSIT_AT_WB toil and Workbench.deposited_inputs buffer. Cremation pyre now actually consumes wood. HaulingProvider: per-item haul_retry_count + haul_rejected after 3 orphan passes; new EventBus.stockpile_layout_changed resets rejects on any player stockpile edit. Storyteller: 14 stubbed event effects implemented. New buff registry (add_buff/get_buff_multiplier/has_buff, day-prune, save/load) drives seasonal/resource events. New request_pawn_spawn signal + WANDERER table for arrivals. New SICK status + 3 mood thoughts. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
00cf8f445d
commit
d9638a4ea4
19 changed files with 711 additions and 101 deletions
|
|
@ -97,6 +97,15 @@ var tile: Vector2i = Vector2i.ZERO
|
|||
## carry indicator instead.
|
||||
var being_carried: bool = false
|
||||
|
||||
## Hauling-retry fallback (memory.md 2026-05-10 design lock).
|
||||
## Incremented each sim-tick pass in which HaulingProvider finds no valid
|
||||
## destination for this item. After MAX_HAUL_RETRIES failures the provider
|
||||
## stops offering the item and sets haul_rejected = true, surfacing the
|
||||
## "no_stockpile_accepts" alert. Both fields reset when stockpile layout changes.
|
||||
const MAX_HAUL_RETRIES: int = 3
|
||||
var haul_retry_count: int = 0
|
||||
var haul_rejected: bool = false
|
||||
|
||||
|
||||
# ── lifecycle ─────────────────────────────────────────────────────────────────
|
||||
|
||||
|
|
@ -166,6 +175,8 @@ func to_dict() -> Dictionary:
|
|||
"tile_x": tile.x,
|
||||
"tile_y": tile.y,
|
||||
"quality": int(quality),
|
||||
"haul_retry_count": haul_retry_count,
|
||||
"haul_rejected": haul_rejected,
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -180,6 +191,9 @@ static func from_dict(d: Dictionary) -> Dictionary:
|
|||
"tile_x": int(d.get("tile_x", 0)),
|
||||
"tile_y": int(d.get("tile_y", 0)),
|
||||
"quality": int(d.get("quality", Quality.NORMAL)),
|
||||
# Hauling-retry fields — default 0/false so older v2 saves load cleanly.
|
||||
"haul_retry_count": int(d.get("haul_retry_count", 0)),
|
||||
"haul_rejected": bool(d.get("haul_rejected", false)),
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue