Prefix all getters with "get"
This commit is contained in:
@@ -113,7 +113,7 @@ Simulation::~Simulation()
|
||||
unregisterForEvents();
|
||||
}
|
||||
|
||||
const GameConfig& Simulation::config() const
|
||||
const GameConfig& Simulation::getConfig() const
|
||||
{
|
||||
return m_config;
|
||||
}
|
||||
@@ -579,7 +579,7 @@ void Simulation::tickDeathsAndLoot()
|
||||
}
|
||||
else
|
||||
{
|
||||
const double genD = static_cast<double>(m_waveSystem->generation());
|
||||
const double genD = static_cast<double>(m_waveSystem->getGeneration());
|
||||
scrap = static_cast<int>(
|
||||
m_config.stations.enemyStation.scrapDropFormula.evaluate(genD));
|
||||
}
|
||||
@@ -619,9 +619,9 @@ void Simulation::tickDeathsAndLoot()
|
||||
if (es0Gone && es1Gone &&
|
||||
m_currentEnemyStationEntities[0] != entt::null)
|
||||
{
|
||||
const int destroyedLevel = m_waveSystem->generation();
|
||||
const int destroyedLevel = m_waveSystem->getGeneration();
|
||||
m_waveSystem->onEnemyStationsDestroyed();
|
||||
placeEnemyStationSet(m_waveSystem->generation());
|
||||
placeEnemyStationSet(m_waveSystem->getGeneration());
|
||||
generateSchematicChoices(destroyedLevel);
|
||||
}
|
||||
}
|
||||
@@ -968,7 +968,7 @@ void Simulation::appendStringSet(Hasher& hasher, const std::set<std::string>& id
|
||||
}
|
||||
}
|
||||
|
||||
unsigned long long Simulation::rngFingerprint() const
|
||||
unsigned long long Simulation::getRngFingerprint() const
|
||||
{
|
||||
return fingerprintRng(m_rng);
|
||||
}
|
||||
@@ -991,11 +991,11 @@ unsigned long long Simulation::computeStateChecksum() const
|
||||
hasher.append(m_expansionsPurchased);
|
||||
|
||||
// WaveSystem scalar state, reached through existing accessors.
|
||||
hasher.append(threatLevel());
|
||||
hasher.append(threatAccumulationRate());
|
||||
hasher.append(bossWaveCounter());
|
||||
hasher.append(bossCountdownTicks());
|
||||
hasher.append(normalGapRemainingTicks());
|
||||
hasher.append(getThreatLevel());
|
||||
hasher.append(getThreatAccumulationRate());
|
||||
hasher.append(getBossWaveCounter());
|
||||
hasher.append(getBossCountdownTicks());
|
||||
hasher.append(getNormalGapRemainingTicks());
|
||||
|
||||
// Schematic / unlock state (std::map and std::set iterate in sorted order).
|
||||
appendSchematicMap(hasher, m_schematicLevels);
|
||||
@@ -1052,7 +1052,7 @@ unsigned long long Simulation::computeStateChecksum() const
|
||||
hasher.append(c.schematicId);
|
||||
});
|
||||
|
||||
return hasher.value();
|
||||
return hasher.getValue();
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@@ -1081,7 +1081,7 @@ bool Simulation::hasSchematicChoicesPending() const
|
||||
// Accessors
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
Tick Simulation::currentTick() const
|
||||
Tick Simulation::getCurrentTick() const
|
||||
{
|
||||
return m_currentTick;
|
||||
}
|
||||
@@ -1091,18 +1091,18 @@ unsigned int Simulation::getSeed() const
|
||||
return m_seed;
|
||||
}
|
||||
|
||||
int Simulation::buildingBlocksStock() const
|
||||
int Simulation::getBuildingBlocksStock() const
|
||||
{
|
||||
return m_buildingBlocksStock;
|
||||
}
|
||||
|
||||
int Simulation::currentAsteroidWidth_tiles() const
|
||||
int Simulation::getCurrentAsteroidWidth_tiles() const
|
||||
{
|
||||
return m_config.world.regions.asteroidWidth_tiles
|
||||
+ m_expansionsPurchased * m_config.world.expansion.columnsPerExpansion_tiles;
|
||||
}
|
||||
|
||||
int Simulation::currentExpansionCost() const
|
||||
int Simulation::getCurrentExpansionCost() const
|
||||
{
|
||||
const double cost = m_config.world.expansion.costBuildingBlocksFormula.evaluate(
|
||||
static_cast<double>(m_expansionsPurchased));
|
||||
@@ -1111,14 +1111,14 @@ int Simulation::currentExpansionCost() const
|
||||
|
||||
void Simulation::tryExpandAsteroid()
|
||||
{
|
||||
const int cost = currentExpansionCost();
|
||||
const int cost = getCurrentExpansionCost();
|
||||
if (m_buildingBlocksStock < cost)
|
||||
{
|
||||
return;
|
||||
}
|
||||
m_buildingBlocksStock -= cost;
|
||||
++m_expansionsPurchased;
|
||||
m_buildingSystem->setAsteroidWidth_tiles(currentAsteroidWidth_tiles());
|
||||
m_buildingSystem->setAsteroidWidth_tiles(getCurrentAsteroidWidth_tiles());
|
||||
}
|
||||
|
||||
bool Simulation::isGameOver() const
|
||||
@@ -1131,44 +1131,44 @@ bool Simulation::isWon() const
|
||||
return m_isWon;
|
||||
}
|
||||
|
||||
int Simulation::artifactCount() const
|
||||
int Simulation::getArtifactCount() const
|
||||
{
|
||||
return m_artifactCount;
|
||||
}
|
||||
|
||||
double Simulation::threatLevel() const
|
||||
double Simulation::getThreatLevel() const
|
||||
{
|
||||
return m_waveSystem->threatLevel();
|
||||
return m_waveSystem->getThreatLevel();
|
||||
}
|
||||
|
||||
double Simulation::threatAccumulationRate() const
|
||||
double Simulation::getThreatAccumulationRate() const
|
||||
{
|
||||
return m_waveSystem->threatAccumulationRate();
|
||||
return m_waveSystem->getThreatAccumulationRate();
|
||||
}
|
||||
|
||||
double Simulation::maxFactoryProductionThreatRate() const
|
||||
double Simulation::getMaxFactoryProductionThreatRate() const
|
||||
{
|
||||
return static_cast<double>(m_buildingSystem->productionBuildingCount());
|
||||
return static_cast<double>(m_buildingSystem->getProductionBuildingCount());
|
||||
}
|
||||
|
||||
double Simulation::currentFactoryProductionThreatRate() const
|
||||
double Simulation::getCurrentFactoryProductionThreatRate() const
|
||||
{
|
||||
return static_cast<double>(m_buildingSystem->activeProductionBuildingCount());
|
||||
return static_cast<double>(m_buildingSystem->getActiveProductionBuildingCount());
|
||||
}
|
||||
|
||||
int Simulation::bossWaveCounter() const
|
||||
int Simulation::getBossWaveCounter() const
|
||||
{
|
||||
return m_waveSystem->bossWaveCounter();
|
||||
return m_waveSystem->getBossWaveCounter();
|
||||
}
|
||||
|
||||
Tick Simulation::bossCountdownTicks() const
|
||||
Tick Simulation::getBossCountdownTicks() const
|
||||
{
|
||||
return m_waveSystem->bossCountdownTicks();
|
||||
return m_waveSystem->getBossCountdownTicks();
|
||||
}
|
||||
|
||||
Tick Simulation::normalGapRemainingTicks() const
|
||||
Tick Simulation::getNormalGapRemainingTicks() const
|
||||
{
|
||||
return m_waveSystem->normalGapRemainingTicks();
|
||||
return m_waveSystem->getNormalGapRemainingTicks();
|
||||
}
|
||||
|
||||
bool Simulation::isSchematicUnlocked(const std::string& shipId) const
|
||||
@@ -1222,52 +1222,52 @@ void Simulation::demolish(BuildingId id)
|
||||
m_buildingBlocksStock += m_buildingSystem->demolish(id);
|
||||
}
|
||||
|
||||
BuildingSystem& Simulation::buildingsMutable()
|
||||
BuildingSystem& Simulation::getBuildingsMutable()
|
||||
{
|
||||
return *m_buildingSystem;
|
||||
}
|
||||
|
||||
const BuildingSystem& Simulation::buildings() const
|
||||
const BuildingSystem& Simulation::getBuildings() const
|
||||
{
|
||||
return *m_buildingSystem;
|
||||
}
|
||||
|
||||
BeltSystem& Simulation::beltsMutable()
|
||||
BeltSystem& Simulation::getBeltsMutable()
|
||||
{
|
||||
return m_beltSystem;
|
||||
}
|
||||
|
||||
const BeltSystem& Simulation::belts() const
|
||||
const BeltSystem& Simulation::getBelts() const
|
||||
{
|
||||
return m_beltSystem;
|
||||
}
|
||||
|
||||
ShipSystem& Simulation::ships()
|
||||
ShipSystem& Simulation::getShips()
|
||||
{
|
||||
return *m_shipSystem;
|
||||
}
|
||||
|
||||
const ShipSystem& Simulation::ships() const
|
||||
const ShipSystem& Simulation::getShips() const
|
||||
{
|
||||
return *m_shipSystem;
|
||||
}
|
||||
|
||||
ScrapSystem& Simulation::scraps()
|
||||
ScrapSystem& Simulation::getScraps()
|
||||
{
|
||||
return *m_scrapSystem;
|
||||
}
|
||||
|
||||
const ScrapSystem& Simulation::scraps() const
|
||||
const ScrapSystem& Simulation::getScraps() const
|
||||
{
|
||||
return *m_scrapSystem;
|
||||
}
|
||||
|
||||
EntityAdmin& Simulation::admin()
|
||||
EntityAdmin& Simulation::getAdmin()
|
||||
{
|
||||
return m_admin;
|
||||
}
|
||||
|
||||
const EntityAdmin& Simulation::admin() const
|
||||
const EntityAdmin& Simulation::getAdmin() const
|
||||
{
|
||||
return m_admin;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user