|
@@ -4,17 +4,17 @@
|
|
|
* 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.
|
|
|
* 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/>.
|
|
|
*/
|
|
|
|
|
|
#include "../script_controller.hpp"
|
|
|
|
|
|
template <> const char *GetClassName<ScriptController, ST_AI>() { return "AIController"; }
|
|
|
template <> const char *GetClassName<ScriptController, ScriptType::AI>() { return "AIController"; }
|
|
|
|
|
|
void SQAIController_Register(Squirrel *engine)
|
|
|
{
|
|
|
DefSQClass<ScriptController, ST_AI> SQAIController("AIController");
|
|
|
DefSQClass<ScriptController, ScriptType::AI> SQAIController("AIController");
|
|
|
SQAIController.PreRegister(engine);
|
|
|
|
|
|
SQAIController.DefSQStaticMethod(engine, &ScriptController::GetTick, "GetTick", 1, ".");
|
|
|
SQAIController.DefSQStaticMethod(engine, &ScriptController::GetOpsTillSuspend, "GetOpsTillSuspend", 1, ".");
|
|
|
SQAIController.DefSQStaticMethod(engine, &ScriptController::SetCommandDelay, "SetCommandDelay", 2, ".i");
|
|
|
SQAIController.DefSQStaticMethod(engine, &ScriptController::Sleep, "Sleep", 2, ".i");
|