diff --git a/src/GalaxyConfig.cpp b/src/GalaxyConfig.cpp index 01ffe3e9de..6a5f00bd38 100644 --- a/src/GalaxyConfig.cpp +++ b/src/GalaxyConfig.cpp @@ -3,15 +3,13 @@ #include "GalaxyConfig.h" #include "FileSystem.h" -#include "core/OS.h" GalaxyConfig::GalaxyConfig() { // set defaults std::map &map = m_map[""]; - map["Lang"] = OS::GetUserLangCode(); - map["GalaxyExploredMin"] = "65"; map["GalaxyExploredMax"] = "90"; + map["GalaxyExploredMin"] = "65"; Read(FileSystem::userFiles, "galaxy.ini"); diff --git a/src/galaxy/SectorGenerator.cpp b/src/galaxy/SectorGenerator.cpp index 1b5032149f..310391a7bc 100644 --- a/src/galaxy/SectorGenerator.cpp +++ b/src/galaxy/SectorGenerator.cpp @@ -15,6 +15,7 @@ #define Square(x) ((x) * (x)) GalaxyConfig *SectorCustomSystemsGenerator::galaxyConfig; +GalaxyConfig *SectorRandomSystemsGenerator::galaxyConfig; bool SectorCustomSystemsGenerator::Apply(Random &rng, RefCountedPtr galaxy, RefCountedPtr sector, GalaxyGenerator::SectorConfig *config) { @@ -171,6 +172,9 @@ bool SectorRandomSystemsGenerator::Apply(Random &rng, RefCountedPtr gala s.m_pos.y = rng.Double(Sector::SIZE); s.m_pos.z = rng.Double(Sector::SIZE); + int GalaxyExploredMax = (SectorRandomSystemsGenerator::galaxyConfig->Int("GalaxyExploredMax")); + int GalaxyExploredMin = (SectorRandomSystemsGenerator::galaxyConfig->Int("GalaxyExploredMin")); + /* * 0 - ~500ly from sol: explored * ~500ly - ~700ly (65-90 sectors): gradual diff --git a/src/galaxy/SectorGenerator.h b/src/galaxy/SectorGenerator.h index f9ba4baaed..13b7a0381c 100644 --- a/src/galaxy/SectorGenerator.h +++ b/src/galaxy/SectorGenerator.h @@ -33,6 +33,7 @@ class SectorRandomSystemsGenerator : public SectorGeneratorStage { private: const std::string GenName(RefCountedPtr galaxy, const Sector &sec, Sector::System &sys, int si, Random &rand); + static GalaxyConfig *galaxyConfig; }; class SectorPersistenceGenerator : public SectorGeneratorStage {