diff options
author | zaaarf <zaaarf@proton.me> | 2023-12-01 20:03:03 +0100 |
---|---|---|
committer | zaaarf <zaaarf@proton.me> | 2023-12-01 20:03:03 +0100 |
commit | 2d76e0766f0d65ffd8c9eb19eaec705445f91af0 (patch) | |
tree | a3ba37c2d652b95085ac8cf72a25941da26498ad /src/openvic-simulation/military | |
parent | a54898b7770e0d66b729216173960686c67e58bb (diff) |
feat: replaced REF_GETTERS with PROPERTY_REF, added PROPERTY_CUSTOM_PREFIX
Diffstat (limited to 'src/openvic-simulation/military')
-rw-r--r-- | src/openvic-simulation/military/MilitaryManager.hpp | 14 | ||||
-rw-r--r-- | src/openvic-simulation/military/Unit.hpp | 14 |
2 files changed, 11 insertions, 17 deletions
diff --git a/src/openvic-simulation/military/MilitaryManager.hpp b/src/openvic-simulation/military/MilitaryManager.hpp index ba13b70..aeb5a7b 100644 --- a/src/openvic-simulation/military/MilitaryManager.hpp +++ b/src/openvic-simulation/military/MilitaryManager.hpp @@ -8,15 +8,9 @@ namespace OpenVic { struct MilitaryManager { private: - UnitManager unit_manager; - LeaderTraitManager leader_trait_manager; - DeploymentManager deployment_manager; - WargoalTypeManager wargoal_manager; - - public: - REF_GETTERS(unit_manager) - REF_GETTERS(leader_trait_manager) - REF_GETTERS(deployment_manager) - REF_GETTERS(wargoal_manager) + UnitManager PROPERTY_REF(unit_manager); + LeaderTraitManager PROPERTY_REF(leader_trait_manager); + DeploymentManager PROPERTY_REF(deployment_manager); + WargoalTypeManager PROPERTY_REF(wargoal_manager); }; } diff --git a/src/openvic-simulation/military/Unit.hpp b/src/openvic-simulation/military/Unit.hpp index 632067e..65d0936 100644 --- a/src/openvic-simulation/military/Unit.hpp +++ b/src/openvic-simulation/military/Unit.hpp @@ -35,9 +35,9 @@ namespace OpenVic { const type_t PROPERTY(type); const icon_t PROPERTY(icon); const std::string PROPERTY(sprite); - const bool PROPERTY_CUSTOM_NAME(active, is_active); + const bool PROPERTY_CUSTOM_PREFIX(active, is); const std::string PROPERTY(unit_type); - const bool PROPERTY_CUSTOM_NAME(floating_flag, has_floating_flag); + const bool PROPERTY_CUSTOM_PREFIX(floating_flag, has); const uint32_t PROPERTY(priority); const fixed_point_t PROPERTY(max_strength); @@ -64,7 +64,7 @@ namespace OpenVic { friend struct UnitManager; private: - const bool PROPERTY_CUSTOM_NAME(primary_culture, is_primary_culture); + const bool PROPERTY_CUSTOM_PREFIX(primary_culture, is); const std::string PROPERTY(sprite_override); const std::string PROPERTY(sprite_mount); const std::string PROPERTY(sprite_mount_attach_node); @@ -87,11 +87,11 @@ namespace OpenVic { private: const icon_t PROPERTY(naval_icon); - const bool PROPERTY_CUSTOM_NAME(sail, can_sail); - const bool PROPERTY_CUSTOM_NAME(transport, is_transport); - const bool PROPERTY_CUSTOM_NAME(capital, is_capital); + const bool PROPERTY_CUSTOM_PREFIX(sail, can); + const bool PROPERTY_CUSTOM_PREFIX(transport, is); + const bool PROPERTY_CUSTOM_PREFIX(capital, is); const fixed_point_t PROPERTY(colonial_points); - const bool PROPERTY_CUSTOM_NAME(build_overseas, can_build_overseas); + const bool PROPERTY_CUSTOM_PREFIX(build_overseas, can); const uint32_t PROPERTY(min_port_level); const int32_t PROPERTY(limit_per_port); const fixed_point_t PROPERTY(supply_consumption_score); |