Functions | Variables

ai_info_dummy.cpp File Reference

Implementation of a dummy AI. More...

#include <squirrel.h>
#include "../stdafx.h"
#include "../string_func.h"
#include "../strings_func.h"
#include "table/strings.h"

Go to the source code of this file.

Functions

void AI_CreateAIInfoDummy (HSQUIRRELVM vm)
 Run the dummy info.nut.
void AI_CreateAIDummy (HSQUIRRELVM vm)
 Run the dummy AI and let it generate an error message.

Variables

const SQChar _dummy_script_info []
 info.nut for the dummy AI.

Detailed Description

Implementation of a dummy AI.

Definition in file ai_info_dummy.cpp.


Function Documentation

void AI_CreateAIDummy ( HSQUIRRELVM  vm  ) 

Run the dummy AI and let it generate an error message.

Definition at line 60 of file ai_info_dummy.cpp.

References lastof, seprintf(), and strecpy().

void AI_CreateAIInfoDummy ( HSQUIRRELVM  vm  ) 

Run the dummy info.nut.

Definition at line 44 of file ai_info_dummy.cpp.

References _dummy_script_info.


Variable Documentation

const SQChar _dummy_script_info[]
Initial value:
 _SC("                                                       \n\
class DummyAI extends AIInfo {                                                                  \n\
  function GetAuthor()      { return \"OpenTTD NoAI Developers Team\"; }                        \n\
  function GetName()        { return \"DummyAI\"; }                                             \n\
  function GetShortName()   { return \"DUMM\"; }                                                \n\
  function GetDescription() { return \"A Dummy AI that is loaded when your ai/ dir is empty\"; }\n\
  function GetVersion()     { return 1; }                                                       \n\
  function GetDate()        { return \"2008-07-26\"; }                                          \n\
  function CreateInstance() { return \"DummyAI\"; }                                             \n\
}                                                                                               \n\
                                                                                                \n\
RegisterDummyAI(DummyAI());                                                                     \n\
")

info.nut for the dummy AI.

Definition at line 29 of file ai_info_dummy.cpp.

Referenced by AI_CreateAIInfoDummy().