aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author wvpm <24685035+wvpm@users.noreply.github.com>2024-01-13 11:59:33 +0100
committer GitHub <noreply@github.com>2024-01-13 11:59:33 +0100
commit046e5619277c6f3dffbb29244b4b88029da31bee (patch)
tree31541a9a04e82e26d6347b759aa0bc001da7e8a9
parent7b5a960ee9fce4241f83e5217bcf8f43af99f330 (diff)
parentddfb34bf33f59aa52cac3f22ab60c824484cae53 (diff)
Merge pull request #128 from OpenVicProject/westernisation_modifiers
Moved westernisation cost modifiers and added some to no effect
-rw-r--r--src/openvic-simulation/misc/Modifier.cpp15
-rw-r--r--src/openvic-simulation/research/Technology.cpp8
2 files changed, 9 insertions, 14 deletions
diff --git a/src/openvic-simulation/misc/Modifier.cpp b/src/openvic-simulation/misc/Modifier.cpp
index 0844681..8abafe3 100644
--- a/src/openvic-simulation/misc/Modifier.cpp
+++ b/src/openvic-simulation/misc/Modifier.cpp
@@ -201,6 +201,8 @@ bool ModifierManager::setup_modifier_effects() {
ret &= add_modifier_effect("rgo_output", true);
ret &= add_modifier_effect("rgo_throughput", true);
ret &= add_modifier_effect("ruling_party_support", true);
+ ret &= add_modifier_effect("self_unciv_economic_modifier", false);
+ ret &= add_modifier_effect("self_unciv_military_modifier", false);
ret &= add_modifier_effect("social_reform_desire", false);
ret &= add_modifier_effect("soldier_to_pop_loss", true);
ret &= add_modifier_effect("supply_consumption", false);
@@ -209,6 +211,8 @@ bool ModifierManager::setup_modifier_effects() {
ret &= add_modifier_effect("tariff_efficiency_modifier", true);
ret &= add_modifier_effect("tax_efficiency", true);
ret &= add_modifier_effect("unemployment_benefit", true);
+ ret &= add_modifier_effect("unciv_economic_modifier", false);
+ ret &= add_modifier_effect("unciv_military_modifier", false);
ret &= add_modifier_effect("unit_recruitment_time", false);
ret &= add_modifier_effect("war_exhaustion", false);
@@ -369,12 +373,11 @@ key_value_callback_t ModifierManager::_modifier_effect_callback(
if (effect_validator(*effect)) {
static const case_insensitive_string_set_t no_effect_modifiers {
- "boost_strongest_party", "poor_savings_modifier", "poor_life_needs",
- "poor_everyday_needs", "poor_luxury_needs", "middle_life_needs",
- "middle_everyday_needs", "middle_luxury_needs", "rich_life_needs",
- "rich_everyday_needs", "rich_luxury_needs", "local_artisan_input",
- "local_artisan_throughput", "local_artisan_output", "artisan_input",
- "artisan_throughput", "artisan_output", "import_cost"
+ "boost_strongest_party", "poor_savings_modifier", "poor_life_needs", "poor_everyday_needs",
+ "poor_luxury_needs", "middle_life_needs", "middle_everyday_needs", "middle_luxury_needs",
+ "rich_life_needs", "rich_everyday_needs", "rich_luxury_needs", "local_artisan_input",
+ "local_artisan_throughput", "local_artisan_output", "artisan_input", "artisan_throughput",
+ "artisan_output", "import_cost", "unciv_economic_modifier", "unciv_military_modifier"
};
if (no_effect_modifiers.contains(effect->get_identifier())) {
Logger::warning("This modifier does nothing: ", effect->get_identifier());
diff --git a/src/openvic-simulation/research/Technology.cpp b/src/openvic-simulation/research/Technology.cpp
index 4271d48..1d209ba 100644
--- a/src/openvic-simulation/research/Technology.cpp
+++ b/src/openvic-simulation/research/Technology.cpp
@@ -153,14 +153,6 @@ bool TechnologyManager::load_technologies_file(
bool TechnologyManager::generate_modifiers(ModifierManager& modifier_manager) const {
bool ret = true;
- const auto unciv_tech_modifier = [&modifier_manager, &ret](std::string_view name) -> void {
- ret &= modifier_manager.add_modifier_effect(name, false);
- ret &= modifier_manager.add_modifier_effect(StringUtils::append_string_views("self_", name), false);
- };
-
- unciv_tech_modifier("unciv_military_modifier");
- unciv_tech_modifier("unciv_economic_modifier");
-
for (TechnologyFolder const& folder : get_technology_folders()) {
ret &= modifier_manager.add_modifier_effect(
StringUtils::append_string_views(folder.get_identifier(), "_research_bonus"), true