diff options
Diffstat (limited to 'src/openvic-simulation/pop')
-rw-r--r-- | src/openvic-simulation/pop/Culture.cpp | 3 | ||||
-rw-r--r-- | src/openvic-simulation/pop/Culture.hpp | 11 | ||||
-rw-r--r-- | src/openvic-simulation/pop/Pop.cpp | 2 | ||||
-rw-r--r-- | src/openvic-simulation/pop/Pop.hpp | 3 | ||||
-rw-r--r-- | src/openvic-simulation/pop/Religion.cpp | 2 | ||||
-rw-r--r-- | src/openvic-simulation/pop/Religion.hpp | 8 |
6 files changed, 7 insertions, 22 deletions
diff --git a/src/openvic-simulation/pop/Culture.cpp b/src/openvic-simulation/pop/Culture.cpp index faf05d3..ee8ffd6 100644 --- a/src/openvic-simulation/pop/Culture.cpp +++ b/src/openvic-simulation/pop/Culture.cpp @@ -19,9 +19,6 @@ Culture::Culture( ) : HasIdentifierAndColour { new_identifier, new_colour, false, false }, group { new_group }, first_names { std::move(new_first_names) }, last_names { std::move(new_last_names) } {} -CultureManager::CultureManager() - : graphical_culture_types { "graphical culture types" }, culture_groups { "culture groups" }, cultures { "cultures" } {} - bool CultureManager::add_graphical_culture_type(std::string_view identifier) { if (identifier.empty()) { Logger::error("Invalid culture group identifier - empty!"); diff --git a/src/openvic-simulation/pop/Culture.hpp b/src/openvic-simulation/pop/Culture.hpp index ff5f7c5..1c6b75f 100644 --- a/src/openvic-simulation/pop/Culture.hpp +++ b/src/openvic-simulation/pop/Culture.hpp @@ -56,9 +56,9 @@ namespace OpenVic { struct CultureManager { private: - IdentifierRegistry<GraphicalCultureType> graphical_culture_types; - IdentifierRegistry<CultureGroup> culture_groups; - IdentifierRegistry<Culture> cultures; + IdentifierRegistry<GraphicalCultureType> IDENTIFIER_REGISTRY(graphical_culture_type); + IdentifierRegistry<CultureGroup> IDENTIFIER_REGISTRY(culture_group); + IdentifierRegistry<Culture> IDENTIFIER_REGISTRY(culture); bool _load_culture_group( size_t& total_expected_cultures, GraphicalCultureType const* default_unit_graphical_culture_type, @@ -67,22 +67,17 @@ namespace OpenVic { bool _load_culture(CultureGroup const& culture_group, std::string_view culture_key, ast::NodeCPtr node); public: - CultureManager(); - bool add_graphical_culture_type(std::string_view identifier); - IDENTIFIER_REGISTRY_ACCESSORS(graphical_culture_type) bool add_culture_group( std::string_view identifier, std::string_view leader, GraphicalCultureType const* graphical_culture_type, bool is_overseas ); - IDENTIFIER_REGISTRY_ACCESSORS(culture_group) bool add_culture( std::string_view identifier, colour_t colour, CultureGroup const& group, std::vector<std::string>&& first_names, std::vector<std::string>&& last_names ); - IDENTIFIER_REGISTRY_ACCESSORS(culture) bool load_graphical_culture_type_file(ast::NodeCPtr root); bool load_culture_file(ast::NodeCPtr root); diff --git a/src/openvic-simulation/pop/Pop.cpp b/src/openvic-simulation/pop/Pop.cpp index 4d87081..cf54c2b 100644 --- a/src/openvic-simulation/pop/Pop.cpp +++ b/src/openvic-simulation/pop/Pop.cpp @@ -40,7 +40,7 @@ PopType::PopType( assert(merge_max_size >= 0); } -PopManager::PopManager() : pop_types { "pop types" }, slave_sprite { 0 }, administrative_sprite { 0 } {} +PopManager::PopManager() : slave_sprite { 0 }, administrative_sprite { 0 } {} bool PopManager::add_pop_type( std::string_view identifier, colour_t colour, PopType::strata_t strata, PopType::sprite_t sprite, diff --git a/src/openvic-simulation/pop/Pop.hpp b/src/openvic-simulation/pop/Pop.hpp index fb51c59..736b77d 100644 --- a/src/openvic-simulation/pop/Pop.hpp +++ b/src/openvic-simulation/pop/Pop.hpp @@ -89,7 +89,7 @@ namespace OpenVic { struct PopManager { private: - IdentifierRegistry<PopType> pop_types; + IdentifierRegistry<PopType> IDENTIFIER_REGISTRY(pop_type); PopType::sprite_t PROPERTY(slave_sprite); PopType::sprite_t PROPERTY(administrative_sprite); @@ -107,7 +107,6 @@ namespace OpenVic { bool can_be_recruited, bool can_reduce_consciousness, bool administrative_efficiency, bool can_build, bool factory, bool can_work_factory, bool unemployment ); - IDENTIFIER_REGISTRY_ACCESSORS(pop_type) bool load_pop_type_file( std::string_view filestem, UnitManager const& unit_manager, GoodManager const& good_manager, ast::NodeCPtr root diff --git a/src/openvic-simulation/pop/Religion.cpp b/src/openvic-simulation/pop/Religion.cpp index 644618d..a5e9faf 100644 --- a/src/openvic-simulation/pop/Religion.cpp +++ b/src/openvic-simulation/pop/Religion.cpp @@ -14,8 +14,6 @@ Religion::Religion( assert(icon > 0); } -ReligionManager::ReligionManager() : religion_groups { "religion groups" }, religions { "religions" } {} - bool ReligionManager::add_religion_group(std::string_view identifier) { if (identifier.empty()) { Logger::error("Invalid religion group identifier - empty!"); diff --git a/src/openvic-simulation/pop/Religion.hpp b/src/openvic-simulation/pop/Religion.hpp index 6f34eee..14c2f57 100644 --- a/src/openvic-simulation/pop/Religion.hpp +++ b/src/openvic-simulation/pop/Religion.hpp @@ -38,19 +38,15 @@ namespace OpenVic { struct ReligionManager { private: - IdentifierRegistry<ReligionGroup> religion_groups; - IdentifierRegistry<Religion> religions; + IdentifierRegistry<ReligionGroup> IDENTIFIER_REGISTRY(religion_group); + IdentifierRegistry<Religion> IDENTIFIER_REGISTRY(religion); public: - ReligionManager(); - bool add_religion_group(std::string_view identifier); - IDENTIFIER_REGISTRY_ACCESSORS(religion_group) bool add_religion( std::string_view identifier, colour_t colour, ReligionGroup const& group, Religion::icon_t icon, bool pagan ); - IDENTIFIER_REGISTRY_ACCESSORS(religion) bool load_religion_file(ast::NodeCPtr root); }; |