implement ship modules

This commit is contained in:
2026-05-18 08:49:51 +02:00
parent b59e392461
commit d08bf5d37b
33 changed files with 1911 additions and 56 deletions

View File

@@ -14,6 +14,7 @@
#include "ItemType.h"
#include "Port.h"
#include "Rotation.h"
#include "ShipLayout.h"
#include "Tick.h"
// Per-material input buffer for a production building.
@@ -50,6 +51,7 @@ struct ConstructionSite
BuildingType type = BuildingType::Miner;
std::string recipeId; // may be configured before completion
Tick completesAt = 0; // 0 = queued but not yet started
std::optional<ShipLayoutConfig> shipLayout;
};
// Weapon state for stationary structures (defence stations).
@@ -85,6 +87,9 @@ struct Building
std::vector<Port> inputPorts; // perimeter tiles (minus output-port tiles),
// direction pointing INTO building
// Module layout for shipyards (REQ-MOD-LAYOUT).
std::optional<ShipLayoutConfig> shipLayout;
// Set only for defence stations; nullopt for all other building types.
std::optional<StationWeapon> weapon;
};