Rituals are more or less sorted out in theory, and they helped find a cycle in the GOAP algorithm that I'm detecting/preventing.
This commit is contained in:
parent
8368d2e751
commit
49531ba148
9 changed files with 94 additions and 48 deletions
23
rituals.hpp
Normal file
23
rituals.hpp
Normal file
|
@ -0,0 +1,23 @@
|
|||
#pragma once
|
||||
#include "ai.hpp"
|
||||
|
||||
struct RitualAI {
|
||||
std::string script;
|
||||
ai::State start;
|
||||
ai::State original;
|
||||
ai::State goal;
|
||||
ai::ActionPlan plan;
|
||||
|
||||
RitualAI(std::string script, ai::State start, ai::State goal) :
|
||||
script(script), start(start), original(start), goal(goal)
|
||||
{
|
||||
}
|
||||
|
||||
RitualAI() {};
|
||||
|
||||
void reset();
|
||||
bool will_do(std::string name);
|
||||
void set_state(std::string name, bool setting);
|
||||
void update();
|
||||
void dump();
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue