unify Weapon and StationWeapon components
This commit is contained in:
@@ -114,7 +114,7 @@ void ArenaSimulation::placeStructures()
|
||||
auto placeArenaStation = [&](const ArenaStationEntry& entry, bool isEnemy)
|
||||
{
|
||||
float hp = 0.0f;
|
||||
StationWeapon weapon;
|
||||
Weapon weapon;
|
||||
weapon.cooldownTicks = 0.0f;
|
||||
weapon.currentTarget = std::nullopt;
|
||||
const double lv = static_cast<double>(entry.level);
|
||||
@@ -155,7 +155,7 @@ void ArenaSimulation::placeStructures()
|
||||
}
|
||||
const entt::entity stationEntity = m_admin.spawnStation(
|
||||
anchor, parsed.footprint, absCells, hp, hp, isEnemy);
|
||||
m_admin.addComponent<StationWeapon>(stationEntity, weapon);
|
||||
m_admin.addComponent<Weapon>(stationEntity, weapon);
|
||||
m_buildingSystem->registerTileOccupancy(absCells, allocateId());
|
||||
};
|
||||
|
||||
@@ -500,3 +500,4 @@ void ArenaSimulation::updateStatus()
|
||||
std::lock_guard<std::mutex> lock(m_statusMutex);
|
||||
m_status = newStatus;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user