Action nodes support and lots of other updates

This commit is contained in:
2026-01-19 00:07:03 +03:00
parent f86e7fd96c
commit 4b24d85123
34 changed files with 7810 additions and 3488 deletions

View File

@@ -0,0 +1,42 @@
#ifndef PLAYERACTIONMODULE_H
#define PLAYERACTIONMODULE_H
#include <flecs.h>
#include <nlohmann/json.hpp>
#include <Ogre.h>
namespace ECS {
struct ActionNodeList {
struct indexObject;
struct ActionNode {
Ogre::String action;
Ogre::String action_text;
Ogre::Vector3 position;
Ogre::Quaternion rotation;
nlohmann::json props;
};
std::vector<ActionNode> nodes;
std::shared_ptr<indexObject> indexObj;
bool dirty;
void build();
bool query(const Ogre::Vector3 &position, std::vector<size_t> &points);
int addNode(struct ActionNodeList::ActionNode &node)
{
int index = nodes.size();
nodes.push_back(node);
dirty = true;
return index;
}
void removeNode(int index)
{
nodes.erase(nodes.begin() + index);
}
};
struct PlayerActionModule
{
PlayerActionModule(flecs::world &ecs);
};
}
#endif // PLAYERACTIONMODULE_H