From 4a899c1a9e83ab9476b85522751081be434caa35 Mon Sep 17 00:00:00 2001 From: hop311 Date: Sat, 2 Dec 2023 15:48:08 +0000 Subject: Crime+event modifier loading + misc UI backend --- src/openvic-simulation/economy/Good.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/openvic-simulation/economy/Good.cpp') diff --git a/src/openvic-simulation/economy/Good.cpp b/src/openvic-simulation/economy/Good.cpp index 739374b..2aa5d42 100644 --- a/src/openvic-simulation/economy/Good.cpp +++ b/src/openvic-simulation/economy/Good.cpp @@ -8,9 +8,9 @@ using namespace OpenVic::NodeTools; GoodCategory::GoodCategory(std::string_view new_identifier) : HasIdentifier { new_identifier } {} Good::Good( - std::string_view new_identifier, colour_t new_colour, GoodCategory const& new_category, price_t new_base_price, - bool new_available_from_start, bool new_tradeable, bool new_money, bool new_overseas_penalty -) : HasIdentifierAndColour { new_identifier, new_colour, false, false }, category { new_category }, + std::string_view new_identifier, colour_t new_colour, index_t new_index, GoodCategory const& new_category, + price_t new_base_price, bool new_available_from_start, bool new_tradeable, bool new_money, bool new_overseas_penalty +) : HasIdentifierAndColour { new_identifier, new_colour, false, false }, index { new_index }, category { new_category }, base_price { new_base_price }, available_from_start { new_available_from_start }, tradeable { new_tradeable }, money { new_money }, overseas_penalty { new_overseas_penalty } { assert(base_price > NULL_PRICE); @@ -48,7 +48,7 @@ bool GoodManager::add_good( return false; } return goods.add_item({ - identifier, colour, category, base_price, available_from_start, + identifier, colour, get_good_count(), category, base_price, available_from_start, tradeable, money, overseas_penalty }); } @@ -105,7 +105,6 @@ bool GoodManager::load_goods_file(ast::NodeCPtr root) { ret &= modifier_manager.add_modifier_effect(modifier_name, true, ModifierEffect::format_t::PROPORTION_DECIMAL); \ } - bool GoodManager::generate_modifiers(ModifierManager& modifier_manager) { bool ret = true; GOOD_MODIFIER("factory_goods_output"); -- cgit v1.2.3-56-ga3b1