aboutsummaryrefslogtreecommitdiff
path: root/extension/src/openvic-extension/singletons/ModelSingleton.hpp
diff options
context:
space:
mode:
author hop311 <hop3114@gmail.com>2024-07-17 01:01:03 +0200
committer hop311 <hop3114@gmail.com>2024-07-17 19:09:33 +0200
commit928c521599b2b18e8964aeb445c3ca5a55bacbd1 (patch)
treeaa6e018034c4c0fd498e74707d5cc3750c0dd438 /extension/src/openvic-extension/singletons/ModelSingleton.hpp
parent114394f4d1bcf5249089b6e3632d259a195ec584 (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.hpp9
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,