Skip to content

Commit

Permalink
Merge pull request #229 from OpenVicProject/artisan_modifiers_no_effect
Browse files Browse the repository at this point in the history
artisan_goods_ modifiers have no effect
  • Loading branch information
wvpm authored Nov 9, 2024
2 parents 63a5ddd + 0229162 commit 9868a5d
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/openvic-simulation/economy/GoodDefinition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ bool GoodDefinitionManager::load_goods_file(ast::NodeCPtr root) {
}

bool GoodDefinitionManager::generate_modifiers(ModifierManager& modifier_manager) const {
constexpr bool has_no_effect = true;
using enum ModifierEffect::format_t;
using enum ModifierEffect::target_t;

Expand All @@ -116,11 +117,11 @@ bool GoodDefinitionManager::generate_modifiers(ModifierManager& modifier_manager

const auto good_modifier = [&modifier_manager, &ret, &good_identifier](
ModifierEffect const*& effect_cache, std::string_view name, bool is_positive_good,
std::string_view localisation_key
std::string_view localisation_key, bool has_no_effect = false
) -> void {
ret &= modifier_manager.register_technology_modifier_effect(
effect_cache, ModifierManager::get_flat_identifier(name, good_identifier), is_positive_good,
PROPORTION_DECIMAL, localisation_key
PROPORTION_DECIMAL, localisation_key, has_no_effect
);
};

Expand All @@ -132,15 +133,15 @@ bool GoodDefinitionManager::generate_modifiers(ModifierManager& modifier_manager

good_modifier(
this_good_effects.artisan_goods_input, "artisan_goods_input", false,
make_production_localisation_suffix("TECH_INPUT")
make_production_localisation_suffix("TECH_INPUT"), has_no_effect
);
good_modifier(
this_good_effects.artisan_goods_output, "artisan_goods_output", true,
make_production_localisation_suffix("TECH_OUTPUT")
make_production_localisation_suffix("TECH_OUTPUT"), has_no_effect
);
good_modifier(
this_good_effects.artisan_goods_throughput, "artisan_goods_throughput", true,
make_production_localisation_suffix("TECH_THROUGHPUT")
make_production_localisation_suffix("TECH_THROUGHPUT"), has_no_effect
);
good_modifier(
this_good_effects.factory_goods_input, "factory_goods_input", false,
Expand Down

0 comments on commit 9868a5d

Please sign in to comment.