aboutsummaryrefslogtreecommitdiff
path: root/extension/src/openvic-extension/singletons/ModelSingleton.hpp
diff options
context:
space:
mode:
author Hop311 <Hop3114@gmail.com>2024-07-17 19:20:15 +0200
committer GitHub <noreply@github.com>2024-07-17 19:20:15 +0200
commit6c92fc141c3e44526be43720a342beedeab9ad63 (patch)
treeaa6e018034c4c0fd498e74707d5cc3750c0dd438 /extension/src/openvic-extension/singletons/ModelSingleton.hpp
parent114394f4d1bcf5249089b6e3632d259a195ec584 (diff)
parent928c521599b2b18e8964aeb445c3ca5a55bacbd1 (diff)
Merge pull request #239 from OpenVicProject/indexed-map
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,