Made an AI debug view to I can make working on the AI easier. I might add the ability to toggle things on/off live to see what the AI does.
This commit is contained in:
parent
fc8e65f4d6
commit
4bf9a9177f
8 changed files with 60 additions and 16 deletions
10
ai_debug.cpp
10
ai_debug.cpp
|
@ -61,4 +61,14 @@ namespace ai {
|
|||
dump_script(script, start, plan.script);
|
||||
}
|
||||
|
||||
std::string EntityAI::to_string() {
|
||||
AIProfile* profile = ai::profile();
|
||||
std::string result = wants_to();
|
||||
|
||||
for(auto& [name, name_id] : *profile) {
|
||||
result += fmt::format("\n{}={}", name, start.test(name_id));
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue