From c0ba822ee46551a40ad6b43e8f56b80e27ae35b5 Mon Sep 17 00:00:00 2001 From: hop311 Date: Sat, 8 Jun 2024 00:17:25 +0100 Subject: Add GoodInstance --- src/openvic-simulation/economy/EconomyManager.hpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'src/openvic-simulation/economy/EconomyManager.hpp') diff --git a/src/openvic-simulation/economy/EconomyManager.hpp b/src/openvic-simulation/economy/EconomyManager.hpp index adeabd9..caac9c2 100644 --- a/src/openvic-simulation/economy/EconomyManager.hpp +++ b/src/openvic-simulation/economy/EconomyManager.hpp @@ -1,23 +1,31 @@ #pragma once #include "openvic-simulation/economy/BuildingType.hpp" -#include "openvic-simulation/economy/Good.hpp" +#include "openvic-simulation/economy/GoodDefinition.hpp" +#include "openvic-simulation/economy/GoodInstance.hpp" #include "openvic-simulation/economy/ProductionType.hpp" namespace OpenVic { struct EconomyManager { private: BuildingTypeManager PROPERTY_REF(building_type_manager); - GoodManager PROPERTY_REF(good_manager); + GoodDefinitionManager PROPERTY_REF(good_definition_manager); + GoodInstanceManager PROPERTY_REF(good_instance_manager); ProductionTypeManager PROPERTY_REF(production_type_manager); public: inline bool load_production_types_file(PopManager const& pop_manager, ast::NodeCPtr root) { - return production_type_manager.load_production_types_file(good_manager, pop_manager, root); + return production_type_manager.load_production_types_file(good_definition_manager, pop_manager, root); } inline bool load_buildings_file(ModifierManager& modifier_manager, ast::NodeCPtr root) { - return building_type_manager.load_buildings_file(good_manager, production_type_manager, modifier_manager, root); + return building_type_manager.load_buildings_file( + good_definition_manager, production_type_manager, modifier_manager, root + ); + } + + inline bool setup_good_instances() { + return good_instance_manager.setup_good_instances(good_definition_manager); } }; } -- cgit v1.2.3-56-ga3b1