allow some degree of control over human bots

This commit is contained in:
Evil Factory
2021-12-04 13:15:04 -03:00
parent fe563a417c
commit 4ea4e4e0bd
3 changed files with 69 additions and 0 deletions
@@ -63,8 +63,17 @@ namespace Barotrauma
CreateAutonomousObjectives();
}
public void AddObjective(AIObjective objective)
{
AddObjective<AIObjective>(objective);
}
public void AddObjective<T>(T objective) where T : AIObjective
{
var result = new LuaResult(GameMain.Lua.hook.Call("AI.AddObjective", this, objective));
if (result.Bool()) return;
if (objective == null)
{
#if DEBUG