2026-04-10 14:58:03 +02:00
|
|
|
namespace Chessistics.Engine.Model;
|
|
|
|
|
|
|
|
|
|
public class DemandState
|
|
|
|
|
{
|
|
|
|
|
public DemandDef Definition { get; }
|
|
|
|
|
public int ReceivedCount { get; set; }
|
2026-04-16 21:22:49 +02:00
|
|
|
public int MissionIndex { get; }
|
2026-04-10 14:58:03 +02:00
|
|
|
|
2026-04-16 21:22:49 +02:00
|
|
|
public DemandState(DemandDef definition, int missionIndex = 0)
|
2026-04-10 14:58:03 +02:00
|
|
|
{
|
|
|
|
|
Definition = definition;
|
2026-04-16 21:22:49 +02:00
|
|
|
MissionIndex = missionIndex;
|
2026-04-10 14:58:03 +02:00
|
|
|
ReceivedCount = 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool IsSatisfied => ReceivedCount >= Definition.Amount;
|
|
|
|
|
public Coords Position => Definition.Position;
|
|
|
|
|
public string Name => Definition.Name;
|
|
|
|
|
public CargoType Cargo => Definition.Cargo;
|
|
|
|
|
public int Required => Definition.Amount;
|
|
|
|
|
public int Deadline => Definition.Deadline;
|
|
|
|
|
}
|