From 2d76e0766f0d65ffd8c9eb19eaec705445f91af0 Mon Sep 17 00:00:00 2001 From: zaaarf Date: Fri, 1 Dec 2023 20:03:03 +0100 Subject: feat: replaced REF_GETTERS with PROPERTY_REF, added PROPERTY_CUSTOM_PREFIX --- src/openvic-simulation/economy/EconomyManager.hpp | 10 +++------- src/openvic-simulation/economy/Good.hpp | 4 ++-- src/openvic-simulation/economy/ProductionType.hpp | 6 +++--- 3 files changed, 8 insertions(+), 12 deletions(-) (limited to 'src/openvic-simulation/economy') diff --git a/src/openvic-simulation/economy/EconomyManager.hpp b/src/openvic-simulation/economy/EconomyManager.hpp index d53aa7e..fcde094 100644 --- a/src/openvic-simulation/economy/EconomyManager.hpp +++ b/src/openvic-simulation/economy/EconomyManager.hpp @@ -7,15 +7,11 @@ namespace OpenVic { struct EconomyManager { private: - BuildingManager building_manager; - GoodManager good_manager; - ProductionTypeManager production_type_manager; + BuildingManager PROPERTY_REF(building_manager); + GoodManager PROPERTY_REF(good_manager); + ProductionTypeManager PROPERTY_REF(production_type_manager); public: - REF_GETTERS(building_manager) - REF_GETTERS(good_manager) - REF_GETTERS(production_type_manager) - 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); } diff --git a/src/openvic-simulation/economy/Good.hpp b/src/openvic-simulation/economy/Good.hpp index ac85cbd..faf4b66 100644 --- a/src/openvic-simulation/economy/Good.hpp +++ b/src/openvic-simulation/economy/Good.hpp @@ -38,8 +38,8 @@ namespace OpenVic { private: GoodCategory const& PROPERTY(category); const price_t PROPERTY(base_price); - const bool PROPERTY_CUSTOM_NAME(available_from_start, is_available_from_start); - const bool PROPERTY_CUSTOM_NAME(tradeable, is_tradeable); + const bool PROPERTY_CUSTOM_PREFIX(available_from_start, is); + const bool PROPERTY_CUSTOM_PREFIX(tradeable, is); const bool PROPERTY(money); const bool PROPERTY(overseas_penalty); diff --git a/src/openvic-simulation/economy/ProductionType.hpp b/src/openvic-simulation/economy/ProductionType.hpp index b03f16b..dd0b2fd 100644 --- a/src/openvic-simulation/economy/ProductionType.hpp +++ b/src/openvic-simulation/economy/ProductionType.hpp @@ -53,10 +53,10 @@ namespace OpenVic { const std::vector PROPERTY(bonuses); const Good::good_map_t PROPERTY(efficiency); - const bool PROPERTY_CUSTOM_NAME(coastal, is_coastal); // is_coastal + const bool PROPERTY_CUSTOM_PREFIX(coastal, is); // is_coastal - const bool PROPERTY_CUSTOM_NAME(farm, is_farm); - const bool PROPERTY_CUSTOM_NAME(mine, is_mine); + const bool PROPERTY_CUSTOM_PREFIX(farm, is); + const bool PROPERTY_CUSTOM_PREFIX(mine, is); ProductionType(PRODUCTION_TYPE_ARGS); -- cgit v1.2.3-56-ga3b1