add units in config files
This commit is contained in:
@@ -493,7 +493,7 @@ void BuildingSystem::tickConstruction(Tick currentTick)
|
||||
}
|
||||
else if (front.type == BuildingType::TunnelEntry)
|
||||
{
|
||||
m_belts.placeTunnelEntry(front.anchor, front.rotation, m_config.world.tunnelMaxDistance);
|
||||
m_belts.placeTunnelEntry(front.anchor, front.rotation, m_config.world.tunnelMaxDistance_tiles);
|
||||
}
|
||||
else if (front.type == BuildingType::TunnelExit)
|
||||
{
|
||||
@@ -993,7 +993,7 @@ void BuildingSystem::rotateInPlace(BuildingId id, Rotation newRotation)
|
||||
else if (b.type == BuildingType::TunnelEntry)
|
||||
{
|
||||
m_belts.removeTile(b.anchor);
|
||||
m_belts.placeTunnelEntry(b.anchor, newRotation, m_config.world.tunnelMaxDistance);
|
||||
m_belts.placeTunnelEntry(b.anchor, newRotation, m_config.world.tunnelMaxDistance_tiles);
|
||||
}
|
||||
else if (b.type == BuildingType::TunnelExit)
|
||||
{
|
||||
|
||||
@@ -239,7 +239,7 @@ void Simulation::placeInitialStructures()
|
||||
const ParsedSurfaceMask psParsed =
|
||||
parseSurfaceMask(m_config.stations.playerStation.surfaceMask, Rotation::East);
|
||||
const int psAnchorX =
|
||||
m_config.world.regions.playerBufferWidth - psParsed.footprint.width();
|
||||
m_config.world.regions.playerBufferWidth_tiles - psParsed.footprint.width();
|
||||
const double psLevel = static_cast<double>(m_config.stations.playerStation.level);
|
||||
const float psHp = static_cast<float>(
|
||||
m_config.stations.playerStation.hpFormula.evaluate(psLevel));
|
||||
@@ -309,9 +309,9 @@ void Simulation::placeEnemyStationSet(int generation)
|
||||
const ParsedSurfaceMask esParsed =
|
||||
parseSurfaceMask(m_config.stations.enemyStation.surfaceMask, Rotation::East);
|
||||
|
||||
const int rightEdgeX = m_config.world.regions.playerBufferWidth
|
||||
+ m_config.world.regions.contestZoneWidth
|
||||
+ generation * m_config.world.push.pushExpandColumns;
|
||||
const int rightEdgeX = m_config.world.regions.playerBufferWidth_tiles
|
||||
+ m_config.world.regions.contestZoneWidth_tiles
|
||||
+ generation * m_config.world.push.pushExpandColumns_tiles;
|
||||
const int anchorX = rightEdgeX - esParsed.footprint.width();
|
||||
|
||||
const double genD = static_cast<double>(generation);
|
||||
|
||||
@@ -186,11 +186,11 @@ std::vector<WaveSystem::SpawnEntry> WaveSystem::selectWaveShips(double& budget,
|
||||
|
||||
// Enemy spawn buffer X range for the current generation.
|
||||
const float leftX = static_cast<float>(
|
||||
m_config.world.regions.playerBufferWidth
|
||||
+ m_config.world.regions.contestZoneWidth
|
||||
+ m_generation * m_config.world.push.pushExpandColumns);
|
||||
m_config.world.regions.playerBufferWidth_tiles
|
||||
+ m_config.world.regions.contestZoneWidth_tiles
|
||||
+ m_generation * m_config.world.push.pushExpandColumns_tiles);
|
||||
const float rightX = leftX
|
||||
+ static_cast<float>(m_config.world.regions.enemyBufferWidth) - 1.0f;
|
||||
+ static_cast<float>(m_config.world.regions.enemyBufferWidth_tiles) - 1.0f;
|
||||
|
||||
std::uniform_real_distribution<float> xDist(leftX, rightX);
|
||||
std::uniform_int_distribution<int> yDist(0, worldHeightTiles - 1);
|
||||
|
||||
Reference in New Issue
Block a user