Chessistics/chessistics-engine/Events/WorldEvents.cs
Samuel Bouchet 2d1aea0a7a Snapshot campaign system progress before automation harness
Bundles in-flight work on the campaign/missions system (CampaignDef,
MissionDef, TerrainPatch, TransformerDef, MissionChecker, CampaignLoader,
FlavorBanner, transformer rules), plan files, and matching tests. Baseline
commit so the upcoming automation testing harness lands on a clean tree.
2026-04-16 21:22:49 +02:00

35 lines
2.1 KiB
C#

using Chessistics.Engine.Model;
namespace Chessistics.Engine.Events;
// Placement events (work in any phase)
public record PiecePlacedEvent(int PieceId, PieceKind Kind, Coords Start, Coords End) : IWorldEvent;
public record PieceRemovedEvent(int PieceId) : IWorldEvent;
public record PlacementRejectedEvent(PieceKind Kind, Coords Start, Coords End, string Reason) : IWorldEvent;
public record CommandRejectedEvent(string CommandType, string Reason) : IWorldEvent;
// Simulation lifecycle events
public record SimulationPausedEvent : IWorldEvent;
public record SimulationResumedEvent : IWorldEvent;
// Campaign events
public record CampaignLoadedEvent(string CampaignName, int MissionIndex) : IWorldEvent;
public record MissionCompleteEvent(int TurnNumber, int MissionIndex) : IWorldEvent;
public record MissionStartedEvent(int MissionIndex, int NewWidth, int NewHeight) : IWorldEvent;
public record TerrainExpandedEvent(int NewWidth, int NewHeight, IReadOnlyList<PatchCell> NewCells) : IWorldEvent;
public record PieceUnlockedEvent(PieceKind Kind, int Level) : IWorldEvent;
// Transformer events
public record CargoConvertedEvent(int TurnNumber, Coords TransformerCell, CargoType InputCargo, CargoType OutputCargo, int OutputAmount) : IWorldEvent;
// Turn events — all carry TurnNumber for animation grouping
public record TurnStartedEvent(int TurnNumber) : IWorldEvent;
public record PieceMovedEvent(int TurnNumber, int PieceId, Coords From, Coords To) : IWorldEvent;
public record PieceReturnedToStockEvent(int TurnNumber, int PieceId, PieceKind Kind, int? DestroyerPieceId, Coords Cell) : IWorldEvent;
public record CargoTransferredEvent(int TurnNumber, Coords From, Coords To, CargoType Type, int? GivingPieceId, int? ReceivingPieceId) : IWorldEvent;
public record CargoProducedEvent(int TurnNumber, Coords ProductionCell, CargoType Type) : IWorldEvent;
public record DemandProgressEvent(int TurnNumber, Coords DemandCell, string Name, int Current, int Required) : IWorldEvent;
public record TurnEndedEvent(int TurnNumber) : IWorldEvent;
// Drag & drop
public record PieceMovedByPlayerEvent(int PieceId, Coords OldStart, Coords OldEnd, Coords NewStart, Coords NewEnd) : IWorldEvent;