aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/economy
diff options
context:
space:
mode:
author Hop311 <Hop3114@gmail.com>2024-09-21 15:34:22 +0200
committer GitHub <noreply@github.com>2024-09-21 15:34:22 +0200
commit4b69a91a6db50f86efec503b56b07573c692df9f (patch)
tree68fca0f77f6b20f3e1fe98d32a5a79311cfd3edc /src/openvic-simulation/economy
parent85da7fb84197d617d1b3cde6969bf7bcfbb93d1d (diff)
parente35ff8ed703b0b6a5496a21a29e0b274c6a36874 (diff)
Merge pull request #204 from OpenVicProject/fix-modifiers
Fix modifiers
Diffstat (limited to 'src/openvic-simulation/economy')
-rw-r--r--src/openvic-simulation/economy/BuildingType.cpp3
-rw-r--r--src/openvic-simulation/economy/GoodDefinition.cpp7
2 files changed, 2 insertions, 8 deletions
diff --git a/src/openvic-simulation/economy/BuildingType.cpp b/src/openvic-simulation/economy/BuildingType.cpp
index a20aa36..e7c0d59 100644
--- a/src/openvic-simulation/economy/BuildingType.cpp
+++ b/src/openvic-simulation/economy/BuildingType.cpp
@@ -5,7 +5,7 @@ using namespace OpenVic::NodeTools;
BuildingType::BuildingType(
std::string_view identifier, building_type_args_t& building_type_args
-) : Modifier { identifier, std::move(building_type_args.modifier) },
+) : Modifier { identifier, std::move(building_type_args.modifier), modifier_type_t::BUILDING },
type { building_type_args.type },
on_completion { building_type_args.on_completion },
completion_size { building_type_args.completion_size },
@@ -154,6 +154,7 @@ bool BuildingTypeManager::load_buildings_file(
Logger::error("No port building type found!");
ret = false;
}
+
if (province_building_types.empty()) {
Logger::error("No province building types found!");
ret = false;
diff --git a/src/openvic-simulation/economy/GoodDefinition.cpp b/src/openvic-simulation/economy/GoodDefinition.cpp
index 82d3719..ed24549 100644
--- a/src/openvic-simulation/economy/GoodDefinition.cpp
+++ b/src/openvic-simulation/economy/GoodDefinition.cpp
@@ -123,12 +123,5 @@ bool GoodDefinitionManager::generate_modifiers(ModifierManager& modifier_manager
return StringUtils::append_string_views(good_identifier, "_RGO_SIZE");
});
- for (GoodDefinition const& good : get_good_definitions()) {
- ret &= modifier_manager.add_modifier_effect(
- good.get_identifier(), true, PERCENTAGE_DECIMAL,
- StringUtils::append_string_views("$ENCOURAGEMENT_FOR$$", good.get_identifier(), "$")
- );
- }
-
return ret;
}