remove unused building HP

This commit is contained in:
2026-05-22 21:34:21 +02:00
parent 4e3dc51981
commit bd488db8ef
8 changed files with 10 additions and 23 deletions

View File

@@ -75,8 +75,6 @@ struct Building
QSize footprint;
Rotation rotation = Rotation::East;
BuildingType type = BuildingType::Miner;
float hp = 0.0f;
float maxHp = 0.0f;
std::string recipeId; // empty = none selected
InputBuffer inputBuffer;

View File

@@ -445,8 +445,6 @@ void BuildingSystem::tickConstruction(Tick currentTick)
building.footprint = front.footprint;
building.rotation = front.rotation;
building.type = front.type;
building.hp = 100.0f;
building.maxHp = 100.0f;
building.recipeId = front.recipeId;
building.shipLayout = front.shipLayout;
@@ -1049,8 +1047,7 @@ bool BuildingSystem::deliverScrapToSalvageBay(EntityId bayId)
EntityId BuildingSystem::placeImmediate(BuildingType type,
const std::vector<std::string>& surfaceMask,
QPoint anchor, Rotation rotation,
float hp, float maxHp)
QPoint anchor, Rotation rotation)
{
const EntityId id = m_allocateId();
const ParsedSurfaceMask mask = parseSurfaceMask(surfaceMask, rotation);
@@ -1061,8 +1058,6 @@ EntityId BuildingSystem::placeImmediate(BuildingType type,
building.footprint = mask.footprint;
building.rotation = rotation;
building.type = type;
building.hp = hp;
building.maxHp = maxHp;
for (const QPoint& cell : mask.bodyCells)
{

View File

@@ -109,8 +109,7 @@ public:
// 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);
QPoint anchor, Rotation rotation);
// Remove an operational building by id without refund (used for deaths).
// Returns true if found and removed.

View File

@@ -208,7 +208,7 @@ void Simulation::placeInitialStructures()
BuildingType::Hq,
m_config.stations.hq.surfaceMask,
QPoint(hqAnchorX, hqAnchorY),
Rotation::East, hqHp, hqHp);
Rotation::East);
const QVector2D hqCenter(
hqAnchorX + hqParsed.footprint.width() / 2.0f,