aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/research
diff options
context:
space:
mode:
Diffstat (limited to 'src/openvic-simulation/research')
-rw-r--r--src/openvic-simulation/research/Invention.cpp6
-rw-r--r--src/openvic-simulation/research/Technology.cpp4
2 files changed, 7 insertions, 3 deletions
diff --git a/src/openvic-simulation/research/Invention.cpp b/src/openvic-simulation/research/Invention.cpp
index 1076a62..4351337 100644
--- a/src/openvic-simulation/research/Invention.cpp
+++ b/src/openvic-simulation/research/Invention.cpp
@@ -62,6 +62,8 @@ bool InventionManager::load_inventions_file(
inventions, [this, &modifier_manager, &unit_type_manager, &building_type_manager, &crime_manager](
std::string_view identifier, ast::NodeCPtr value
) -> bool {
+ using enum scope_type_t;
+
// TODO - use the same variable for all modifiers rather than combining them at the end?
ModifierValue loose_modifiers;
ModifierValue modifiers;
@@ -74,8 +76,8 @@ bool InventionManager::load_inventions_file(
bool unlock_gas_defence = false;
bool news = true; //defaults to true!
- ConditionScript limit { scope_t::COUNTRY, scope_t::COUNTRY, scope_t::NO_SCOPE };
- ConditionalWeight chance { scope_t::COUNTRY, scope_t::COUNTRY, scope_t::NO_SCOPE };
+ ConditionScript limit { COUNTRY, COUNTRY, NO_SCOPE };
+ ConditionalWeight chance { COUNTRY, COUNTRY, NO_SCOPE };
bool ret = NodeTools::expect_dictionary_keys_and_default(
modifier_manager.expect_base_country_modifier(loose_modifiers),
diff --git a/src/openvic-simulation/research/Technology.cpp b/src/openvic-simulation/research/Technology.cpp
index 9a1cf27..f2df94b 100644
--- a/src/openvic-simulation/research/Technology.cpp
+++ b/src/openvic-simulation/research/Technology.cpp
@@ -168,6 +168,8 @@ bool TechnologyManager::load_technologies_file(
return expect_dictionary_reserve_length(technologies, [this, &modifier_manager, &unit_type_manager, &building_type_manager](
std::string_view tech_key, ast::NodeCPtr tech_value
) -> bool {
+ using enum scope_type_t;
+
ModifierValue modifiers;
TechnologyArea const* area = nullptr;
Date::year_t year = 0;
@@ -176,7 +178,7 @@ bool TechnologyManager::load_technologies_file(
std::optional<CountryInstance::unit_variant_t> unit_variant;
Technology::unit_set_t activated_units;
Technology::building_set_t activated_buildings;
- ConditionalWeight ai_chance { scope_t::COUNTRY, scope_t::COUNTRY, scope_t::NO_SCOPE };
+ ConditionalWeight ai_chance { COUNTRY, COUNTRY, NO_SCOPE };
bool ret = NodeTools::expect_dictionary_keys_and_default(
modifier_manager.expect_technology_modifier(modifiers),