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

@@ -71,6 +71,27 @@ public:
// Increase a building's HP by amount, clamped to maxHp.
void healBuilding(EntityId id, float amount);
// Reduce a building's HP by amount; hp may go below 0 (step 9 processes deaths).
void damageBuilding(EntityId id, float amount);
// Bypass the construction queue and create a fully-operational Building
// immediately. Used for pre-placed structures (HQ, defence stations).
// surfaceMask comes from the relevant config struct.
EntityId placeImmediate(BuildingType type,
const std::vector<std::string>& surfaceMask,
QPoint anchor, Rotation rotation,
float hp, float maxHp);
// Remove an operational building by id without refund (used for deaths).
// Returns true if found and removed.
bool removeBuilding(EntityId id);
// Set the weapon component on an already-placed defence station.
void initStationWeapon(EntityId id, const StationWeapon& weapon);
// Mutable iteration over all operational buildings (used by CombatSystem).
void forEachBuilding(std::function<void(Building&)> fn);
private:
struct BeltEntry
{