2 * This file is part of OpenTTD.
3 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
4 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
5 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
8 /** @file ai_instance.hpp The AIInstance tracks an AI. */
10 #ifndef AI_INSTANCE_HPP
11 #define AI_INSTANCE_HPP
13 #include "../script/script_instance.hpp"
15 /** Runtime information about an AI like a pointer to the squirrel vm and the current state. */
16 class AIInstance
: public ScriptInstance
{
21 * Initialize the AI and prepare it for its first run.
22 * @param info The AI to create the instance of.
24 void Initialize(class AIInfo
*info
);
26 int GetSetting(const char *name
) override
;
27 ScriptInfo
*FindLibrary(const char *library
, int version
) override
;
30 void RegisterAPI() override
;
32 CommandCallbackData
*GetDoCommandCallback() override
;
33 void LoadDummyScript() override
;
36 #endif /* AI_INSTANCE_HPP */