remove unused building HP
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user