Moving some stuff around before writing a test to confirm the EntityAI.

This commit is contained in:
Zed A. Shaw 2025-03-14 22:39:08 -04:00
parent f3e157a0f7
commit db5a371766
6 changed files with 49 additions and 38 deletions

13
ai.cpp
View file

@ -157,4 +157,17 @@ namespace ai {
AIProfile* profile() {
return &AIMGR.profile;
}
bool EntityAI::wants_to(std::string name) {
return plan.script[0].name == name;
}
void EntityAI::set_state(std::string name, bool setting) {
ai::set(start, name, setting);
}
void EntityAI::update() {
plan = ai::plan(script, start, goal);
}
}