2026-04-10 14:58:03 +02:00
|
|
|
using Chessistics.Engine.Model;
|
|
|
|
|
|
|
|
|
|
namespace Chessistics.Engine.Events;
|
|
|
|
|
|
2026-04-16 21:22:49 +02:00
|
|
|
// Placement events (work in any phase)
|
2026-04-10 14:58:03 +02:00
|
|
|
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;
|
2026-04-16 21:22:49 +02:00
|
|
|
|
|
|
|
|
// 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;
|
2026-04-10 14:58:03 +02:00
|
|
|
|
2026-04-10 21:44:12 +02:00
|
|
|
// Turn events — all carry TurnNumber for animation grouping
|
2026-04-10 14:58:03 +02:00
|
|
|
public record TurnStartedEvent(int TurnNumber) : IWorldEvent;
|
2026-04-10 21:44:12 +02:00
|
|
|
public record PieceMovedEvent(int TurnNumber, int PieceId, Coords From, Coords To) : IWorldEvent;
|
2026-04-16 21:22:49 +02:00
|
|
|
public record PieceReturnedToStockEvent(int TurnNumber, int PieceId, PieceKind Kind, int? DestroyerPieceId, Coords Cell) : IWorldEvent;
|
2026-04-10 21:44:12 +02:00
|
|
|
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;
|
2026-04-10 14:58:03 +02:00
|
|
|
public record TurnEndedEvent(int TurnNumber) : IWorldEvent;
|
2026-04-16 21:22:49 +02:00
|
|
|
|
|
|
|
|
// Drag & drop
|
|
|
|
|
public record PieceMovedByPlayerEvent(int PieceId, Coords OldStart, Coords OldEnd, Coords NewStart, Coords NewEnd) : IWorldEvent;
|