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.cpp5
-rw-r--r--src/openvic-simulation/economy/GoodDefinition.cpp3
2 files changed, 5 insertions, 3 deletions
diff --git a/src/openvic-simulation/economy/BuildingType.cpp b/src/openvic-simulation/economy/BuildingType.cpp
index e7c0d59..d75f1b2 100644
--- a/src/openvic-simulation/economy/BuildingType.cpp
+++ b/src/openvic-simulation/economy/BuildingType.cpp
@@ -114,16 +114,17 @@ bool BuildingTypeManager::load_buildings_file(
for (BuildingType const& building_type : building_types.get_items()) {
using enum ModifierEffect::format_t;
+ using enum ModifierEffect::target_t;
static constexpr std::string_view max_prefix = "max_";
static constexpr std::string_view min_prefix = "min_build_";
ret &= modifier_manager.add_modifier_effect(
- StringUtils::append_string_views(max_prefix, building_type.get_identifier()), true, INT,
+ StringUtils::append_string_views(max_prefix, building_type.get_identifier()), true, INT, PROVINCE,
StringUtils::append_string_views("$", building_type.get_identifier(), "$ $TECH_MAX_LEVEL$")
);
// TODO - add custom localisation for "min_build_$building_type$" modifiers
ret &= modifier_manager.add_modifier_effect(
- StringUtils::append_string_views(min_prefix, building_type.get_identifier()), false, INT
+ StringUtils::append_string_views(min_prefix, building_type.get_identifier()), false, INT, PROVINCE
);
if (building_type.is_in_province()) {
diff --git a/src/openvic-simulation/economy/GoodDefinition.cpp b/src/openvic-simulation/economy/GoodDefinition.cpp
index ed24549..97396f2 100644
--- a/src/openvic-simulation/economy/GoodDefinition.cpp
+++ b/src/openvic-simulation/economy/GoodDefinition.cpp
@@ -89,6 +89,7 @@ bool GoodDefinitionManager::load_goods_file(ast::NodeCPtr root) {
bool GoodDefinitionManager::generate_modifiers(ModifierManager& modifier_manager) const {
using enum ModifierEffect::format_t;
+ using enum ModifierEffect::target_t;
bool ret = true;
@@ -100,7 +101,7 @@ bool GoodDefinitionManager::generate_modifiers(ModifierManager& modifier_manager
for (GoodDefinition const& good : get_good_definitions()) {
ret &= modifier_manager.add_modifier_effect(
ModifierManager::get_flat_identifier(name, good.get_identifier()), is_positive_good, PROPORTION_DECIMAL,
- make_localisation_suffix(good.get_identifier())
+ COUNTRY, make_localisation_suffix(good.get_identifier())
);
}
};