Refactored rituals so they can be used in different situations.
This commit is contained in:
parent
5af9a6664e
commit
da273cbee6
8 changed files with 123 additions and 66 deletions
5
ai.hpp
5
ai.hpp
|
@ -33,7 +33,6 @@ namespace ai {
|
|||
|
||||
struct AIManager {
|
||||
AIProfile profile;
|
||||
|
||||
std::unordered_map<std::string, Action> actions;
|
||||
std::unordered_map<std::string, State> states;
|
||||
std::unordered_map<std::string, std::vector<Action>> scripts;
|
||||
|
@ -43,8 +42,8 @@ namespace ai {
|
|||
void reset();
|
||||
void init(std::string config_path);
|
||||
|
||||
Action config_action(nlohmann::json& profile, nlohmann::json& config);
|
||||
State config_state(nlohmann::json& profile, nlohmann::json& config);
|
||||
Action config_action(AIProfile& profile, nlohmann::json& config);
|
||||
State config_state(AIProfile& profile, nlohmann::json& config);
|
||||
|
||||
int state_id(std::string name);
|
||||
State load_state(std::string state_name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue