implement waves

This commit is contained in:
2026-04-20 14:10:01 +02:00
parent 65de4ddc5c
commit 498b97db20
17 changed files with 1798 additions and 18 deletions

View File

@@ -52,6 +52,17 @@ struct ConstructionSite
Tick completesAt = 0; // 0 = queued but not yet started
};
// Weapon state for stationary structures (defence stations).
// Distinct from Ship::Weapon; stations have no movement intent.
struct StationWeapon
{
float damage;
float range;
float fireRateHz;
float cooldownTicks;
std::optional<EntityId> currentTarget;
};
// A fully constructed, operational building.
struct Building
{
@@ -73,4 +84,7 @@ struct Building
std::vector<Port> outputPorts;
std::vector<Port> inputPorts; // perimeter tiles (minus output-port tiles),
// direction pointing INTO building
// Set only for defence stations; nullopt for all other building types.
std::optional<StationWeapon> weapon;
};