diff options
author | hop311 <hop3114@gmail.com> | 2024-07-17 01:01:03 +0200 |
---|---|---|
committer | hop311 <hop3114@gmail.com> | 2024-07-17 19:09:33 +0200 |
commit | 928c521599b2b18e8964aeb445c3ca5a55bacbd1 (patch) | |
tree | aa6e018034c4c0fd498e74707d5cc3750c0dd438 /extension/src/openvic-extension/singletons/ModelSingleton.hpp | |
parent | 114394f4d1bcf5249089b6e3632d259a195ec584 (diff) |
Use IndexedMap + helper function support
Diffstat (limited to 'extension/src/openvic-extension/singletons/ModelSingleton.hpp')
-rw-r--r-- | extension/src/openvic-extension/singletons/ModelSingleton.hpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/extension/src/openvic-extension/singletons/ModelSingleton.hpp b/extension/src/openvic-extension/singletons/ModelSingleton.hpp index ad1a6d8..8030ffd 100644 --- a/extension/src/openvic-extension/singletons/ModelSingleton.hpp +++ b/extension/src/openvic-extension/singletons/ModelSingleton.hpp @@ -3,7 +3,8 @@ #include <godot_cpp/classes/object.hpp> #include <openvic-simulation/interface/GFXObject.hpp> -#include <openvic-simulation/military/UnitInstance.hpp> +#include <openvic-simulation/military/UnitInstanceGroup.hpp> +#include <openvic-simulation/types/OrderedContainers.hpp> namespace OpenVic { struct BuildingInstance; @@ -31,8 +32,10 @@ namespace OpenVic { godot::Dictionary make_animation_dict(GFX::Actor::Animation const& animation) const; godot::Dictionary make_model_dict(GFX::Actor const& actor) const; - template<utility::is_derived_from_specialization_of<UnitInstanceGroup> T> - bool add_unit_dict(ordered_set<T*> const& units, godot::TypedArray<godot::Dictionary>& unit_array) const; + template<UnitType::branch_t Branch> + bool add_unit_dict( + ordered_set<UnitInstanceGroupBranched<Branch>*> const& units, godot::TypedArray<godot::Dictionary>& unit_array + ) const; bool add_building_dict( BuildingInstance const& building, ProvinceInstance const& province, |