aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/economy
diff options
context:
space:
mode:
Diffstat (limited to 'src/openvic-simulation/economy')
-rw-r--r--src/openvic-simulation/economy/BuildingType.cpp11
-rw-r--r--src/openvic-simulation/economy/BuildingType.hpp5
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);