diff options
author | Hop311 <Hop3114@gmail.com> | 2024-09-14 21:37:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-14 21:37:10 +0200 |
commit | d8c04cbe53188d4717f8c49f918e01657dbf3440 (patch) | |
tree | 7754de92a23f21e0546dcd09439bf0d3962b096f /src/openvic-simulation/economy | |
parent | 7a9206e3869fbb659d296b854c90f5c81755a5ca (diff) | |
parent | a424969548083a977480a6be0f078760a5789bbf (diff) |
Merge pull request #197 from OpenVicProject/country-unlock
CountryInstance unlock tech, invention, crime, building, unit, gas etc.
Diffstat (limited to 'src/openvic-simulation/economy')
-rw-r--r-- | src/openvic-simulation/economy/BuildingType.cpp | 11 | ||||
-rw-r--r-- | src/openvic-simulation/economy/BuildingType.hpp | 5 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/openvic-simulation/economy/BuildingType.cpp b/src/openvic-simulation/economy/BuildingType.cpp index d096166..f0fc8a8 100644 --- a/src/openvic-simulation/economy/BuildingType.cpp +++ b/src/openvic-simulation/economy/BuildingType.cpp @@ -5,9 +5,8 @@ using namespace OpenVic::NodeTools; BuildingType::BuildingType( std::string_view identifier, building_type_args_t& building_type_args -) : HasIdentifier { identifier }, +) : Modifier { identifier, std::move(building_type_args.modifier) }, type { building_type_args.type }, - modifier { std::move(building_type_args.modifier) }, on_completion { building_type_args.on_completion }, completion_size { building_type_args.completion_size }, max_level { building_type_args.max_level }, @@ -133,13 +132,15 @@ bool BuildingTypeManager::load_buildings_file( port_building_type = &building_type; } else { Logger::error( - "Building type ", building_type, " is marked as a port, but we are already using ", port_building_type, - " as the port building type!" + "Building type ", building_type.get_identifier(), " is marked as a port, but we are already using ", + port_building_type->get_identifier(), " as the port building type!" ); ret = false; } } else { - Logger::error("Building type ", building_type, " is marked as a port, but is not a province building!"); + Logger::error( + "Building type ", building_type.get_identifier(), " is marked as a port, but is not a province building!" + ); ret = false; } } diff --git a/src/openvic-simulation/economy/BuildingType.hpp b/src/openvic-simulation/economy/BuildingType.hpp index 977d6ec..ab999cd 100644 --- a/src/openvic-simulation/economy/BuildingType.hpp +++ b/src/openvic-simulation/economy/BuildingType.hpp @@ -16,7 +16,7 @@ namespace OpenVic { * MAP-12, MAP-75, MAP-76 * MAP-13, MAP-78, MAP-79 */ - struct BuildingType : HasIdentifier { + struct BuildingType : Modifier { friend struct BuildingTypeManager; using level_t = int16_t; @@ -42,7 +42,6 @@ namespace OpenVic { private: std::string PROPERTY(type); - ModifierValue PROPERTY(modifier); std::string PROPERTY(on_completion); // probably sound played on completion fixed_point_t PROPERTY(completion_size); level_t PROPERTY(max_level); @@ -51,7 +50,7 @@ namespace OpenVic { Timespan PROPERTY(build_time); // time bool PROPERTY(on_map); // onmap - bool PROPERTY(default_enabled); + bool PROPERTY_CUSTOM_PREFIX(default_enabled, is); ProductionType const* PROPERTY(production_type); bool PROPERTY(pop_build_factory); bool PROPERTY(strategic_factory); |