diff options
author | wvpm <24685035+wvpm@users.noreply.github.com> | 2024-01-07 00:37:41 +0100 |
---|---|---|
committer | wvpm <24685035+wvpm@users.noreply.github.com> | 2024-01-07 01:16:12 +0100 |
commit | 91988fc96a2ea0cd5766a304e93629678d22777c (patch) | |
tree | d4773ca6709c056baa5043669190100246986ea8 /src/openvic-simulation/military/Unit.hpp | |
parent | b06b25bd2910818029ebbf1cd3014ef20a64e25b (diff) |
Support culture restrictions for units
Style
Diffstat (limited to 'src/openvic-simulation/military/Unit.hpp')
-rw-r--r-- | src/openvic-simulation/military/Unit.hpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/openvic-simulation/military/Unit.hpp b/src/openvic-simulation/military/Unit.hpp index a44f4e5..c791aca 100644 --- a/src/openvic-simulation/military/Unit.hpp +++ b/src/openvic-simulation/military/Unit.hpp @@ -17,7 +17,7 @@ Good::good_map_t&& build_cost, fixed_point_t supply_consumption, Good::good_map_t&& supply_cost #define LAND_PARAMS \ - bool primary_culture, std::string_view sprite_override, std::string_view sprite_mount, \ + LandUnit::allowed_cultures_t allowed_cultures, std::string_view sprite_override, std::string_view sprite_mount, \ std::string_view sprite_mount_attach_node, fixed_point_t reconnaissance, fixed_point_t attack, fixed_point_t defence, \ fixed_point_t discipline, fixed_point_t support, fixed_point_t maneuver, fixed_point_t siege @@ -64,8 +64,10 @@ namespace OpenVic { struct LandUnit : Unit { friend struct UnitManager; + enum struct allowed_cultures_t { ALL_CULTURES, ACCEPTED_CULTURES, PRIMARY_CULTURE }; + private: - const bool PROPERTY_CUSTOM_PREFIX(primary_culture, is); + const allowed_cultures_t PROPERTY(allowed_cultures); const std::string PROPERTY(sprite_override); const std::string PROPERTY(sprite_mount); const std::string PROPERTY(sprite_mount_attach_node); |