Chessistics/chessistics-engine/Model
Samuel Bouchet 8a377c2e41 Add recurring-demand mode with shortage tracking
DemandDef gains optional ConsumptionPerTurn and SustainTurns. When
ConsumptionPerTurn > 0 the demand maintains a buffer filled by
deliveries and drained each turn. Shortage fires the first turn the
buffer can't cover consumption; it clears when the buffer refills.
SustainedTurns counts consecutive non-shortage turns, and IsSatisfied
flips to true once it meets SustainTurns — so the victory condition
becomes "no shortage for N consecutive turns" as soon as a mission opts
in. Classic demands (ConsumptionPerTurn = 0) behave exactly as before.

TurnExecutor runs the consumption sub-phase after transfers. Two new
events (DemandShortageStarted / DemandShortageCleared) let the
presentation surface the state later. BoardSnapshot + CampaignLoader
carry the new fields; no existing mission opts in yet, so
campaign_01.json is unaffected.
2026-04-17 22:39:28 +02:00
..
BoardSnapshot.cs Add recurring-demand mode with shortage tracking 2026-04-17 22:39:28 +02:00
BoardSnapshot.cs.uid Add technical files 2026-04-10 17:14:09 +02:00
BoardState.cs Add QuickSave/QuickLoad with full state restore and visual rebuild 2026-04-17 22:10:06 +02:00
BoardState.cs.uid Add technical files 2026-04-10 17:14:09 +02:00
CampaignDef.cs Snapshot campaign system progress before automation harness 2026-04-16 21:22:49 +02:00
CampaignDef.cs.uid Snapshot campaign system progress before automation harness 2026-04-16 21:22:49 +02:00
CampaignState.cs Snapshot campaign system progress before automation harness 2026-04-16 21:22:49 +02:00
CampaignState.cs.uid Snapshot campaign system progress before automation harness 2026-04-16 21:22:49 +02:00
CargoType.cs Snapshot campaign system progress before automation harness 2026-04-16 21:22:49 +02:00
CargoType.cs.uid Add technical files 2026-04-10 17:14:09 +02:00
CellType.cs Snapshot campaign system progress before automation harness 2026-04-16 21:22:49 +02:00
CellType.cs.uid Add technical files 2026-04-10 17:14:09 +02:00
Coords.cs Initial commit: Chessistics prototype v0.3 2026-04-10 14:58:03 +02:00
Coords.cs.uid Add technical files 2026-04-10 17:14:09 +02:00
DemandDef.cs Add recurring-demand mode with shortage tracking 2026-04-17 22:39:28 +02:00
DemandDef.cs.uid Add technical files 2026-04-10 17:14:09 +02:00
DemandState.cs Add recurring-demand mode with shortage tracking 2026-04-17 22:39:28 +02:00
DemandState.cs.uid Add technical files 2026-04-10 17:14:09 +02:00
LevelDef.cs Initial commit: Chessistics prototype v0.3 2026-04-10 14:58:03 +02:00
LevelDef.cs.uid Add technical files 2026-04-10 17:14:09 +02:00
Metrics.cs Initial commit: Chessistics prototype v0.3 2026-04-10 14:58:03 +02:00
Metrics.cs.uid Add technical files 2026-04-10 17:14:09 +02:00
MissionDef.cs Snapshot campaign system progress before automation harness 2026-04-16 21:22:49 +02:00
MissionDef.cs.uid Snapshot campaign system progress before automation harness 2026-04-16 21:22:49 +02:00
PieceKind.cs Phase 5: Dame (Queen) piece and network levels 7-8 2026-04-10 23:24:14 +02:00
PieceKind.cs.uid Add technical files 2026-04-10 17:14:09 +02:00
PieceRules.cs Phase 5: Dame (Queen) piece and network levels 7-8 2026-04-10 23:24:14 +02:00
PieceRules.cs.uid Add technical files 2026-04-10 17:14:09 +02:00
PieceState.cs Add QuickSave/QuickLoad with full state restore and visual rebuild 2026-04-17 22:10:06 +02:00
PieceState.cs.uid Add technical files 2026-04-10 17:14:09 +02:00
PieceStock.cs Overhaul turn mechanics, collision destruction, and visual animations 2026-04-10 21:44:12 +02:00
PieceStock.cs.uid Add technical files 2026-04-10 17:14:09 +02:00
PieceUpgrade.cs Snapshot campaign system progress before automation harness 2026-04-16 21:22:49 +02:00
PieceUpgrade.cs.uid Snapshot campaign system progress before automation harness 2026-04-16 21:22:49 +02:00
ProductionDef.cs Overhaul turn mechanics, collision destruction, and visual animations 2026-04-10 21:44:12 +02:00
ProductionDef.cs.uid Add technical files 2026-04-10 17:14:09 +02:00
SimPhase.cs Snapshot campaign system progress before automation harness 2026-04-16 21:22:49 +02:00
SimPhase.cs.uid Add technical files 2026-04-10 17:14:09 +02:00
TerrainPatch.cs Snapshot campaign system progress before automation harness 2026-04-16 21:22:49 +02:00
TerrainPatch.cs.uid Snapshot campaign system progress before automation harness 2026-04-16 21:22:49 +02:00
TransformerDef.cs Snapshot campaign system progress before automation harness 2026-04-16 21:22:49 +02:00
TransformerDef.cs.uid Snapshot campaign system progress before automation harness 2026-04-16 21:22:49 +02:00
WorldSave.cs Add QuickSave/QuickLoad with full state restore and visual rebuild 2026-04-17 22:10:06 +02:00