mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-09 15:41:15 +00:00
Change: rewrote squirrel_export in CMake
This commit is contained in:
parent
8794c61f25
commit
4079c47b6c
667
cmake/scripts/SquirrelExport.cmake
Normal file
667
cmake/scripts/SquirrelExport.cmake
Normal file
@ -0,0 +1,667 @@
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
|
||||
if (NOT SCRIPT_API_SOURCE_FILE)
|
||||
message(FATAL_ERROR "Script needs SCRIPT_API_SOURCE_FILE defined")
|
||||
endif (NOT SCRIPT_API_SOURCE_FILE)
|
||||
if (NOT SCRIPT_API_BINARY_FILE)
|
||||
message(FATAL_ERROR "Script needs SCRIPT_API_BINARY_FILE defined")
|
||||
endif (NOT SCRIPT_API_BINARY_FILE)
|
||||
if (NOT SCRIPT_API_FILE)
|
||||
message(FATAL_ERROR "Script needs SCRIPT_API_FILE defined")
|
||||
endif (NOT SCRIPT_API_FILE)
|
||||
if (NOT APIUC)
|
||||
message(FATAL_ERROR "Script needs APIUC defined")
|
||||
endif (NOT APIUC)
|
||||
if (NOT APILC)
|
||||
message(FATAL_ERROR "Script needs APILC defined")
|
||||
endif (NOT APILC)
|
||||
|
||||
macro(dump_fileheader)
|
||||
get_filename_component(SCRIPT_API_FILE_NAME "${SCRIPT_API_FILE}" NAME)
|
||||
string(APPEND SQUIRREL_EXPORT "\n#include \"../${SCRIPT_API_FILE_NAME}\"")
|
||||
if (NOT "${APIUC}" STREQUAL "Template")
|
||||
string(REPLACE "script_" "template_" SCRIPT_API_FILE_NAME "${SCRIPT_API_FILE_NAME}")
|
||||
string(APPEND SQUIRREL_EXPORT "\n#include \"../template/${SCRIPT_API_FILE_NAME}.sq\"")
|
||||
endif (NOT "${APIUC}" STREQUAL "Template")
|
||||
endmacro(dump_fileheader)
|
||||
|
||||
macro(dump_class_templates NAME)
|
||||
string(REGEX REPLACE "^Script" "" REALNAME ${NAME})
|
||||
|
||||
string(APPEND SQUIRREL_EXPORT "\n template <> inline ${NAME} *GetParam(ForceType<${NAME} *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (${NAME} *)instance; }")
|
||||
string(APPEND SQUIRREL_EXPORT "\n template <> inline ${NAME} &GetParam(ForceType<${NAME} &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(${NAME} *)instance; }")
|
||||
string(APPEND SQUIRREL_EXPORT "\n template <> inline const ${NAME} *GetParam(ForceType<const ${NAME} *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (${NAME} *)instance; }")
|
||||
string(APPEND SQUIRREL_EXPORT "\n template <> inline const ${NAME} &GetParam(ForceType<const ${NAME} &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(${NAME} *)instance; }")
|
||||
if ("${NAME}" STREQUAL "ScriptEvent")
|
||||
string(APPEND SQUIRREL_EXPORT "\n template <> inline int Return<${NAME} *>(HSQUIRRELVM vm, ${NAME} *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } Squirrel::CreateClassInstanceVM(vm, \"${REALNAME}\", res, nullptr, DefSQDestructorCallback<${NAME}>, true); return 1; }")
|
||||
elseif ("${NAME}" STREQUAL "ScriptText")
|
||||
string(APPEND SQUIRREL_EXPORT "\n")
|
||||
string(APPEND SQUIRREL_EXPORT "\n template <> inline Text *GetParam(ForceType<Text *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) {")
|
||||
string(APPEND SQUIRREL_EXPORT "\n if (sq_gettype(vm, index) == OT_INSTANCE) {")
|
||||
string(APPEND SQUIRREL_EXPORT "\n return GetParam(ForceType<ScriptText *>(), vm, index, ptr);")
|
||||
string(APPEND SQUIRREL_EXPORT "\n }")
|
||||
string(APPEND SQUIRREL_EXPORT "\n if (sq_gettype(vm, index) == OT_STRING) {")
|
||||
string(APPEND SQUIRREL_EXPORT "\n return new RawText(GetParam(ForceType<const char *>(), vm, index, ptr));")
|
||||
string(APPEND SQUIRREL_EXPORT "\n }")
|
||||
string(APPEND SQUIRREL_EXPORT "\n return nullptr;")
|
||||
string(APPEND SQUIRREL_EXPORT "\n }")
|
||||
else ()
|
||||
string(APPEND SQUIRREL_EXPORT "\n template <> inline int Return<${NAME} *>(HSQUIRRELVM vm, ${NAME} *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, \"${REALNAME}\", res, nullptr, DefSQDestructorCallback<${NAME}>, true); return 1; }")
|
||||
endif ()
|
||||
endmacro(dump_class_templates)
|
||||
|
||||
macro(reset_reader)
|
||||
unset(ENUMS)
|
||||
unset(ENUM_VALUES)
|
||||
unset(CONST_VALUES)
|
||||
unset(STRUCTS)
|
||||
unset(ENUM_STRING_TO_ERRORS)
|
||||
unset(ENUM_ERROR_TO_STRINGS)
|
||||
unset(METHODS)
|
||||
unset(STATIC_METHODS)
|
||||
unset(CLS)
|
||||
unset(START_SQUIRREL_DEFINE_ON_NEXT_LINE)
|
||||
set(CLS_LEVEL 0)
|
||||
unset(CLS_IN_API)
|
||||
endmacro(reset_reader)
|
||||
|
||||
reset_reader()
|
||||
|
||||
file(STRINGS "${SCRIPT_API_FILE}" SOURCE_LINES)
|
||||
|
||||
foreach(LINE IN LISTS SOURCE_LINES)
|
||||
# Ignore special doxygen blocks
|
||||
if ("${LINE}" MATCHES "^#ifndef DOXYGEN_API")
|
||||
set(DOXYGEN_SKIP "next")
|
||||
continue()
|
||||
endif ()
|
||||
if ("${LINE}" MATCHES "^#ifdef DOXYGEN_API")
|
||||
set(DOXYGEN_SKIP "true")
|
||||
continue()
|
||||
endif ()
|
||||
if ("${LINE}" MATCHES "^#endif /\\* DOXYGEN_API \\*/")
|
||||
unset(DOXYGEN_SKIP)
|
||||
continue()
|
||||
endif ()
|
||||
if ("${LINE}" MATCHES "^#else")
|
||||
if ("${DOXYGEN_SKIP}" STREQUAL "next")
|
||||
set(DOXYGEN_SKIP "true")
|
||||
else()
|
||||
unset(DOXYGEN_SKIP)
|
||||
endif()
|
||||
continue()
|
||||
endif ()
|
||||
if ("${DOXYGEN_SKIP}" STREQUAL "true")
|
||||
continue()
|
||||
endif()
|
||||
|
||||
if ("${LINE}" MATCHES "^([ ]*)\\* @api (.*)$")
|
||||
set(LINE ${CMAKE_MATCH_2})
|
||||
# By default, classes are not selected
|
||||
if (NOT CLS_LEVEL)
|
||||
set(API_SELECTED FALSE)
|
||||
endif (NOT CLS_LEVEL)
|
||||
|
||||
if ("${APIUC}" STREQUAL "Template")
|
||||
set(API_SELECTED TRUE)
|
||||
if ("${LINE}" STREQUAL "none" OR "${LINE}" STREQUAL "-all")
|
||||
set(API_SELECTED FALSE)
|
||||
endif ("${LINE}" STREQUAL "none" OR "${LINE}" STREQUAL "-all")
|
||||
continue()
|
||||
endif("${APIUC}" STREQUAL "Template")
|
||||
|
||||
if ("${LINE}" STREQUAL "none" OR "${LINE}" STREQUAL "-all")
|
||||
set(API_SELECTED FALSE)
|
||||
elseif ("${LINE}" MATCHES "-${APILC}")
|
||||
set(API_SELECTED FALSE)
|
||||
elseif ("${LINE}" MATCHES "${APILC}")
|
||||
set(API_SELECTED TRUE)
|
||||
endif ()
|
||||
continue()
|
||||
endif ("${LINE}" MATCHES "^([ ]*)\\* @api (.*)$")
|
||||
|
||||
# Remove the old squirrel stuff
|
||||
if ("${LINE}" MATCHES "#ifdef DEFINE_SQUIRREL_CLASS")
|
||||
set(SQUIRREL_STUFF TRUE)
|
||||
continue()
|
||||
endif ("${LINE}" MATCHES "#ifdef DEFINE_SQUIRREL_CLASS")
|
||||
if ("${LINE}" MATCHES "^#endif /\\* DEFINE_SQUIRREL_CLASS \\*/")
|
||||
unset(SQUIRREL_STUFF)
|
||||
continue()
|
||||
endif ("${LINE}" MATCHES "^#endif /\\* DEFINE_SQUIRREL_CLASS \\*/")
|
||||
if (SQUIRREL_STUFF)
|
||||
continue()
|
||||
endif (SQUIRREL_STUFF)
|
||||
|
||||
# Ignore forward declarations of classes
|
||||
if ("${LINE}" MATCHES "^( *)class(.*);")
|
||||
continue()
|
||||
endif ("${LINE}" MATCHES "^( *)class(.*);")
|
||||
|
||||
# We only want to have public functions exported for now
|
||||
if ("${LINE}" MATCHES "^( *)class (.*) (: public|: protected|: private|:) ([^ ]*)")
|
||||
if (NOT CLS_LEVEL)
|
||||
if (NOT DEFINED API_SELECTED)
|
||||
message(WARNING "Class '${CMAKE_MATCH_2}' has no @api. It won't be published to any API.")
|
||||
set(API_SELECTED FALSE)
|
||||
endif (NOT DEFINED API_SELECTED)
|
||||
unset(IS_PUBLIC)
|
||||
unset(CLS_PARAM_0)
|
||||
set(CLS_PARAM_1 1)
|
||||
set(CLS_PARAM_2 "x")
|
||||
set(CLS_IN_API ${API_SELECTED})
|
||||
unset(API_SELECTED)
|
||||
set(CLS "${CMAKE_MATCH_2}")
|
||||
set(SUPER_CLS "${CMAKE_MATCH_4}")
|
||||
elseif (CLS_LEVEL EQUAL 1)
|
||||
if (NOT DEFINED API_SELECTED)
|
||||
set(API_SELECTED ${CLS_IN_API})
|
||||
endif (NOT API_SELECTED)
|
||||
|
||||
if (API_SELECTED)
|
||||
list(APPEND STRUCTS "${CLS}::${CMAKE_MATCH_2}")
|
||||
endif (API_SELECTED)
|
||||
unset(API_SELECTED)
|
||||
endif ()
|
||||
math(EXPR CLS_LEVEL "${CLS_LEVEL} + 1")
|
||||
continue()
|
||||
endif ("${LINE}" MATCHES "^( *)class (.*) (: public|: protected|: private|:) ([^ ]*)")
|
||||
if ("${LINE}" MATCHES "^( *)public")
|
||||
if (CLS_LEVEL EQUAL 1)
|
||||
set(IS_PUBLIC TRUE)
|
||||
endif (CLS_LEVEL EQUAL 1)
|
||||
continue()
|
||||
endif ("${LINE}" MATCHES "^( *)public")
|
||||
if ("${LINE}" MATCHES "^( *)protected")
|
||||
if (CLS_LEVEL EQUAL 1)
|
||||
unset(IS_PUBLIC)
|
||||
endif (CLS_LEVEL EQUAL 1)
|
||||
continue()
|
||||
endif ("${LINE}" MATCHES "^( *)protected")
|
||||
if ("${LINE}" MATCHES "^( *)private")
|
||||
if (CLS_LEVEL EQUAL 1)
|
||||
unset(IS_PUBLIC)
|
||||
endif (CLS_LEVEL EQUAL 1)
|
||||
continue()
|
||||
endif ("${LINE}" MATCHES "^( *)private")
|
||||
|
||||
# Ignore the comments
|
||||
if ("${LINE}" MATCHES "^#")
|
||||
continue()
|
||||
endif ("${LINE}" MATCHES "^#")
|
||||
if ("${LINE}" MATCHES "/\\*.*\\*/")
|
||||
unset(COMMENT)
|
||||
continue()
|
||||
endif ("${LINE}" MATCHES "/\\*.*\\*/")
|
||||
if ("${LINE}" MATCHES "/\\*")
|
||||
set(COMMENT TRUE)
|
||||
continue()
|
||||
endif ("${LINE}" MATCHES "/\\*")
|
||||
if ("${LINE}" MATCHES "\\*/")
|
||||
unset(COMMENT)
|
||||
continue()
|
||||
endif ("${LINE}" MATCHES "\\*/")
|
||||
if (COMMENT)
|
||||
continue()
|
||||
endif (COMMENT)
|
||||
|
||||
# We need to make specialized conversions for structs
|
||||
if ("${LINE}" MATCHES "^( *)struct ([^ ]*)")
|
||||
math(EXPR CLS_LEVEL "${CLS_LEVEL} + 1")
|
||||
|
||||
# Check if we want to publish this struct
|
||||
if (NOT DEFINED API_SELECTED)
|
||||
set(API_SELECTED ${CLS_IN_API})
|
||||
endif (NOT DEFINED API_SELECTED)
|
||||
if (NOT API_SELECTED)
|
||||
unset(API_SELECTED)
|
||||
continue()
|
||||
endif (NOT API_SELECTED)
|
||||
unset(API_SELECTED)
|
||||
|
||||
if (NOT IS_PUBLIC OR NOT CLS_LEVEL EQUAL 1)
|
||||
continue()
|
||||
endif (NOT IS_PUBLIC OR NOT CLS_LEVEL EQUAL 1)
|
||||
|
||||
list(APPEND STRUCTS "${CLS}::${CMAKE_MATCH_2}")
|
||||
continue()
|
||||
endif ("${LINE}" MATCHES "^( *)struct ([^ ]*)")
|
||||
|
||||
# We need to make specialized conversions for enums
|
||||
if ("${LINE}" MATCHES "^( *)enum ([^ ]*)")
|
||||
math(EXPR CLS_LEVEL "${CLS_LEVEL} + 1")
|
||||
|
||||
# Check if we want to publish this enum
|
||||
if (NOT DEFINED API_SELECTED)
|
||||
set(API_SELECTED ${CLS_IN_API})
|
||||
endif (NOT DEFINED API_SELECTED)
|
||||
if (NOT API_SELECTED)
|
||||
unset(API_SELECTED)
|
||||
continue()
|
||||
endif (NOT API_SELECTED)
|
||||
unset(API_SELECTED)
|
||||
|
||||
if (NOT IS_PUBLIC)
|
||||
continue()
|
||||
endif (NOT IS_PUBLIC)
|
||||
|
||||
set(IN_ENUM TRUE)
|
||||
list(APPEND ENUMS "${CLS}::${CMAKE_MATCH_2}")
|
||||
continue()
|
||||
endif ("${LINE}" MATCHES "^( *)enum ([^ ]*)")
|
||||
|
||||
# Maybe the end of the class, if so we can start with the Squirrel export pretty soon
|
||||
if ("${LINE}" MATCHES "};")
|
||||
math(EXPR CLS_LEVEL "${CLS_LEVEL} - 1")
|
||||
if (CLS_LEVEL)
|
||||
unset(IN_ENUM)
|
||||
continue()
|
||||
endif (CLS_LEVEL)
|
||||
|
||||
if (CLS)
|
||||
set(START_SQUIRREL_DEFINE_ON_NEXT_LINE TRUE)
|
||||
endif (CLS)
|
||||
continue()
|
||||
endif ("${LINE}" MATCHES "};")
|
||||
|
||||
# Empty/white lines. When we may do the Squirrel export, do that export.
|
||||
if ("${LINE}" MATCHES "^([ ]*)$")
|
||||
if (NOT START_SQUIRREL_DEFINE_ON_NEXT_LINE)
|
||||
continue()
|
||||
endif (NOT START_SQUIRREL_DEFINE_ON_NEXT_LINE)
|
||||
|
||||
if (NOT CLS_IN_API)
|
||||
reset_reader()
|
||||
continue()
|
||||
endif (NOT CLS_IN_API)
|
||||
|
||||
if (NOT HAS_FILEHEADER)
|
||||
dump_fileheader()
|
||||
set(HAS_FILEHEADER TRUE)
|
||||
endif (NOT HAS_FILEHEADER)
|
||||
|
||||
unset(IS_PUBLIC)
|
||||
unset(NAMESPACE_OPENED)
|
||||
|
||||
string(REGEX REPLACE "^Script" "${APIUC}" API_CLS "${CLS}")
|
||||
string(REGEX REPLACE "^Script" "${APIUC}" API_SUPER_CLS "${SUPER_CLS}")
|
||||
|
||||
string(APPEND SQUIRREL_EXPORT "\n")
|
||||
|
||||
if ("${APIUC}" STREQUAL "Template")
|
||||
# First check whether we have enums to print
|
||||
if (DEFINED ENUMS)
|
||||
if (NOT NAMESPACE_OPENED)
|
||||
string(APPEND SQUIRREL_EXPORT "\nnamespace SQConvert {")
|
||||
set(NAMESPACE_OPENED TRUE)
|
||||
endif (NOT NAMESPACE_OPENED)
|
||||
string(APPEND SQUIRREL_EXPORT "\n /* Allow enums to be used as Squirrel parameters */")
|
||||
foreach(ENUM IN LISTS ENUMS)
|
||||
string(APPEND SQUIRREL_EXPORT "\n template <> inline ${ENUM} GetParam(ForceType<${ENUM}>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (${ENUM})tmp; }")
|
||||
string(APPEND SQUIRREL_EXPORT "\n template <> inline int Return<${ENUM}>(HSQUIRRELVM vm, ${ENUM} res) { sq_pushinteger(vm, (int32)res); return 1; }")
|
||||
endforeach(ENUM)
|
||||
endif (DEFINED ENUMS)
|
||||
|
||||
# Then check whether we have structs/classes to print
|
||||
if (DEFINED STRUCTS)
|
||||
if (NOT NAMESPACE_OPENED)
|
||||
string(APPEND SQUIRREL_EXPORT "\nnamespace SQConvert {")
|
||||
set(NAMESPACE_OPENED TRUE)
|
||||
endif (NOT NAMESPACE_OPENED)
|
||||
string(APPEND SQUIRREL_EXPORT "\n /* Allow inner classes/structs to be used as Squirrel parameters */")
|
||||
foreach(STRUCT IN LISTS STRUCTS)
|
||||
dump_class_templates(${STRUCT})
|
||||
endforeach(STRUCT)
|
||||
endif (DEFINED STRUCTS)
|
||||
|
||||
if (NOT NAMESPACE_OPENED)
|
||||
string(APPEND SQUIRREL_EXPORT "\nnamespace SQConvert {")
|
||||
set(NAMESPACE_OPENED TRUE)
|
||||
else (NOT NAMESPACE_OPENED)
|
||||
string(APPEND SQUIRREL_EXPORT "\n")
|
||||
endif (NOT NAMESPACE_OPENED)
|
||||
string(APPEND SQUIRREL_EXPORT "\n /* Allow ${CLS} to be used as Squirrel parameter */")
|
||||
dump_class_templates(${CLS})
|
||||
|
||||
string(APPEND SQUIRREL_EXPORT "\n} // namespace SQConvert")
|
||||
|
||||
reset_reader()
|
||||
continue()
|
||||
endif ("${APIUC}" STREQUAL "Template")
|
||||
|
||||
string(APPEND SQUIRREL_EXPORT "\n")
|
||||
string(APPEND SQUIRREL_EXPORT "\ntemplate <> const char *GetClassName<${CLS}, ST_${APIUC}>() { return \"${API_CLS}\"; }")
|
||||
string(APPEND SQUIRREL_EXPORT "\n")
|
||||
|
||||
# Then do the registration functions of the class.
|
||||
string(APPEND SQUIRREL_EXPORT "\nvoid SQ${API_CLS}_Register(Squirrel *engine)")
|
||||
string(APPEND SQUIRREL_EXPORT "\n{")
|
||||
string(APPEND SQUIRREL_EXPORT "\n DefSQClass<${CLS}, ST_${APIUC}> SQ${API_CLS}(\"${API_CLS}\");")
|
||||
if ("${SUPER_CLS}" STREQUAL "Text" OR "${SUPER_CLS}" STREQUAL "ScriptObject" OR "${SUPER_CLS}" STREQUAL "AIAbstractiveList::Valuator")
|
||||
string(APPEND SQUIRREL_EXPORT "\n SQ${API_CLS}.PreRegister(engine);")
|
||||
else ("${SUPER_CLS}" STREQUAL "Text" OR "${SUPER_CLS}" STREQUAL "ScriptObject" OR "${SUPER_CLS}" STREQUAL "AIAbstractiveList::Valuator")
|
||||
string(APPEND SQUIRREL_EXPORT "\n SQ${API_CLS}.PreRegister(engine, \"${API_SUPER_CLS}\");")
|
||||
endif ("${SUPER_CLS}" STREQUAL "Text" OR "${SUPER_CLS}" STREQUAL "ScriptObject" OR "${SUPER_CLS}" STREQUAL "AIAbstractiveList::Valuator")
|
||||
if (NOT "${SUPER_CLS}" STREQUAL "ScriptEvent")
|
||||
if ("${CLS_PARAM_2}" STREQUAL "v")
|
||||
string(APPEND SQUIRREL_EXPORT "\n SQ${API_CLS}.AddSQAdvancedConstructor(engine);")
|
||||
else ("${CLS_PARAM_2}" STREQUAL "v")
|
||||
string(APPEND SQUIRREL_EXPORT "\n SQ${API_CLS}.AddConstructor<void (${CLS}::*)(${CLS_PARAM_0}), ${CLS_PARAM_1}>(engine, \"${CLS_PARAM_2}\");")
|
||||
endif ("${CLS_PARAM_2}" STREQUAL "v")
|
||||
endif (NOT "${SUPER_CLS}" STREQUAL "ScriptEvent")
|
||||
string(APPEND SQUIRREL_EXPORT "\n")
|
||||
|
||||
# Enum values
|
||||
set(MLEN 0)
|
||||
foreach(ENUM_VALUE IN LISTS ENUM_VALUES)
|
||||
string(LENGTH "${ENUM_VALUE}" LEN)
|
||||
if (MLEN LESS LEN)
|
||||
set(MLEN ${LEN})
|
||||
endif (MLEN LESS LEN)
|
||||
endforeach(ENUM_VALUE)
|
||||
foreach(ENUM_VALUE IN LISTS ENUM_VALUES)
|
||||
string(LENGTH "${ENUM_VALUE}" LEN)
|
||||
math(EXPR LEN "${MLEN} - ${LEN}")
|
||||
unset(SPACES)
|
||||
foreach(i RANGE ${LEN})
|
||||
string(APPEND SPACES " ")
|
||||
endforeach(i)
|
||||
string(APPEND SQUIRREL_EXPORT "\n SQ${API_CLS}.DefSQConst(engine, ${CLS}::${ENUM_VALUE},${SPACES}\"${ENUM_VALUE}\");")
|
||||
endforeach(ENUM_VALUE)
|
||||
if (MLEN)
|
||||
string(APPEND SQUIRREL_EXPORT "\n")
|
||||
endif (MLEN)
|
||||
|
||||
# Const values
|
||||
set(MLEN 0)
|
||||
foreach(CONST_VALUE IN LISTS CONST_VALUES)
|
||||
string(LENGTH "${CONST_VALUE}" LEN)
|
||||
if (MLEN LESS LEN)
|
||||
set(MLEN ${LEN})
|
||||
endif (MLEN LESS LEN)
|
||||
endforeach(CONST_VALUE)
|
||||
foreach(CONST_VALUE IN LISTS CONST_VALUES)
|
||||
string(LENGTH "${CONST_VALUE}" LEN)
|
||||
math(EXPR LEN "${MLEN} - ${LEN}")
|
||||
unset(SPACES)
|
||||
foreach(i RANGE ${LEN})
|
||||
string(APPEND SPACES " ")
|
||||
endforeach(i)
|
||||
string(APPEND SQUIRREL_EXPORT "\n SQ${API_CLS}.DefSQConst(engine, ${CLS}::${CONST_VALUE},${SPACES}\"${CONST_VALUE}\");")
|
||||
endforeach(CONST_VALUE)
|
||||
if (MLEN)
|
||||
string(APPEND SQUIRREL_EXPORT "\n")
|
||||
endif (MLEN)
|
||||
|
||||
# Mapping of OTTD strings to errors
|
||||
set(MLEN 0)
|
||||
foreach(ENUM_STRING_TO_ERROR IN LISTS ENUM_STRING_TO_ERRORS)
|
||||
string(REPLACE ":" ";" ENUM_STRING_TO_ERROR "${ENUM_STRING_TO_ERROR}")
|
||||
list(GET ENUM_STRING_TO_ERROR 0 ENUM_STRING)
|
||||
string(LENGTH "${ENUM_STRING}" LEN)
|
||||
if (MLEN LESS LEN)
|
||||
set(MLEN ${LEN})
|
||||
endif (MLEN LESS LEN)
|
||||
endforeach(ENUM_STRING_TO_ERROR)
|
||||
foreach(ENUM_STRING_TO_ERROR IN LISTS ENUM_STRING_TO_ERRORS)
|
||||
string(REPLACE ":" ";" ENUM_STRING_TO_ERROR "${ENUM_STRING_TO_ERROR}")
|
||||
list(GET ENUM_STRING_TO_ERROR 0 ENUM_STRING)
|
||||
list(GET ENUM_STRING_TO_ERROR 1 ENUM_ERROR)
|
||||
string(LENGTH "${ENUM_STRING}" LEN)
|
||||
math(EXPR LEN "${MLEN} - ${LEN}")
|
||||
unset(SPACES)
|
||||
foreach(i RANGE ${LEN})
|
||||
string(APPEND SPACES " ")
|
||||
endforeach(i)
|
||||
string(APPEND SQUIRREL_EXPORT "\n ScriptError::RegisterErrorMap(${ENUM_STRING},${SPACES}${CLS}::${ENUM_ERROR});")
|
||||
endforeach(ENUM_STRING_TO_ERROR)
|
||||
if (MLEN)
|
||||
string(APPEND SQUIRREL_EXPORT "\n")
|
||||
endif (MLEN)
|
||||
|
||||
# Mapping of errors to human 'readable' strings.
|
||||
set(MLEN 0)
|
||||
foreach(ENUM_ERROR_TO_STRING IN LISTS ENUM_ERROR_TO_STRINGS)
|
||||
string(LENGTH "${ENUM_ERROR_TO_STRING}" LEN)
|
||||
if (MLEN LESS LEN)
|
||||
set(MLEN ${LEN})
|
||||
endif (MLEN LESS LEN)
|
||||
endforeach(ENUM_ERROR_TO_STRING)
|
||||
foreach(ENUM_ERROR_TO_STRING IN LISTS ENUM_ERROR_TO_STRINGS)
|
||||
string(LENGTH "${ENUM_ERROR_TO_STRING}" LEN)
|
||||
math(EXPR LEN "${MLEN} - ${LEN}")
|
||||
unset(SPACES)
|
||||
foreach(i RANGE ${LEN})
|
||||
string(APPEND SPACES " ")
|
||||
endforeach(i)
|
||||
string(APPEND SQUIRREL_EXPORT "\n ScriptError::RegisterErrorMapString(${CLS}::${ENUM_ERROR_TO_STRING},${SPACES}\"${ENUM_ERROR_TO_STRING}\");")
|
||||
endforeach(ENUM_ERROR_TO_STRING)
|
||||
if (MLEN)
|
||||
string(APPEND SQUIRREL_EXPORT "\n")
|
||||
endif (MLEN)
|
||||
|
||||
# Static methods
|
||||
set(MLEN 0)
|
||||
foreach(STATIC_METHOD IN LISTS STATIC_METHODS)
|
||||
string(REPLACE ":" ";" STATIC_METHOD "${STATIC_METHOD}")
|
||||
list(GET STATIC_METHOD 0 FUNCNAME)
|
||||
string(LENGTH "${FUNCNAME}" LEN)
|
||||
if (MLEN LESS LEN)
|
||||
set(MLEN ${LEN})
|
||||
endif (MLEN LESS LEN)
|
||||
endforeach(STATIC_METHOD)
|
||||
foreach(STATIC_METHOD IN LISTS STATIC_METHODS)
|
||||
string(REPLACE ":" ";" STATIC_METHOD "${STATIC_METHOD}")
|
||||
list(GET STATIC_METHOD 0 FUNCNAME)
|
||||
list(GET STATIC_METHOD 1 ARGC)
|
||||
list(GET STATIC_METHOD 2 TYPES)
|
||||
string(LENGTH "${FUNCNAME}" LEN)
|
||||
math(EXPR LEN "${MLEN} - ${LEN}")
|
||||
if ("${TYPES}" STREQUAL "v")
|
||||
if (LEN GREATER 8)
|
||||
math(EXPR LEN "${LEN} - 8")
|
||||
else (LEN GREATER 8)
|
||||
set(LEN 0)
|
||||
endif (LEN GREATER 8)
|
||||
endif ("${TYPES}" STREQUAL "v")
|
||||
unset(SPACES)
|
||||
foreach(i RANGE ${LEN})
|
||||
string(APPEND SPACES " ")
|
||||
endforeach(i)
|
||||
if ("${TYPES}" STREQUAL "v")
|
||||
string(APPEND SQUIRREL_EXPORT "\n SQ${API_CLS}.DefSQAdvancedStaticMethod(engine, &${CLS}::${FUNCNAME},${SPACES}\"${FUNCNAME}\");")
|
||||
else ("${TYPES}" STREQUAL "v")
|
||||
string(APPEND SQUIRREL_EXPORT "\n SQ${API_CLS}.DefSQStaticMethod(engine, &${CLS}::${FUNCNAME},${SPACES}\"${FUNCNAME}\",${SPACES}${ARGC}, \"${TYPES}\");")
|
||||
endif ("${TYPES}" STREQUAL "v")
|
||||
endforeach(STATIC_METHOD)
|
||||
if (MLEN)
|
||||
string(APPEND SQUIRREL_EXPORT "\n")
|
||||
endif (MLEN)
|
||||
|
||||
# Non-static methods
|
||||
set(MLEN 0)
|
||||
foreach(METHOD IN LISTS METHODS)
|
||||
string(REPLACE ":" ";" METHOD "${METHOD}")
|
||||
list(GET METHOD 0 FUNCNAME)
|
||||
string(LENGTH "${FUNCNAME}" LEN)
|
||||
if (MLEN LESS LEN)
|
||||
set(MLEN ${LEN})
|
||||
endif (MLEN LESS LEN)
|
||||
endforeach(METHOD)
|
||||
foreach(METHOD IN LISTS METHODS)
|
||||
string(REPLACE ":" ";" METHOD "${METHOD}")
|
||||
list(GET METHOD 0 FUNCNAME)
|
||||
list(GET METHOD 1 ARGC)
|
||||
list(GET METHOD 2 TYPES)
|
||||
string(LENGTH "${FUNCNAME}" LEN)
|
||||
math(EXPR LEN "${MLEN} - ${LEN}")
|
||||
if ("${TYPES}" STREQUAL "v")
|
||||
if (LEN GREATER 8)
|
||||
math(EXPR LEN "${LEN} - 8")
|
||||
else (LEN GREATER 8)
|
||||
set(LEN 0)
|
||||
endif (LEN GREATER 8)
|
||||
endif ("${TYPES}" STREQUAL "v")
|
||||
unset(SPACES)
|
||||
foreach(i RANGE ${LEN})
|
||||
string(APPEND SPACES " ")
|
||||
endforeach(i)
|
||||
if ("${TYPES}" STREQUAL "v")
|
||||
string(APPEND SQUIRREL_EXPORT "\n SQ${API_CLS}.DefSQAdvancedMethod(engine, &${CLS}::${FUNCNAME},${SPACES}\"${FUNCNAME}\");")
|
||||
else ("${TYPES}" STREQUAL "v")
|
||||
string(APPEND SQUIRREL_EXPORT "\n SQ${API_CLS}.DefSQMethod(engine, &${CLS}::${FUNCNAME},${SPACES}\"${FUNCNAME}\",${SPACES}${ARGC}, \"${TYPES}\");")
|
||||
endif ("${TYPES}" STREQUAL "v")
|
||||
endforeach(METHOD)
|
||||
if (MLEN)
|
||||
string(APPEND SQUIRREL_EXPORT "\n")
|
||||
endif (MLEN)
|
||||
|
||||
string(APPEND SQUIRREL_EXPORT "\n SQ${API_CLS}.PostRegister(engine);")
|
||||
string(APPEND SQUIRREL_EXPORT "\n}")
|
||||
|
||||
reset_reader()
|
||||
|
||||
continue()
|
||||
endif ("${LINE}" MATCHES "^([ ]*)$")
|
||||
|
||||
# Skip non-public functions
|
||||
if (NOT IS_PUBLIC)
|
||||
continue()
|
||||
endif (NOT IS_PUBLIC)
|
||||
|
||||
# Add enums
|
||||
if (IN_ENUM)
|
||||
string(REGEX MATCH "([^, ]+)" ENUM_VALUE "${LINE}")
|
||||
list(APPEND ENUM_VALUES "${ENUM_VALUE}")
|
||||
|
||||
# Check if this a special error enum
|
||||
list(GET ENUMS -1 ENUM)
|
||||
if ("${ENUM}" MATCHES ".*::ErrorMessages")
|
||||
# syntax:
|
||||
# enum ErrorMessages {
|
||||
# ERR_SOME_ERROR, // [STR_ITEM1, STR_ITEM2, ...]
|
||||
# }
|
||||
|
||||
# Set the mappings
|
||||
if ("${LINE}" MATCHES "\\[(.*)\\]")
|
||||
string(REGEX REPLACE "[ ]" "" MAPPINGS "${CMAKE_MATCH_1}")
|
||||
string(REPLACE "," ";" MAPPINGS "${MAPPINGS}")
|
||||
|
||||
foreach(MAPPING IN LISTS MAPPINGS)
|
||||
list(APPEND ENUM_STRING_TO_ERRORS "${MAPPING}:${ENUM_VALUE}")
|
||||
endforeach(MAPPING)
|
||||
|
||||
list(APPEND ENUM_ERROR_TO_STRINGS "${ENUM_VALUE}")
|
||||
endif ("${LINE}" MATCHES "\\[(.*)\\]")
|
||||
endif ("${ENUM}" MATCHES ".*::ErrorMessages")
|
||||
continue()
|
||||
endif (IN_ENUM)
|
||||
|
||||
# Add a const (non-enum) value
|
||||
if ("${LINE}" MATCHES "^[ ]*static const [^ ]+ ([^ ]+) = -?\\(?[^ ]*\\)?[^ ]+;")
|
||||
list(APPEND CONST_VALUES "${CMAKE_MATCH_1}")
|
||||
continue()
|
||||
endif ("${LINE}" MATCHES "^[ ]*static const [^ ]+ ([^ ]+) = -?\\(?[^ ]*\\)?[^ ]+;")
|
||||
|
||||
# Add a method to the list
|
||||
if ("${LINE}" MATCHES "^.*\\(.*\\).*$")
|
||||
if (NOT CLS_LEVEL EQUAL 1)
|
||||
continue()
|
||||
endif (NOT CLS_LEVEL EQUAL 1)
|
||||
if ("${LINE}" MATCHES "~")
|
||||
if (DEFINED API_SELECTED)
|
||||
message(WARNING "Destructor for '${CLS}' has @api. Tag ignored.")
|
||||
unset(API_SELECTED)
|
||||
endif (DEFINED API_SELECTED)
|
||||
continue()
|
||||
endif ("${LINE}" MATCHES "~")
|
||||
|
||||
unset(IS_STATIC)
|
||||
if ("${LINE}" MATCHES "static")
|
||||
set(IS_STATIC TRUE)
|
||||
endif ("${LINE}" MATCHES "static")
|
||||
|
||||
string(REGEX REPLACE "(virtual|static|const)[ ]+" "" LINE "${LINE}")
|
||||
string(REGEX REPLACE "{.*" "" LINE "${LINE}")
|
||||
set(PARAM_S "${LINE}")
|
||||
string(REGEX REPLACE "\\*" "" LINE "${LINE}")
|
||||
string(REGEX REPLACE "\\(.*" "" LINE "${LINE}")
|
||||
|
||||
string(REGEX REPLACE ".*\\(" "" PARAM_S "${PARAM_S}")
|
||||
string(REGEX REPLACE "\\).*" "" PARAM_S "${PARAM_S}")
|
||||
|
||||
string(REGEX MATCH "([^ ]+)( ([^ ]+))?" RESULT "${LINE}")
|
||||
set(FUNCTYPE "${CMAKE_MATCH_1}")
|
||||
set(FUNCNAME "${CMAKE_MATCH_3}")
|
||||
if ("${FUNCTYPE}" STREQUAL "${CLS}" AND NOT FUNCNAME)
|
||||
if (DEFINED API_SELECTED)
|
||||
message(WARNING "Constructor for '${CLS}' has @api. Tag ignored.")
|
||||
unset(API_SELECTED)
|
||||
endif (DEFINED API_SELECTED)
|
||||
set(CLS_PARAM_0 "${PARAM_S}")
|
||||
if (NOT PARAM_S)
|
||||
continue()
|
||||
endif (NOT PARAM_S)
|
||||
elseif (NOT FUNCNAME)
|
||||
continue()
|
||||
endif ()
|
||||
|
||||
string(REPLACE "," ";" PARAMS "${PARAM_S}")
|
||||
if (IS_STATIC)
|
||||
set(TYPES ".")
|
||||
else (IS_STATIC)
|
||||
set(TYPES "x")
|
||||
endif (IS_STATIC)
|
||||
|
||||
set(LEN 1)
|
||||
foreach(PARAM IN LISTS PARAMS)
|
||||
math(EXPR LEN "${LEN} + 1")
|
||||
string(STRIP "${PARAM}" PARAM)
|
||||
if ("${PARAM}" MATCHES "\\*|&")
|
||||
if ("${PARAM}" MATCHES "^char")
|
||||
# Many types can be converted to string, so use '.', not 's'. (handled by our glue code)
|
||||
string(APPEND TYPES ".")
|
||||
elseif ("${PARAM}" MATCHES "^void")
|
||||
string(APPEND TYPES "p")
|
||||
elseif ("${PARAM}" MATCHES "^Array")
|
||||
string(APPEND TYPES "a")
|
||||
elseif ("${PARAM}" MATCHES "^struct Array")
|
||||
string(APPEND TYPES "a")
|
||||
elseif ("${PARAM}" MATCHES "^Text")
|
||||
string(APPEND TYPES ".")
|
||||
else ()
|
||||
string(APPEND TYPES "x")
|
||||
endif ()
|
||||
elseif ("${PARAM}" MATCHES "^bool")
|
||||
string(APPEND TYPES "b")
|
||||
elseif ("${PARAM}" MATCHES "^HSQUIRRELVM")
|
||||
set(TYPES "v")
|
||||
else ()
|
||||
string(APPEND TYPES "i")
|
||||
endif ()
|
||||
endforeach(PARAM)
|
||||
|
||||
# Check if we want to publish this function
|
||||
if (NOT DEFINED API_SELECTED)
|
||||
set(API_SELECTED ${CLS_IN_API})
|
||||
endif (NOT DEFINED API_SELECTED)
|
||||
if (NOT API_SELECTED)
|
||||
unset(API_SELECTED)
|
||||
continue()
|
||||
endif (NOT API_SELECTED)
|
||||
unset(API_SELECTED)
|
||||
|
||||
if ("${FUNCTYPE}" STREQUAL "${CLS}" AND NOT FUNCNAME)
|
||||
set(CLS_PARAM_1 ${LEN})
|
||||
set(CLS_PARAM_2 "${TYPES}")
|
||||
elseif ("${FUNCNAME}" MATCHES "^_" AND NOT "${TYPES}" STREQUAL "v")
|
||||
elseif (IS_STATIC)
|
||||
list(APPEND STATIC_METHODS "${FUNCNAME}:${LEN}:${TYPES}")
|
||||
else ()
|
||||
list(APPEND METHODS "${FUNCNAME}:${LEN}:${TYPES}")
|
||||
endif ()
|
||||
continue()
|
||||
endif ("${LINE}" MATCHES "^.*\\(.*\\).*$")
|
||||
endforeach(LINE)
|
||||
|
||||
configure_file(${SCRIPT_API_SOURCE_FILE} ${SCRIPT_API_BINARY_FILE})
|
60
cmake/scripts/SquirrelIncludes.cmake
Normal file
60
cmake/scripts/SquirrelIncludes.cmake
Normal file
@ -0,0 +1,60 @@
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
|
||||
if (NOT INCLUDES_SOURCE_FILE)
|
||||
message(FATAL_ERROR "Script needs INCLUDES_SOURCE_FILE defined")
|
||||
endif (NOT INCLUDES_SOURCE_FILE)
|
||||
if (NOT INCLUDES_BINARY_FILE)
|
||||
message(FATAL_ERROR "Script needs INCLUDES_BINARY_FILE defined")
|
||||
endif (NOT INCLUDES_BINARY_FILE)
|
||||
if (NOT APILC)
|
||||
message(FATAL_ERROR "Script needs APILC defined")
|
||||
endif (NOT APILC)
|
||||
if (NOT APIUC)
|
||||
message(FATAL_ERROR "Script needs APIUC defined")
|
||||
endif (NOT APIUC)
|
||||
|
||||
set(ARGC 1)
|
||||
set(ARG_READ NO)
|
||||
|
||||
# Read all the arguments given to CMake; we are looking for -- and everything
|
||||
# that follows. Those are our api files.
|
||||
while(ARGC LESS CMAKE_ARGC)
|
||||
set(ARG ${CMAKE_ARGV${ARGC}})
|
||||
|
||||
if (ARG_READ)
|
||||
list(APPEND SCRIPT_API_BINARY_FILES "${ARG}")
|
||||
endif (ARG_READ)
|
||||
|
||||
if (ARG STREQUAL "--")
|
||||
set(ARG_READ YES)
|
||||
endif (ARG STREQUAL "--")
|
||||
|
||||
math(EXPR ARGC "${ARGC} + 1")
|
||||
endwhile()
|
||||
|
||||
foreach(FILE IN LISTS SCRIPT_API_BINARY_FILES)
|
||||
file(STRINGS "${FILE}" LINES REGEX "^void SQ${APIUC}.*_Register\\(Squirrel \\*engine\\)$")
|
||||
if (LINES)
|
||||
string(REGEX REPLACE ".*api/${APILC}/(.*)" "#include \"\\1\"" FILE "${FILE}")
|
||||
list(APPEND SQUIRREL_INCLUDES "${FILE}")
|
||||
foreach(LINE IN LISTS LINES)
|
||||
if ("${LINE}" MATCHES "SQ${APIUC}(List|Controller)_Register")
|
||||
continue()
|
||||
endif ("${LINE}" MATCHES "SQ${APIUC}(List|Controller)_Register")
|
||||
string(REGEX REPLACE "^.*void " " " LINE "${LINE}")
|
||||
string(REGEX REPLACE "Squirrel \\*" "" LINE "${LINE}")
|
||||
list(APPEND SQUIRREL_REGISTER "${LINE}")
|
||||
endforeach(LINE)
|
||||
endif (LINES)
|
||||
endforeach(FILE)
|
||||
|
||||
list(SORT SQUIRREL_INCLUDES)
|
||||
string(REPLACE ";" "\n" SQUIRREL_INCLUDES "${SQUIRREL_INCLUDES}")
|
||||
|
||||
string(REGEX REPLACE "_Register" "0000Register" SQUIRREL_REGISTER "${SQUIRREL_REGISTER}")
|
||||
list(SORT SQUIRREL_REGISTER)
|
||||
string(REGEX REPLACE "0000Register" "_Register" SQUIRREL_REGISTER "${SQUIRREL_REGISTER}")
|
||||
string(REPLACE ";" ";\n" SQUIRREL_REGISTER "${SQUIRREL_REGISTER}")
|
||||
set(SQUIRREL_REGISTER " SQ${APIUC}List_Register(engine);\n${SQUIRREL_REGISTER};")
|
||||
|
||||
configure_file(${INCLUDES_SOURCE_FILE} ${INCLUDES_BINARY_FILE})
|
@ -24,60 +24,8 @@
|
||||
/* Manually include the Text glue. */
|
||||
#include "../script/api/template/template_text.hpp.sq"
|
||||
|
||||
/* Convert all AI related classes to Squirrel data.
|
||||
* Note: this line is a marker in squirrel_export.sh. Do not change! */
|
||||
#include "../script/api/ai/ai_accounting.hpp.sq"
|
||||
#include "../script/api/ai/ai_airport.hpp.sq"
|
||||
#include "../script/api/ai/ai_base.hpp.sq"
|
||||
#include "../script/api/ai/ai_basestation.hpp.sq"
|
||||
#include "../script/api/ai/ai_bridge.hpp.sq"
|
||||
#include "../script/api/ai/ai_bridgelist.hpp.sq"
|
||||
#include "../script/api/ai/ai_cargo.hpp.sq"
|
||||
#include "../script/api/ai/ai_cargolist.hpp.sq"
|
||||
#include "../script/api/ai/ai_company.hpp.sq"
|
||||
#include "../script/api/ai/ai_controller.hpp.sq"
|
||||
#include "../script/api/ai/ai_date.hpp.sq"
|
||||
#include "../script/api/ai/ai_depotlist.hpp.sq"
|
||||
#include "../script/api/ai/ai_engine.hpp.sq"
|
||||
#include "../script/api/ai/ai_enginelist.hpp.sq"
|
||||
#include "../script/api/ai/ai_error.hpp.sq"
|
||||
#include "../script/api/ai/ai_event.hpp.sq"
|
||||
#include "../script/api/ai/ai_event_types.hpp.sq"
|
||||
#include "../script/api/ai/ai_execmode.hpp.sq"
|
||||
#include "../script/api/ai/ai_gamesettings.hpp.sq"
|
||||
#include "../script/api/ai/ai_group.hpp.sq"
|
||||
#include "../script/api/ai/ai_grouplist.hpp.sq"
|
||||
#include "../script/api/ai/ai_industry.hpp.sq"
|
||||
#include "../script/api/ai/ai_industrylist.hpp.sq"
|
||||
#include "../script/api/ai/ai_industrytype.hpp.sq"
|
||||
#include "../script/api/ai/ai_industrytypelist.hpp.sq"
|
||||
#include "../script/api/ai/ai_infrastructure.hpp.sq"
|
||||
#include "../script/api/ai/ai_list.hpp.sq"
|
||||
#include "../script/api/ai/ai_log.hpp.sq"
|
||||
#include "../script/api/ai/ai_map.hpp.sq"
|
||||
#include "../script/api/ai/ai_marine.hpp.sq"
|
||||
#include "../script/api/ai/ai_order.hpp.sq"
|
||||
#include "../script/api/ai/ai_priorityqueue.hpp.sq"
|
||||
#include "../script/api/ai/ai_rail.hpp.sq"
|
||||
#include "../script/api/ai/ai_railtypelist.hpp.sq"
|
||||
#include "../script/api/ai/ai_road.hpp.sq"
|
||||
#include "../script/api/ai/ai_roadtypelist.hpp.sq"
|
||||
#include "../script/api/ai/ai_sign.hpp.sq"
|
||||
#include "../script/api/ai/ai_signlist.hpp.sq"
|
||||
#include "../script/api/ai/ai_station.hpp.sq"
|
||||
#include "../script/api/ai/ai_stationlist.hpp.sq"
|
||||
#include "../script/api/ai/ai_subsidy.hpp.sq"
|
||||
#include "../script/api/ai/ai_subsidylist.hpp.sq"
|
||||
#include "../script/api/ai/ai_testmode.hpp.sq"
|
||||
#include "../script/api/ai/ai_tile.hpp.sq"
|
||||
#include "../script/api/ai/ai_tilelist.hpp.sq"
|
||||
#include "../script/api/ai/ai_town.hpp.sq"
|
||||
#include "../script/api/ai/ai_townlist.hpp.sq"
|
||||
#include "../script/api/ai/ai_tunnel.hpp.sq"
|
||||
#include "../script/api/ai/ai_vehicle.hpp.sq"
|
||||
#include "../script/api/ai/ai_vehiclelist.hpp.sq"
|
||||
#include "../script/api/ai/ai_waypoint.hpp.sq"
|
||||
#include "../script/api/ai/ai_waypointlist.hpp.sq"
|
||||
/* Convert all AI related classes to Squirrel data. */
|
||||
#include "../script/api/ai/ai_includes.hpp"
|
||||
|
||||
#include "../company_base.h"
|
||||
#include "../company_func.h"
|
||||
@ -102,112 +50,8 @@ void AIInstance::RegisterAPI()
|
||||
{
|
||||
ScriptInstance::RegisterAPI();
|
||||
|
||||
/* Register all classes */
|
||||
SQAIList_Register(this->engine);
|
||||
SQAIAccounting_Register(this->engine);
|
||||
SQAIAirport_Register(this->engine);
|
||||
SQAIBase_Register(this->engine);
|
||||
SQAIBaseStation_Register(this->engine);
|
||||
SQAIBridge_Register(this->engine);
|
||||
SQAIBridgeList_Register(this->engine);
|
||||
SQAIBridgeList_Length_Register(this->engine);
|
||||
SQAICargo_Register(this->engine);
|
||||
SQAICargoList_Register(this->engine);
|
||||
SQAICargoList_IndustryAccepting_Register(this->engine);
|
||||
SQAICargoList_IndustryProducing_Register(this->engine);
|
||||
SQAICargoList_StationAccepting_Register(this->engine);
|
||||
SQAICompany_Register(this->engine);
|
||||
SQAIDate_Register(this->engine);
|
||||
SQAIDepotList_Register(this->engine);
|
||||
SQAIEngine_Register(this->engine);
|
||||
SQAIEngineList_Register(this->engine);
|
||||
SQAIError_Register(this->engine);
|
||||
SQAIEvent_Register(this->engine);
|
||||
SQAIEventAircraftDestTooFar_Register(this->engine);
|
||||
SQAIEventCompanyAskMerger_Register(this->engine);
|
||||
SQAIEventCompanyBankrupt_Register(this->engine);
|
||||
SQAIEventCompanyInTrouble_Register(this->engine);
|
||||
SQAIEventCompanyMerger_Register(this->engine);
|
||||
SQAIEventCompanyNew_Register(this->engine);
|
||||
SQAIEventCompanyTown_Register(this->engine);
|
||||
SQAIEventController_Register(this->engine);
|
||||
SQAIEventDisasterZeppelinerCleared_Register(this->engine);
|
||||
SQAIEventDisasterZeppelinerCrashed_Register(this->engine);
|
||||
SQAIEventEngineAvailable_Register(this->engine);
|
||||
SQAIEventEnginePreview_Register(this->engine);
|
||||
SQAIEventExclusiveTransportRights_Register(this->engine);
|
||||
SQAIEventIndustryClose_Register(this->engine);
|
||||
SQAIEventIndustryOpen_Register(this->engine);
|
||||
SQAIEventRoadReconstruction_Register(this->engine);
|
||||
SQAIEventStationFirstVehicle_Register(this->engine);
|
||||
SQAIEventSubsidyAwarded_Register(this->engine);
|
||||
SQAIEventSubsidyExpired_Register(this->engine);
|
||||
SQAIEventSubsidyOffer_Register(this->engine);
|
||||
SQAIEventSubsidyOfferExpired_Register(this->engine);
|
||||
SQAIEventTownFounded_Register(this->engine);
|
||||
SQAIEventVehicleAutoReplaced_Register(this->engine);
|
||||
SQAIEventVehicleCrashed_Register(this->engine);
|
||||
SQAIEventVehicleLost_Register(this->engine);
|
||||
SQAIEventVehicleUnprofitable_Register(this->engine);
|
||||
SQAIEventVehicleWaitingInDepot_Register(this->engine);
|
||||
SQAIExecMode_Register(this->engine);
|
||||
SQAIGameSettings_Register(this->engine);
|
||||
SQAIGroup_Register(this->engine);
|
||||
SQAIGroupList_Register(this->engine);
|
||||
SQAIIndustry_Register(this->engine);
|
||||
SQAIIndustryList_Register(this->engine);
|
||||
SQAIIndustryList_CargoAccepting_Register(this->engine);
|
||||
SQAIIndustryList_CargoProducing_Register(this->engine);
|
||||
SQAIIndustryType_Register(this->engine);
|
||||
SQAIIndustryTypeList_Register(this->engine);
|
||||
SQAIInfrastructure_Register(this->engine);
|
||||
SQAILog_Register(this->engine);
|
||||
SQAIMap_Register(this->engine);
|
||||
SQAIMarine_Register(this->engine);
|
||||
SQAIOrder_Register(this->engine);
|
||||
SQAIPriorityQueue_Register(this->engine);
|
||||
SQAIRail_Register(this->engine);
|
||||
SQAIRailTypeList_Register(this->engine);
|
||||
SQAIRoad_Register(this->engine);
|
||||
SQAIRoadTypeList_Register(this->engine);
|
||||
SQAISign_Register(this->engine);
|
||||
SQAISignList_Register(this->engine);
|
||||
SQAIStation_Register(this->engine);
|
||||
SQAIStationList_Register(this->engine);
|
||||
SQAIStationList_Cargo_Register(this->engine);
|
||||
SQAIStationList_CargoPlanned_Register(this->engine);
|
||||
SQAIStationList_CargoPlannedByFrom_Register(this->engine);
|
||||
SQAIStationList_CargoPlannedByVia_Register(this->engine);
|
||||
SQAIStationList_CargoPlannedFromByVia_Register(this->engine);
|
||||
SQAIStationList_CargoPlannedViaByFrom_Register(this->engine);
|
||||
SQAIStationList_CargoWaiting_Register(this->engine);
|
||||
SQAIStationList_CargoWaitingByFrom_Register(this->engine);
|
||||
SQAIStationList_CargoWaitingByVia_Register(this->engine);
|
||||
SQAIStationList_CargoWaitingFromByVia_Register(this->engine);
|
||||
SQAIStationList_CargoWaitingViaByFrom_Register(this->engine);
|
||||
SQAIStationList_Vehicle_Register(this->engine);
|
||||
SQAISubsidy_Register(this->engine);
|
||||
SQAISubsidyList_Register(this->engine);
|
||||
SQAITestMode_Register(this->engine);
|
||||
SQAITile_Register(this->engine);
|
||||
SQAITileList_Register(this->engine);
|
||||
SQAITileList_IndustryAccepting_Register(this->engine);
|
||||
SQAITileList_IndustryProducing_Register(this->engine);
|
||||
SQAITileList_StationType_Register(this->engine);
|
||||
SQAITown_Register(this->engine);
|
||||
SQAITownEffectList_Register(this->engine);
|
||||
SQAITownList_Register(this->engine);
|
||||
SQAITunnel_Register(this->engine);
|
||||
SQAIVehicle_Register(this->engine);
|
||||
SQAIVehicleList_Register(this->engine);
|
||||
SQAIVehicleList_DefaultGroup_Register(this->engine);
|
||||
SQAIVehicleList_Depot_Register(this->engine);
|
||||
SQAIVehicleList_Group_Register(this->engine);
|
||||
SQAIVehicleList_SharedOrders_Register(this->engine);
|
||||
SQAIVehicleList_Station_Register(this->engine);
|
||||
SQAIWaypoint_Register(this->engine);
|
||||
SQAIWaypointList_Register(this->engine);
|
||||
SQAIWaypointList_Vehicle_Register(this->engine);
|
||||
/* Register all classes */
|
||||
SQAI_RegisterAll(this->engine);
|
||||
|
||||
if (!this->LoadCompatibilityScripts(this->versionAPI, AI_DIR)) this->Died();
|
||||
}
|
||||
|
@ -20,72 +20,8 @@
|
||||
#include "game_text.hpp"
|
||||
#include "game.hpp"
|
||||
|
||||
/* Convert all Game related classes to Squirrel data.
|
||||
* Note: this line is a marker in squirrel_export.sh. Do not change! */
|
||||
#include "../script/api/game/game_accounting.hpp.sq"
|
||||
#include "../script/api/game/game_admin.hpp.sq"
|
||||
#include "../script/api/game/game_airport.hpp.sq"
|
||||
#include "../script/api/game/game_base.hpp.sq"
|
||||
#include "../script/api/game/game_basestation.hpp.sq"
|
||||
#include "../script/api/game/game_bridge.hpp.sq"
|
||||
#include "../script/api/game/game_bridgelist.hpp.sq"
|
||||
#include "../script/api/game/game_cargo.hpp.sq"
|
||||
#include "../script/api/game/game_cargolist.hpp.sq"
|
||||
#include "../script/api/game/game_cargomonitor.hpp.sq"
|
||||
#include "../script/api/game/game_client.hpp.sq"
|
||||
#include "../script/api/game/game_clientlist.hpp.sq"
|
||||
#include "../script/api/game/game_company.hpp.sq"
|
||||
#include "../script/api/game/game_companymode.hpp.sq"
|
||||
#include "../script/api/game/game_controller.hpp.sq"
|
||||
#include "../script/api/game/game_date.hpp.sq"
|
||||
#include "../script/api/game/game_depotlist.hpp.sq"
|
||||
#include "../script/api/game/game_engine.hpp.sq"
|
||||
#include "../script/api/game/game_enginelist.hpp.sq"
|
||||
#include "../script/api/game/game_error.hpp.sq"
|
||||
#include "../script/api/game/game_event.hpp.sq"
|
||||
#include "../script/api/game/game_event_types.hpp.sq"
|
||||
#include "../script/api/game/game_execmode.hpp.sq"
|
||||
#include "../script/api/game/game_game.hpp.sq"
|
||||
#include "../script/api/game/game_gamesettings.hpp.sq"
|
||||
#include "../script/api/game/game_goal.hpp.sq"
|
||||
#include "../script/api/game/game_industry.hpp.sq"
|
||||
#include "../script/api/game/game_industrylist.hpp.sq"
|
||||
#include "../script/api/game/game_industrytype.hpp.sq"
|
||||
#include "../script/api/game/game_industrytypelist.hpp.sq"
|
||||
#include "../script/api/game/game_infrastructure.hpp.sq"
|
||||
#include "../script/api/game/game_list.hpp.sq"
|
||||
#include "../script/api/game/game_log.hpp.sq"
|
||||
#include "../script/api/game/game_map.hpp.sq"
|
||||
#include "../script/api/game/game_marine.hpp.sq"
|
||||
#include "../script/api/game/game_news.hpp.sq"
|
||||
#include "../script/api/game/game_order.hpp.sq"
|
||||
#include "../script/api/game/game_priorityqueue.hpp.sq"
|
||||
#include "../script/api/game/game_rail.hpp.sq"
|
||||
#include "../script/api/game/game_railtypelist.hpp.sq"
|
||||
#include "../script/api/game/game_road.hpp.sq"
|
||||
#include "../script/api/game/game_roadtypelist.hpp.sq"
|
||||
#include "../script/api/game/game_sign.hpp.sq"
|
||||
#include "../script/api/game/game_signlist.hpp.sq"
|
||||
#include "../script/api/game/game_station.hpp.sq"
|
||||
#include "../script/api/game/game_stationlist.hpp.sq"
|
||||
#include "../script/api/game/game_story_page.hpp.sq"
|
||||
#include "../script/api/game/game_storypageelementlist.hpp.sq"
|
||||
#include "../script/api/game/game_storypagelist.hpp.sq"
|
||||
#include "../script/api/game/game_subsidy.hpp.sq"
|
||||
#include "../script/api/game/game_subsidylist.hpp.sq"
|
||||
#include "../script/api/game/game_testmode.hpp.sq"
|
||||
#include "../script/api/game/game_text.hpp.sq"
|
||||
#include "../script/api/game/game_tile.hpp.sq"
|
||||
#include "../script/api/game/game_tilelist.hpp.sq"
|
||||
#include "../script/api/game/game_town.hpp.sq"
|
||||
#include "../script/api/game/game_townlist.hpp.sq"
|
||||
#include "../script/api/game/game_tunnel.hpp.sq"
|
||||
#include "../script/api/game/game_vehicle.hpp.sq"
|
||||
#include "../script/api/game/game_vehiclelist.hpp.sq"
|
||||
#include "../script/api/game/game_viewport.hpp.sq"
|
||||
#include "../script/api/game/game_waypoint.hpp.sq"
|
||||
#include "../script/api/game/game_waypointlist.hpp.sq"
|
||||
#include "../script/api/game/game_window.hpp.sq"
|
||||
/* Convert all Game related classes to Squirrel data. */
|
||||
#include "../script/api/game/game_includes.hpp"
|
||||
|
||||
#include "../safeguards.h"
|
||||
|
||||
@ -108,119 +44,8 @@ void GameInstance::RegisterAPI()
|
||||
{
|
||||
ScriptInstance::RegisterAPI();
|
||||
|
||||
/* Register all classes */
|
||||
SQGSList_Register(this->engine);
|
||||
SQGSAccounting_Register(this->engine);
|
||||
SQGSAdmin_Register(this->engine);
|
||||
SQGSAirport_Register(this->engine);
|
||||
SQGSBase_Register(this->engine);
|
||||
SQGSBaseStation_Register(this->engine);
|
||||
SQGSBridge_Register(this->engine);
|
||||
SQGSBridgeList_Register(this->engine);
|
||||
SQGSBridgeList_Length_Register(this->engine);
|
||||
SQGSCargo_Register(this->engine);
|
||||
SQGSCargoList_Register(this->engine);
|
||||
SQGSCargoList_IndustryAccepting_Register(this->engine);
|
||||
SQGSCargoList_IndustryProducing_Register(this->engine);
|
||||
SQGSCargoList_StationAccepting_Register(this->engine);
|
||||
SQGSCargoMonitor_Register(this->engine);
|
||||
SQGSClient_Register(this->engine);
|
||||
SQGSClientList_Register(this->engine);
|
||||
SQGSClientList_Company_Register(this->engine);
|
||||
SQGSCompany_Register(this->engine);
|
||||
SQGSCompanyMode_Register(this->engine);
|
||||
SQGSDate_Register(this->engine);
|
||||
SQGSDepotList_Register(this->engine);
|
||||
SQGSEngine_Register(this->engine);
|
||||
SQGSEngineList_Register(this->engine);
|
||||
SQGSError_Register(this->engine);
|
||||
SQGSEvent_Register(this->engine);
|
||||
SQGSEventAdminPort_Register(this->engine);
|
||||
SQGSEventCompanyBankrupt_Register(this->engine);
|
||||
SQGSEventCompanyInTrouble_Register(this->engine);
|
||||
SQGSEventCompanyMerger_Register(this->engine);
|
||||
SQGSEventCompanyNew_Register(this->engine);
|
||||
SQGSEventCompanyTown_Register(this->engine);
|
||||
SQGSEventController_Register(this->engine);
|
||||
SQGSEventExclusiveTransportRights_Register(this->engine);
|
||||
SQGSEventGoalQuestionAnswer_Register(this->engine);
|
||||
SQGSEventIndustryClose_Register(this->engine);
|
||||
SQGSEventIndustryOpen_Register(this->engine);
|
||||
SQGSEventRoadReconstruction_Register(this->engine);
|
||||
SQGSEventStationFirstVehicle_Register(this->engine);
|
||||
SQGSEventStoryPageButtonClick_Register(this->engine);
|
||||
SQGSEventStoryPageTileSelect_Register(this->engine);
|
||||
SQGSEventStoryPageVehicleSelect_Register(this->engine);
|
||||
SQGSEventSubsidyAwarded_Register(this->engine);
|
||||
SQGSEventSubsidyExpired_Register(this->engine);
|
||||
SQGSEventSubsidyOffer_Register(this->engine);
|
||||
SQGSEventSubsidyOfferExpired_Register(this->engine);
|
||||
SQGSEventTownFounded_Register(this->engine);
|
||||
SQGSEventVehicleCrashed_Register(this->engine);
|
||||
SQGSEventWindowWidgetClick_Register(this->engine);
|
||||
SQGSExecMode_Register(this->engine);
|
||||
SQGSGame_Register(this->engine);
|
||||
SQGSGameSettings_Register(this->engine);
|
||||
SQGSGoal_Register(this->engine);
|
||||
SQGSIndustry_Register(this->engine);
|
||||
SQGSIndustryList_Register(this->engine);
|
||||
SQGSIndustryList_CargoAccepting_Register(this->engine);
|
||||
SQGSIndustryList_CargoProducing_Register(this->engine);
|
||||
SQGSIndustryType_Register(this->engine);
|
||||
SQGSIndustryTypeList_Register(this->engine);
|
||||
SQGSInfrastructure_Register(this->engine);
|
||||
SQGSLog_Register(this->engine);
|
||||
SQGSMap_Register(this->engine);
|
||||
SQGSMarine_Register(this->engine);
|
||||
SQGSNews_Register(this->engine);
|
||||
SQGSOrder_Register(this->engine);
|
||||
SQGSPriorityQueue_Register(this->engine);
|
||||
SQGSRail_Register(this->engine);
|
||||
SQGSRailTypeList_Register(this->engine);
|
||||
SQGSRoad_Register(this->engine);
|
||||
SQGSRoadTypeList_Register(this->engine);
|
||||
SQGSSign_Register(this->engine);
|
||||
SQGSSignList_Register(this->engine);
|
||||
SQGSStation_Register(this->engine);
|
||||
SQGSStationList_Register(this->engine);
|
||||
SQGSStationList_Cargo_Register(this->engine);
|
||||
SQGSStationList_CargoPlanned_Register(this->engine);
|
||||
SQGSStationList_CargoPlannedByFrom_Register(this->engine);
|
||||
SQGSStationList_CargoPlannedByVia_Register(this->engine);
|
||||
SQGSStationList_CargoPlannedFromByVia_Register(this->engine);
|
||||
SQGSStationList_CargoPlannedViaByFrom_Register(this->engine);
|
||||
SQGSStationList_CargoWaiting_Register(this->engine);
|
||||
SQGSStationList_CargoWaitingByFrom_Register(this->engine);
|
||||
SQGSStationList_CargoWaitingByVia_Register(this->engine);
|
||||
SQGSStationList_CargoWaitingFromByVia_Register(this->engine);
|
||||
SQGSStationList_CargoWaitingViaByFrom_Register(this->engine);
|
||||
SQGSStationList_Vehicle_Register(this->engine);
|
||||
SQGSStoryPage_Register(this->engine);
|
||||
SQGSStoryPageElementList_Register(this->engine);
|
||||
SQGSStoryPageList_Register(this->engine);
|
||||
SQGSSubsidy_Register(this->engine);
|
||||
SQGSSubsidyList_Register(this->engine);
|
||||
SQGSTestMode_Register(this->engine);
|
||||
SQGSText_Register(this->engine);
|
||||
SQGSTile_Register(this->engine);
|
||||
SQGSTileList_Register(this->engine);
|
||||
SQGSTileList_IndustryAccepting_Register(this->engine);
|
||||
SQGSTileList_IndustryProducing_Register(this->engine);
|
||||
SQGSTileList_StationType_Register(this->engine);
|
||||
SQGSTown_Register(this->engine);
|
||||
SQGSTownEffectList_Register(this->engine);
|
||||
SQGSTownList_Register(this->engine);
|
||||
SQGSTunnel_Register(this->engine);
|
||||
SQGSVehicle_Register(this->engine);
|
||||
SQGSVehicleList_Register(this->engine);
|
||||
SQGSVehicleList_Depot_Register(this->engine);
|
||||
SQGSVehicleList_SharedOrders_Register(this->engine);
|
||||
SQGSVehicleList_Station_Register(this->engine);
|
||||
SQGSViewport_Register(this->engine);
|
||||
SQGSWaypoint_Register(this->engine);
|
||||
SQGSWaypointList_Register(this->engine);
|
||||
SQGSWaypointList_Vehicle_Register(this->engine);
|
||||
SQGSWindow_Register(this->engine);
|
||||
/* Register all classes */
|
||||
SQGS_RegisterAll(this->engine);
|
||||
|
||||
RegisterGameTranslation(this->engine);
|
||||
|
||||
|
@ -1,3 +1,7 @@
|
||||
add_library(script_api
|
||||
INTERFACE
|
||||
)
|
||||
|
||||
# Get script_window.hpp dependencies
|
||||
file(STRINGS ${CMAKE_CURRENT_SOURCE_DIR}/script_window.hpp.in ENUM_LINES REGEX "@enum")
|
||||
foreach(ENUM IN LISTS ENUM_LINES)
|
||||
@ -13,7 +17,6 @@ add_custom_command_timestamp(OUTPUT ${CMAKE_BINARY_DIR}/generated/script/api/scr
|
||||
-DGENERATE_SOURCE_FILE=${CMAKE_CURRENT_SOURCE_DIR}/script_window.hpp.in
|
||||
-DGENERATE_BINARY_FILE=${CMAKE_BINARY_DIR}/generated/script/api/script_window.hpp
|
||||
-P ${CMAKE_SOURCE_DIR}/cmake/scripts/GenerateWidget.cmake
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/generated/script/api/dummy # dummy directory for #include "../script_window.hpp"
|
||||
MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/script_window.hpp.in
|
||||
DEPENDS ${CMAKE_SOURCE_DIR}/cmake/scripts/GenerateWidget.cmake ${DEPENDENCIES}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
@ -23,19 +26,94 @@ add_custom_target_timestamp(script_window
|
||||
DEPENDS
|
||||
${CMAKE_BINARY_DIR}/generated/script/api/script_window.hpp
|
||||
)
|
||||
|
||||
add_library(script_api
|
||||
INTERFACE
|
||||
)
|
||||
target_include_directories(script_api
|
||||
INTERFACE
|
||||
${CMAKE_BINARY_DIR}/generated/script/api/
|
||||
${CMAKE_BINARY_DIR}/generated/script/api/dummy # dummy path so #include "../script_window.hpp" works
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
add_dependencies(script_api
|
||||
script_window
|
||||
)
|
||||
|
||||
file(GLOB SCRIPT_API_FILES "script_*.hpp")
|
||||
list(APPEND SCRIPT_API_FILES ${CMAKE_BINARY_DIR}/generated/script/api/script_window.hpp)
|
||||
|
||||
foreach(API "ai;AI" "game;GS" "template;Template")
|
||||
list(GET API 0 APILC)
|
||||
list(GET API 1 APIUC)
|
||||
|
||||
foreach(SCRIPT_API_FILE IN LISTS SCRIPT_API_FILES)
|
||||
if ("${SCRIPT_API_FILE}" MATCHES ".*script_controller.*")
|
||||
continue()
|
||||
endif ("${SCRIPT_API_FILE}" MATCHES ".*script_controller.*")
|
||||
get_filename_component(SCRIPT_API_FILE_NAME "${SCRIPT_API_FILE}" NAME)
|
||||
string(REPLACE "script_" "${APILC}_" SCRIPT_API_FILE_NAME "${SCRIPT_API_FILE_NAME}")
|
||||
set(SCRIPT_API_BINARY_FILE "${CMAKE_BINARY_DIR}/generated/script/api/${APILC}/${SCRIPT_API_FILE_NAME}.sq")
|
||||
|
||||
add_custom_command_timestamp(OUTPUT ${SCRIPT_API_BINARY_FILE}
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-DSCRIPT_API_SOURCE_FILE=${CMAKE_CURRENT_SOURCE_DIR}/squirrel_export.hpp.sq.in
|
||||
-DSCRIPT_API_BINARY_FILE=${SCRIPT_API_BINARY_FILE}
|
||||
-DSCRIPT_API_FILE=${SCRIPT_API_FILE}
|
||||
-DAPIUC=${APIUC}
|
||||
-DAPILC=${APILC}
|
||||
-P ${CMAKE_SOURCE_DIR}/cmake/scripts/SquirrelExport.cmake
|
||||
MAIN_DEPENDENCY ${SCRIPT_API_FILE}
|
||||
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/squirrel_export.hpp.sq.in
|
||||
${CMAKE_SOURCE_DIR}/cmake/scripts/SquirrelExport.cmake
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
COMMENT "Generating ${APILC}/${SCRIPT_API_FILE_NAME}.sq"
|
||||
)
|
||||
list(APPEND SCRIPT_${APIUC}_BINARY_FILES ${SCRIPT_API_BINARY_FILE})
|
||||
endforeach(SCRIPT_API_FILE)
|
||||
|
||||
add_custom_target_timestamp(script_${APILC}
|
||||
DEPENDS
|
||||
${SCRIPT_${APIUC}_BINARY_FILES}
|
||||
)
|
||||
add_dependencies(script_${APILC}
|
||||
script_window
|
||||
)
|
||||
|
||||
if (NOT "${APILC}" STREQUAL "template")
|
||||
list(APPEND SCRIPT_${APIUC}_BINARY_FILES "${CMAKE_CURRENT_SOURCE_DIR}/${APILC}/${APILC}_controller.hpp.sq")
|
||||
set(INCLUDES_BINARY_FILE "${CMAKE_BINARY_DIR}/generated/script/api/${APILC}/${APILC}_includes.hpp")
|
||||
add_custom_command_timestamp(OUTPUT ${INCLUDES_BINARY_FILE}
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-DINCLUDES_SOURCE_FILE=${CMAKE_CURRENT_SOURCE_DIR}/script_includes.hpp.in
|
||||
-DINCLUDES_BINARY_FILE=${INCLUDES_BINARY_FILE}
|
||||
-DAPIUC=${APIUC}
|
||||
-DAPILC=${APILC}
|
||||
-P ${CMAKE_SOURCE_DIR}/cmake/scripts/SquirrelIncludes.cmake
|
||||
--
|
||||
${SCRIPT_${APIUC}_BINARY_FILES}
|
||||
MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/script_includes.hpp.in
|
||||
DEPENDS ${SCRIPT_${APIUC}_BINARY_FILES}
|
||||
${CMAKE_SOURCE_DIR}/cmake/scripts/SquirrelIncludes.cmake
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
COMMENT "Generating ${APILC}/${APILC}_includes.hpp"
|
||||
)
|
||||
add_custom_target_timestamp(script_${APILC}_includes
|
||||
DEPENDS
|
||||
${INCLUDES_BINARY_FILE}
|
||||
)
|
||||
add_dependencies(script_${APILC}_includes
|
||||
script_${APILC}
|
||||
)
|
||||
add_dependencies(script_api
|
||||
script_${APILC}_includes
|
||||
)
|
||||
else (NOT "${APILC}" STREQUAL "template")
|
||||
add_dependencies(script_api
|
||||
script_${APILC}
|
||||
)
|
||||
endif (NOT "${APILC}" STREQUAL "template")
|
||||
|
||||
target_include_directories(script_api
|
||||
INTERFACE
|
||||
${CMAKE_BINARY_DIR}/generated/script
|
||||
${CMAKE_BINARY_DIR}/generated/script/api/${APILC}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/${APILC}
|
||||
)
|
||||
endforeach(API)
|
||||
|
||||
add_library(openttd::script_api ALIAS script_api)
|
||||
|
||||
|
||||
|
@ -98,7 +98,7 @@ FILE_PATTERNS = script_*.hpp \
|
||||
RECURSIVE = YES
|
||||
EXCLUDE =
|
||||
EXCLUDE_SYMLINKS = NO
|
||||
EXCLUDE_PATTERNS =
|
||||
EXCLUDE_PATTERNS = ai_includes.hpp
|
||||
EXCLUDE_SYMBOLS = GetClassName DECLARE_ENUM_AS_BIT_SET DECLARE_POSTFIX_INCREMENT
|
||||
EXAMPLE_PATH =
|
||||
EXAMPLE_PATTERNS = *
|
||||
|
@ -98,7 +98,7 @@ FILE_PATTERNS = script_*.hpp \
|
||||
RECURSIVE = YES
|
||||
EXCLUDE =
|
||||
EXCLUDE_SYMLINKS = NO
|
||||
EXCLUDE_PATTERNS =
|
||||
EXCLUDE_PATTERNS = game_includes.hpp
|
||||
EXCLUDE_SYMBOLS = GetClassName DECLARE_ENUM_AS_BIT_SET DECLARE_POSTFIX_INCREMENT
|
||||
EXAMPLE_PATH =
|
||||
EXAMPLE_PATTERNS = *
|
||||
|
@ -1,26 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_accounting.hpp"
|
||||
#include "../template/template_accounting.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptAccounting, ST_AI>() { return "AIAccounting"; }
|
||||
|
||||
void SQAIAccounting_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptAccounting, ST_AI> SQAIAccounting("AIAccounting");
|
||||
SQAIAccounting.PreRegister(engine);
|
||||
SQAIAccounting.AddConstructor<void (ScriptAccounting::*)(), 1>(engine, "x");
|
||||
|
||||
SQAIAccounting.DefSQMethod(engine, &ScriptAccounting::GetCosts, "GetCosts", 1, "x");
|
||||
SQAIAccounting.DefSQMethod(engine, &ScriptAccounting::ResetCosts, "ResetCosts", 1, "x");
|
||||
|
||||
SQAIAccounting.PostRegister(engine);
|
||||
}
|
@ -1,56 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_airport.hpp"
|
||||
#include "../template/template_airport.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptAirport, ST_AI>() { return "AIAirport"; }
|
||||
|
||||
void SQAIAirport_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptAirport, ST_AI> SQAIAirport("AIAirport");
|
||||
SQAIAirport.PreRegister(engine);
|
||||
SQAIAirport.AddConstructor<void (ScriptAirport::*)(), 1>(engine, "x");
|
||||
|
||||
SQAIAirport.DefSQConst(engine, ScriptAirport::AT_SMALL, "AT_SMALL");
|
||||
SQAIAirport.DefSQConst(engine, ScriptAirport::AT_LARGE, "AT_LARGE");
|
||||
SQAIAirport.DefSQConst(engine, ScriptAirport::AT_METROPOLITAN, "AT_METROPOLITAN");
|
||||
SQAIAirport.DefSQConst(engine, ScriptAirport::AT_INTERNATIONAL, "AT_INTERNATIONAL");
|
||||
SQAIAirport.DefSQConst(engine, ScriptAirport::AT_COMMUTER, "AT_COMMUTER");
|
||||
SQAIAirport.DefSQConst(engine, ScriptAirport::AT_INTERCON, "AT_INTERCON");
|
||||
SQAIAirport.DefSQConst(engine, ScriptAirport::AT_HELIPORT, "AT_HELIPORT");
|
||||
SQAIAirport.DefSQConst(engine, ScriptAirport::AT_HELISTATION, "AT_HELISTATION");
|
||||
SQAIAirport.DefSQConst(engine, ScriptAirport::AT_HELIDEPOT, "AT_HELIDEPOT");
|
||||
SQAIAirport.DefSQConst(engine, ScriptAirport::AT_INVALID, "AT_INVALID");
|
||||
SQAIAirport.DefSQConst(engine, ScriptAirport::PT_HELICOPTER, "PT_HELICOPTER");
|
||||
SQAIAirport.DefSQConst(engine, ScriptAirport::PT_SMALL_PLANE, "PT_SMALL_PLANE");
|
||||
SQAIAirport.DefSQConst(engine, ScriptAirport::PT_BIG_PLANE, "PT_BIG_PLANE");
|
||||
SQAIAirport.DefSQConst(engine, ScriptAirport::PT_INVALID, "PT_INVALID");
|
||||
|
||||
SQAIAirport.DefSQStaticMethod(engine, &ScriptAirport::IsValidAirportType, "IsValidAirportType", 2, ".i");
|
||||
SQAIAirport.DefSQStaticMethod(engine, &ScriptAirport::IsAirportInformationAvailable, "IsAirportInformationAvailable", 2, ".i");
|
||||
SQAIAirport.DefSQStaticMethod(engine, &ScriptAirport::GetPrice, "GetPrice", 2, ".i");
|
||||
SQAIAirport.DefSQStaticMethod(engine, &ScriptAirport::IsHangarTile, "IsHangarTile", 2, ".i");
|
||||
SQAIAirport.DefSQStaticMethod(engine, &ScriptAirport::IsAirportTile, "IsAirportTile", 2, ".i");
|
||||
SQAIAirport.DefSQStaticMethod(engine, &ScriptAirport::GetAirportWidth, "GetAirportWidth", 2, ".i");
|
||||
SQAIAirport.DefSQStaticMethod(engine, &ScriptAirport::GetAirportHeight, "GetAirportHeight", 2, ".i");
|
||||
SQAIAirport.DefSQStaticMethod(engine, &ScriptAirport::GetAirportCoverageRadius, "GetAirportCoverageRadius", 2, ".i");
|
||||
SQAIAirport.DefSQStaticMethod(engine, &ScriptAirport::GetNumHangars, "GetNumHangars", 2, ".i");
|
||||
SQAIAirport.DefSQStaticMethod(engine, &ScriptAirport::GetHangarOfAirport, "GetHangarOfAirport", 2, ".i");
|
||||
SQAIAirport.DefSQStaticMethod(engine, &ScriptAirport::BuildAirport, "BuildAirport", 4, ".iii");
|
||||
SQAIAirport.DefSQStaticMethod(engine, &ScriptAirport::RemoveAirport, "RemoveAirport", 2, ".i");
|
||||
SQAIAirport.DefSQStaticMethod(engine, &ScriptAirport::GetAirportType, "GetAirportType", 2, ".i");
|
||||
SQAIAirport.DefSQStaticMethod(engine, &ScriptAirport::GetNoiseLevelIncrease, "GetNoiseLevelIncrease", 3, ".ii");
|
||||
SQAIAirport.DefSQStaticMethod(engine, &ScriptAirport::GetNearestTown, "GetNearestTown", 3, ".ii");
|
||||
SQAIAirport.DefSQStaticMethod(engine, &ScriptAirport::GetMaintenanceCostFactor, "GetMaintenanceCostFactor", 2, ".i");
|
||||
SQAIAirport.DefSQStaticMethod(engine, &ScriptAirport::GetMonthlyMaintenanceCost, "GetMonthlyMaintenanceCost", 2, ".i");
|
||||
|
||||
SQAIAirport.PostRegister(engine);
|
||||
}
|
@ -1,30 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_base.hpp"
|
||||
#include "../template/template_base.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptBase, ST_AI>() { return "AIBase"; }
|
||||
|
||||
void SQAIBase_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptBase, ST_AI> SQAIBase("AIBase");
|
||||
SQAIBase.PreRegister(engine);
|
||||
SQAIBase.AddConstructor<void (ScriptBase::*)(), 1>(engine, "x");
|
||||
|
||||
SQAIBase.DefSQStaticMethod(engine, &ScriptBase::Rand, "Rand", 1, ".");
|
||||
SQAIBase.DefSQStaticMethod(engine, &ScriptBase::RandItem, "RandItem", 2, ".i");
|
||||
SQAIBase.DefSQStaticMethod(engine, &ScriptBase::RandRange, "RandRange", 2, ".i");
|
||||
SQAIBase.DefSQStaticMethod(engine, &ScriptBase::RandRangeItem, "RandRangeItem", 3, ".ii");
|
||||
SQAIBase.DefSQStaticMethod(engine, &ScriptBase::Chance, "Chance", 3, ".ii");
|
||||
SQAIBase.DefSQStaticMethod(engine, &ScriptBase::ChanceItem, "ChanceItem", 4, ".iii");
|
||||
|
||||
SQAIBase.PostRegister(engine);
|
||||
}
|
@ -1,33 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_basestation.hpp"
|
||||
#include "../template/template_basestation.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptBaseStation, ST_AI>() { return "AIBaseStation"; }
|
||||
|
||||
void SQAIBaseStation_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptBaseStation, ST_AI> SQAIBaseStation("AIBaseStation");
|
||||
SQAIBaseStation.PreRegister(engine);
|
||||
SQAIBaseStation.AddConstructor<void (ScriptBaseStation::*)(), 1>(engine, "x");
|
||||
|
||||
SQAIBaseStation.DefSQConst(engine, ScriptBaseStation::STATION_NEW, "STATION_NEW");
|
||||
SQAIBaseStation.DefSQConst(engine, ScriptBaseStation::STATION_JOIN_ADJACENT, "STATION_JOIN_ADJACENT");
|
||||
SQAIBaseStation.DefSQConst(engine, ScriptBaseStation::STATION_INVALID, "STATION_INVALID");
|
||||
|
||||
SQAIBaseStation.DefSQStaticMethod(engine, &ScriptBaseStation::IsValidBaseStation, "IsValidBaseStation", 2, ".i");
|
||||
SQAIBaseStation.DefSQStaticMethod(engine, &ScriptBaseStation::GetName, "GetName", 2, ".i");
|
||||
SQAIBaseStation.DefSQStaticMethod(engine, &ScriptBaseStation::SetName, "SetName", 3, ".i.");
|
||||
SQAIBaseStation.DefSQStaticMethod(engine, &ScriptBaseStation::GetLocation, "GetLocation", 2, ".i");
|
||||
SQAIBaseStation.DefSQStaticMethod(engine, &ScriptBaseStation::GetConstructionDate, "GetConstructionDate", 2, ".i");
|
||||
|
||||
SQAIBaseStation.PostRegister(engine);
|
||||
}
|
@ -1,48 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_bridge.hpp"
|
||||
#include "../template/template_bridge.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptBridge, ST_AI>() { return "AIBridge"; }
|
||||
|
||||
void SQAIBridge_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptBridge, ST_AI> SQAIBridge("AIBridge");
|
||||
SQAIBridge.PreRegister(engine);
|
||||
SQAIBridge.AddConstructor<void (ScriptBridge::*)(), 1>(engine, "x");
|
||||
|
||||
SQAIBridge.DefSQConst(engine, ScriptBridge::ERR_BRIDGE_BASE, "ERR_BRIDGE_BASE");
|
||||
SQAIBridge.DefSQConst(engine, ScriptBridge::ERR_BRIDGE_TYPE_UNAVAILABLE, "ERR_BRIDGE_TYPE_UNAVAILABLE");
|
||||
SQAIBridge.DefSQConst(engine, ScriptBridge::ERR_BRIDGE_CANNOT_END_IN_WATER, "ERR_BRIDGE_CANNOT_END_IN_WATER");
|
||||
SQAIBridge.DefSQConst(engine, ScriptBridge::ERR_BRIDGE_HEADS_NOT_ON_SAME_HEIGHT, "ERR_BRIDGE_HEADS_NOT_ON_SAME_HEIGHT");
|
||||
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_BUILD_BRIDGE_HERE, ScriptBridge::ERR_BRIDGE_TYPE_UNAVAILABLE);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_ENDS_OF_BRIDGE_MUST_BOTH, ScriptBridge::ERR_BRIDGE_CANNOT_END_IN_WATER);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_BRIDGEHEADS_NOT_SAME_HEIGHT, ScriptBridge::ERR_BRIDGE_HEADS_NOT_ON_SAME_HEIGHT);
|
||||
|
||||
ScriptError::RegisterErrorMapString(ScriptBridge::ERR_BRIDGE_TYPE_UNAVAILABLE, "ERR_BRIDGE_TYPE_UNAVAILABLE");
|
||||
ScriptError::RegisterErrorMapString(ScriptBridge::ERR_BRIDGE_CANNOT_END_IN_WATER, "ERR_BRIDGE_CANNOT_END_IN_WATER");
|
||||
ScriptError::RegisterErrorMapString(ScriptBridge::ERR_BRIDGE_HEADS_NOT_ON_SAME_HEIGHT, "ERR_BRIDGE_HEADS_NOT_ON_SAME_HEIGHT");
|
||||
|
||||
SQAIBridge.DefSQStaticMethod(engine, &ScriptBridge::IsValidBridge, "IsValidBridge", 2, ".i");
|
||||
SQAIBridge.DefSQStaticMethod(engine, &ScriptBridge::IsBridgeTile, "IsBridgeTile", 2, ".i");
|
||||
SQAIBridge.DefSQStaticMethod(engine, &ScriptBridge::GetBridgeID, "GetBridgeID", 2, ".i");
|
||||
SQAIBridge.DefSQStaticMethod(engine, &ScriptBridge::GetName, "GetName", 3, ".ii");
|
||||
SQAIBridge.DefSQStaticMethod(engine, &ScriptBridge::GetMaxSpeed, "GetMaxSpeed", 2, ".i");
|
||||
SQAIBridge.DefSQStaticMethod(engine, &ScriptBridge::GetPrice, "GetPrice", 3, ".ii");
|
||||
SQAIBridge.DefSQStaticMethod(engine, &ScriptBridge::GetMaxLength, "GetMaxLength", 2, ".i");
|
||||
SQAIBridge.DefSQStaticMethod(engine, &ScriptBridge::GetMinLength, "GetMinLength", 2, ".i");
|
||||
SQAIBridge.DefSQStaticMethod(engine, &ScriptBridge::BuildBridge, "BuildBridge", 5, ".iiii");
|
||||
SQAIBridge.DefSQStaticMethod(engine, &ScriptBridge::RemoveBridge, "RemoveBridge", 2, ".i");
|
||||
SQAIBridge.DefSQStaticMethod(engine, &ScriptBridge::GetOtherBridgeEnd, "GetOtherBridgeEnd", 2, ".i");
|
||||
|
||||
SQAIBridge.PostRegister(engine);
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_bridgelist.hpp"
|
||||
#include "../template/template_bridgelist.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptBridgeList, ST_AI>() { return "AIBridgeList"; }
|
||||
|
||||
void SQAIBridgeList_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptBridgeList, ST_AI> SQAIBridgeList("AIBridgeList");
|
||||
SQAIBridgeList.PreRegister(engine, "AIList");
|
||||
SQAIBridgeList.AddConstructor<void (ScriptBridgeList::*)(), 1>(engine, "x");
|
||||
|
||||
SQAIBridgeList.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptBridgeList_Length, ST_AI>() { return "AIBridgeList_Length"; }
|
||||
|
||||
void SQAIBridgeList_Length_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptBridgeList_Length, ST_AI> SQAIBridgeList_Length("AIBridgeList_Length");
|
||||
SQAIBridgeList_Length.PreRegister(engine, "AIList");
|
||||
SQAIBridgeList_Length.AddConstructor<void (ScriptBridgeList_Length::*)(uint length), 2>(engine, "xi");
|
||||
|
||||
SQAIBridgeList_Length.PostRegister(engine);
|
||||
}
|
@ -1,55 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_cargo.hpp"
|
||||
#include "../template/template_cargo.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptCargo, ST_AI>() { return "AICargo"; }
|
||||
|
||||
void SQAICargo_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptCargo, ST_AI> SQAICargo("AICargo");
|
||||
SQAICargo.PreRegister(engine);
|
||||
SQAICargo.AddConstructor<void (ScriptCargo::*)(), 1>(engine, "x");
|
||||
|
||||
SQAICargo.DefSQConst(engine, ScriptCargo::CC_PASSENGERS, "CC_PASSENGERS");
|
||||
SQAICargo.DefSQConst(engine, ScriptCargo::CC_MAIL, "CC_MAIL");
|
||||
SQAICargo.DefSQConst(engine, ScriptCargo::CC_EXPRESS, "CC_EXPRESS");
|
||||
SQAICargo.DefSQConst(engine, ScriptCargo::CC_ARMOURED, "CC_ARMOURED");
|
||||
SQAICargo.DefSQConst(engine, ScriptCargo::CC_BULK, "CC_BULK");
|
||||
SQAICargo.DefSQConst(engine, ScriptCargo::CC_PIECE_GOODS, "CC_PIECE_GOODS");
|
||||
SQAICargo.DefSQConst(engine, ScriptCargo::CC_LIQUID, "CC_LIQUID");
|
||||
SQAICargo.DefSQConst(engine, ScriptCargo::CC_REFRIGERATED, "CC_REFRIGERATED");
|
||||
SQAICargo.DefSQConst(engine, ScriptCargo::CC_HAZARDOUS, "CC_HAZARDOUS");
|
||||
SQAICargo.DefSQConst(engine, ScriptCargo::CC_COVERED, "CC_COVERED");
|
||||
SQAICargo.DefSQConst(engine, ScriptCargo::TE_NONE, "TE_NONE");
|
||||
SQAICargo.DefSQConst(engine, ScriptCargo::TE_PASSENGERS, "TE_PASSENGERS");
|
||||
SQAICargo.DefSQConst(engine, ScriptCargo::TE_MAIL, "TE_MAIL");
|
||||
SQAICargo.DefSQConst(engine, ScriptCargo::TE_GOODS, "TE_GOODS");
|
||||
SQAICargo.DefSQConst(engine, ScriptCargo::TE_WATER, "TE_WATER");
|
||||
SQAICargo.DefSQConst(engine, ScriptCargo::TE_FOOD, "TE_FOOD");
|
||||
SQAICargo.DefSQConst(engine, ScriptCargo::CT_AUTO_REFIT, "CT_AUTO_REFIT");
|
||||
SQAICargo.DefSQConst(engine, ScriptCargo::CT_NO_REFIT, "CT_NO_REFIT");
|
||||
SQAICargo.DefSQConst(engine, ScriptCargo::DT_MANUAL, "DT_MANUAL");
|
||||
SQAICargo.DefSQConst(engine, ScriptCargo::DT_ASYMMETRIC, "DT_ASYMMETRIC");
|
||||
SQAICargo.DefSQConst(engine, ScriptCargo::DT_SYMMETRIC, "DT_SYMMETRIC");
|
||||
SQAICargo.DefSQConst(engine, ScriptCargo::INVALID_DISTRIBUTION_TYPE, "INVALID_DISTRIBUTION_TYPE");
|
||||
|
||||
SQAICargo.DefSQStaticMethod(engine, &ScriptCargo::IsValidCargo, "IsValidCargo", 2, ".i");
|
||||
SQAICargo.DefSQStaticMethod(engine, &ScriptCargo::IsValidTownEffect, "IsValidTownEffect", 2, ".i");
|
||||
SQAICargo.DefSQStaticMethod(engine, &ScriptCargo::GetCargoLabel, "GetCargoLabel", 2, ".i");
|
||||
SQAICargo.DefSQStaticMethod(engine, &ScriptCargo::IsFreight, "IsFreight", 2, ".i");
|
||||
SQAICargo.DefSQStaticMethod(engine, &ScriptCargo::HasCargoClass, "HasCargoClass", 3, ".ii");
|
||||
SQAICargo.DefSQStaticMethod(engine, &ScriptCargo::GetTownEffect, "GetTownEffect", 2, ".i");
|
||||
SQAICargo.DefSQStaticMethod(engine, &ScriptCargo::GetCargoIncome, "GetCargoIncome", 4, ".iii");
|
||||
SQAICargo.DefSQStaticMethod(engine, &ScriptCargo::GetDistributionType, "GetDistributionType", 2, ".i");
|
||||
|
||||
SQAICargo.PostRegister(engine);
|
||||
}
|
@ -1,59 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_cargolist.hpp"
|
||||
#include "../template/template_cargolist.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptCargoList, ST_AI>() { return "AICargoList"; }
|
||||
|
||||
void SQAICargoList_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptCargoList, ST_AI> SQAICargoList("AICargoList");
|
||||
SQAICargoList.PreRegister(engine, "AIList");
|
||||
SQAICargoList.AddConstructor<void (ScriptCargoList::*)(), 1>(engine, "x");
|
||||
|
||||
SQAICargoList.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptCargoList_IndustryAccepting, ST_AI>() { return "AICargoList_IndustryAccepting"; }
|
||||
|
||||
void SQAICargoList_IndustryAccepting_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptCargoList_IndustryAccepting, ST_AI> SQAICargoList_IndustryAccepting("AICargoList_IndustryAccepting");
|
||||
SQAICargoList_IndustryAccepting.PreRegister(engine, "AIList");
|
||||
SQAICargoList_IndustryAccepting.AddConstructor<void (ScriptCargoList_IndustryAccepting::*)(IndustryID industry_id), 2>(engine, "xi");
|
||||
|
||||
SQAICargoList_IndustryAccepting.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptCargoList_IndustryProducing, ST_AI>() { return "AICargoList_IndustryProducing"; }
|
||||
|
||||
void SQAICargoList_IndustryProducing_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptCargoList_IndustryProducing, ST_AI> SQAICargoList_IndustryProducing("AICargoList_IndustryProducing");
|
||||
SQAICargoList_IndustryProducing.PreRegister(engine, "AIList");
|
||||
SQAICargoList_IndustryProducing.AddConstructor<void (ScriptCargoList_IndustryProducing::*)(IndustryID industry_id), 2>(engine, "xi");
|
||||
|
||||
SQAICargoList_IndustryProducing.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptCargoList_StationAccepting, ST_AI>() { return "AICargoList_StationAccepting"; }
|
||||
|
||||
void SQAICargoList_StationAccepting_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptCargoList_StationAccepting, ST_AI> SQAICargoList_StationAccepting("AICargoList_StationAccepting");
|
||||
SQAICargoList_StationAccepting.PreRegister(engine, "AIList");
|
||||
SQAICargoList_StationAccepting.AddConstructor<void (ScriptCargoList_StationAccepting::*)(StationID station_id), 2>(engine, "xi");
|
||||
|
||||
SQAICargoList_StationAccepting.PostRegister(engine);
|
||||
}
|
@ -1,107 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_company.hpp"
|
||||
#include "../template/template_company.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptCompany, ST_AI>() { return "AICompany"; }
|
||||
|
||||
void SQAICompany_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptCompany, ST_AI> SQAICompany("AICompany");
|
||||
SQAICompany.PreRegister(engine);
|
||||
SQAICompany.AddConstructor<void (ScriptCompany::*)(), 1>(engine, "x");
|
||||
|
||||
SQAICompany.DefSQConst(engine, ScriptCompany::CURRENT_QUARTER, "CURRENT_QUARTER");
|
||||
SQAICompany.DefSQConst(engine, ScriptCompany::EARLIEST_QUARTER, "EARLIEST_QUARTER");
|
||||
SQAICompany.DefSQConst(engine, ScriptCompany::COMPANY_FIRST, "COMPANY_FIRST");
|
||||
SQAICompany.DefSQConst(engine, ScriptCompany::COMPANY_LAST, "COMPANY_LAST");
|
||||
SQAICompany.DefSQConst(engine, ScriptCompany::COMPANY_INVALID, "COMPANY_INVALID");
|
||||
SQAICompany.DefSQConst(engine, ScriptCompany::COMPANY_SELF, "COMPANY_SELF");
|
||||
SQAICompany.DefSQConst(engine, ScriptCompany::COMPANY_SPECTATOR, "COMPANY_SPECTATOR");
|
||||
SQAICompany.DefSQConst(engine, ScriptCompany::GENDER_MALE, "GENDER_MALE");
|
||||
SQAICompany.DefSQConst(engine, ScriptCompany::GENDER_FEMALE, "GENDER_FEMALE");
|
||||
SQAICompany.DefSQConst(engine, ScriptCompany::GENDER_INVALID, "GENDER_INVALID");
|
||||
SQAICompany.DefSQConst(engine, ScriptCompany::LS_DEFAULT, "LS_DEFAULT");
|
||||
SQAICompany.DefSQConst(engine, ScriptCompany::LS_STEAM, "LS_STEAM");
|
||||
SQAICompany.DefSQConst(engine, ScriptCompany::LS_DIESEL, "LS_DIESEL");
|
||||
SQAICompany.DefSQConst(engine, ScriptCompany::LS_ELECTRIC, "LS_ELECTRIC");
|
||||
SQAICompany.DefSQConst(engine, ScriptCompany::LS_MONORAIL, "LS_MONORAIL");
|
||||
SQAICompany.DefSQConst(engine, ScriptCompany::LS_MAGLEV, "LS_MAGLEV");
|
||||
SQAICompany.DefSQConst(engine, ScriptCompany::LS_DMU, "LS_DMU");
|
||||
SQAICompany.DefSQConst(engine, ScriptCompany::LS_EMU, "LS_EMU");
|
||||
SQAICompany.DefSQConst(engine, ScriptCompany::LS_PASSENGER_WAGON_STEAM, "LS_PASSENGER_WAGON_STEAM");
|
||||
SQAICompany.DefSQConst(engine, ScriptCompany::LS_PASSENGER_WAGON_DIESEL, "LS_PASSENGER_WAGON_DIESEL");
|
||||
SQAICompany.DefSQConst(engine, ScriptCompany::LS_PASSENGER_WAGON_ELECTRIC, "LS_PASSENGER_WAGON_ELECTRIC");
|
||||
SQAICompany.DefSQConst(engine, ScriptCompany::LS_PASSENGER_WAGON_MONORAIL, "LS_PASSENGER_WAGON_MONORAIL");
|
||||
SQAICompany.DefSQConst(engine, ScriptCompany::LS_PASSENGER_WAGON_MAGLEV, "LS_PASSENGER_WAGON_MAGLEV");
|
||||
SQAICompany.DefSQConst(engine, ScriptCompany::LS_FREIGHT_WAGON, "LS_FREIGHT_WAGON");
|
||||
SQAICompany.DefSQConst(engine, ScriptCompany::LS_BUS, "LS_BUS");
|
||||
SQAICompany.DefSQConst(engine, ScriptCompany::LS_TRUCK, "LS_TRUCK");
|
||||
SQAICompany.DefSQConst(engine, ScriptCompany::LS_PASSENGER_SHIP, "LS_PASSENGER_SHIP");
|
||||
SQAICompany.DefSQConst(engine, ScriptCompany::LS_FREIGHT_SHIP, "LS_FREIGHT_SHIP");
|
||||
SQAICompany.DefSQConst(engine, ScriptCompany::LS_HELICOPTER, "LS_HELICOPTER");
|
||||
SQAICompany.DefSQConst(engine, ScriptCompany::LS_SMALL_PLANE, "LS_SMALL_PLANE");
|
||||
SQAICompany.DefSQConst(engine, ScriptCompany::LS_LARGE_PLANE, "LS_LARGE_PLANE");
|
||||
SQAICompany.DefSQConst(engine, ScriptCompany::LS_PASSENGER_TRAM, "LS_PASSENGER_TRAM");
|
||||
SQAICompany.DefSQConst(engine, ScriptCompany::LS_FREIGHT_TRAM, "LS_FREIGHT_TRAM");
|
||||
SQAICompany.DefSQConst(engine, ScriptCompany::LS_INVALID, "LS_INVALID");
|
||||
SQAICompany.DefSQConst(engine, ScriptCompany::COLOUR_DARK_BLUE, "COLOUR_DARK_BLUE");
|
||||
SQAICompany.DefSQConst(engine, ScriptCompany::COLOUR_PALE_GREEN, "COLOUR_PALE_GREEN");
|
||||
SQAICompany.DefSQConst(engine, ScriptCompany::COLOUR_PINK, "COLOUR_PINK");
|
||||
SQAICompany.DefSQConst(engine, ScriptCompany::COLOUR_YELLOW, "COLOUR_YELLOW");
|
||||
SQAICompany.DefSQConst(engine, ScriptCompany::COLOUR_RED, "COLOUR_RED");
|
||||
SQAICompany.DefSQConst(engine, ScriptCompany::COLOUR_LIGHT_BLUE, "COLOUR_LIGHT_BLUE");
|
||||
SQAICompany.DefSQConst(engine, ScriptCompany::COLOUR_GREEN, "COLOUR_GREEN");
|
||||
SQAICompany.DefSQConst(engine, ScriptCompany::COLOUR_DARK_GREEN, "COLOUR_DARK_GREEN");
|
||||
SQAICompany.DefSQConst(engine, ScriptCompany::COLOUR_BLUE, "COLOUR_BLUE");
|
||||
SQAICompany.DefSQConst(engine, ScriptCompany::COLOUR_CREAM, "COLOUR_CREAM");
|
||||
SQAICompany.DefSQConst(engine, ScriptCompany::COLOUR_MAUVE, "COLOUR_MAUVE");
|
||||
SQAICompany.DefSQConst(engine, ScriptCompany::COLOUR_PURPLE, "COLOUR_PURPLE");
|
||||
SQAICompany.DefSQConst(engine, ScriptCompany::COLOUR_ORANGE, "COLOUR_ORANGE");
|
||||
SQAICompany.DefSQConst(engine, ScriptCompany::COLOUR_BROWN, "COLOUR_BROWN");
|
||||
SQAICompany.DefSQConst(engine, ScriptCompany::COLOUR_GREY, "COLOUR_GREY");
|
||||
SQAICompany.DefSQConst(engine, ScriptCompany::COLOUR_WHITE, "COLOUR_WHITE");
|
||||
SQAICompany.DefSQConst(engine, ScriptCompany::COLOUR_INVALID, "COLOUR_INVALID");
|
||||
|
||||
SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::ResolveCompanyID, "ResolveCompanyID", 2, ".i");
|
||||
SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::IsMine, "IsMine", 2, ".i");
|
||||
SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::SetName, "SetName", 2, "..");
|
||||
SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::GetName, "GetName", 2, ".i");
|
||||
SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::SetPresidentName, "SetPresidentName", 2, "..");
|
||||
SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::GetPresidentName, "GetPresidentName", 2, ".i");
|
||||
SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::SetPresidentGender, "SetPresidentGender", 2, ".i");
|
||||
SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::GetPresidentGender, "GetPresidentGender", 2, ".i");
|
||||
SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::SetLoanAmount, "SetLoanAmount", 2, ".i");
|
||||
SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::SetMinimumLoanAmount, "SetMinimumLoanAmount", 2, ".i");
|
||||
SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::GetLoanAmount, "GetLoanAmount", 1, ".");
|
||||
SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::GetMaxLoanAmount, "GetMaxLoanAmount", 1, ".");
|
||||
SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::GetLoanInterval, "GetLoanInterval", 1, ".");
|
||||
SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::GetBankBalance, "GetBankBalance", 2, ".i");
|
||||
SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::GetQuarterlyIncome, "GetQuarterlyIncome", 3, ".ii");
|
||||
SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::GetQuarterlyExpenses, "GetQuarterlyExpenses", 3, ".ii");
|
||||
SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::GetQuarterlyCargoDelivered, "GetQuarterlyCargoDelivered", 3, ".ii");
|
||||
SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::GetQuarterlyPerformanceRating, "GetQuarterlyPerformanceRating", 3, ".ii");
|
||||
SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::GetQuarterlyCompanyValue, "GetQuarterlyCompanyValue", 3, ".ii");
|
||||
SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::BuildCompanyHQ, "BuildCompanyHQ", 2, ".i");
|
||||
SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::GetCompanyHQ, "GetCompanyHQ", 2, ".i");
|
||||
SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::SetAutoRenewStatus, "SetAutoRenewStatus", 2, ".b");
|
||||
SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::GetAutoRenewStatus, "GetAutoRenewStatus", 2, ".i");
|
||||
SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::SetAutoRenewMonths, "SetAutoRenewMonths", 2, ".i");
|
||||
SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::GetAutoRenewMonths, "GetAutoRenewMonths", 2, ".i");
|
||||
SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::SetAutoRenewMoney, "SetAutoRenewMoney", 2, ".i");
|
||||
SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::GetAutoRenewMoney, "GetAutoRenewMoney", 2, ".i");
|
||||
SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::SetPrimaryLiveryColour, "SetPrimaryLiveryColour", 3, ".ii");
|
||||
SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::SetSecondaryLiveryColour, "SetSecondaryLiveryColour", 3, ".ii");
|
||||
SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::GetPrimaryLiveryColour, "GetPrimaryLiveryColour", 2, ".i");
|
||||
SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::GetSecondaryLiveryColour, "GetSecondaryLiveryColour", 2, ".i");
|
||||
|
||||
SQAICompany.PostRegister(engine);
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_date.hpp"
|
||||
#include "../template/template_date.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptDate, ST_AI>() { return "AIDate"; }
|
||||
|
||||
void SQAIDate_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptDate, ST_AI> SQAIDate("AIDate");
|
||||
SQAIDate.PreRegister(engine);
|
||||
SQAIDate.AddConstructor<void (ScriptDate::*)(), 1>(engine, "x");
|
||||
|
||||
SQAIDate.DefSQConst(engine, ScriptDate::DATE_INVALID, "DATE_INVALID");
|
||||
|
||||
SQAIDate.DefSQStaticMethod(engine, &ScriptDate::IsValidDate, "IsValidDate", 2, ".i");
|
||||
SQAIDate.DefSQStaticMethod(engine, &ScriptDate::GetCurrentDate, "GetCurrentDate", 1, ".");
|
||||
SQAIDate.DefSQStaticMethod(engine, &ScriptDate::GetYear, "GetYear", 2, ".i");
|
||||
SQAIDate.DefSQStaticMethod(engine, &ScriptDate::GetMonth, "GetMonth", 2, ".i");
|
||||
SQAIDate.DefSQStaticMethod(engine, &ScriptDate::GetDayOfMonth, "GetDayOfMonth", 2, ".i");
|
||||
SQAIDate.DefSQStaticMethod(engine, &ScriptDate::GetDate, "GetDate", 4, ".iii");
|
||||
|
||||
SQAIDate.PostRegister(engine);
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_depotlist.hpp"
|
||||
#include "../template/template_depotlist.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptDepotList, ST_AI>() { return "AIDepotList"; }
|
||||
|
||||
void SQAIDepotList_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptDepotList, ST_AI> SQAIDepotList("AIDepotList");
|
||||
SQAIDepotList.PreRegister(engine, "AIList");
|
||||
SQAIDepotList.AddConstructor<void (ScriptDepotList::*)(ScriptTile::TransportType transport_type), 2>(engine, "xi");
|
||||
|
||||
SQAIDepotList.PostRegister(engine);
|
||||
}
|
@ -1,51 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_engine.hpp"
|
||||
#include "../template/template_engine.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptEngine, ST_AI>() { return "AIEngine"; }
|
||||
|
||||
void SQAIEngine_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptEngine, ST_AI> SQAIEngine("AIEngine");
|
||||
SQAIEngine.PreRegister(engine);
|
||||
SQAIEngine.AddConstructor<void (ScriptEngine::*)(), 1>(engine, "x");
|
||||
|
||||
SQAIEngine.DefSQStaticMethod(engine, &ScriptEngine::IsValidEngine, "IsValidEngine", 2, ".i");
|
||||
SQAIEngine.DefSQStaticMethod(engine, &ScriptEngine::IsBuildable, "IsBuildable", 2, ".i");
|
||||
SQAIEngine.DefSQStaticMethod(engine, &ScriptEngine::GetName, "GetName", 2, ".i");
|
||||
SQAIEngine.DefSQStaticMethod(engine, &ScriptEngine::GetCargoType, "GetCargoType", 2, ".i");
|
||||
SQAIEngine.DefSQStaticMethod(engine, &ScriptEngine::CanRefitCargo, "CanRefitCargo", 3, ".ii");
|
||||
SQAIEngine.DefSQStaticMethod(engine, &ScriptEngine::CanPullCargo, "CanPullCargo", 3, ".ii");
|
||||
SQAIEngine.DefSQStaticMethod(engine, &ScriptEngine::GetCapacity, "GetCapacity", 2, ".i");
|
||||
SQAIEngine.DefSQStaticMethod(engine, &ScriptEngine::GetReliability, "GetReliability", 2, ".i");
|
||||
SQAIEngine.DefSQStaticMethod(engine, &ScriptEngine::GetMaxSpeed, "GetMaxSpeed", 2, ".i");
|
||||
SQAIEngine.DefSQStaticMethod(engine, &ScriptEngine::GetPrice, "GetPrice", 2, ".i");
|
||||
SQAIEngine.DefSQStaticMethod(engine, &ScriptEngine::GetMaxAge, "GetMaxAge", 2, ".i");
|
||||
SQAIEngine.DefSQStaticMethod(engine, &ScriptEngine::GetRunningCost, "GetRunningCost", 2, ".i");
|
||||
SQAIEngine.DefSQStaticMethod(engine, &ScriptEngine::GetPower, "GetPower", 2, ".i");
|
||||
SQAIEngine.DefSQStaticMethod(engine, &ScriptEngine::GetWeight, "GetWeight", 2, ".i");
|
||||
SQAIEngine.DefSQStaticMethod(engine, &ScriptEngine::GetMaxTractiveEffort, "GetMaxTractiveEffort", 2, ".i");
|
||||
SQAIEngine.DefSQStaticMethod(engine, &ScriptEngine::GetDesignDate, "GetDesignDate", 2, ".i");
|
||||
SQAIEngine.DefSQStaticMethod(engine, &ScriptEngine::GetVehicleType, "GetVehicleType", 2, ".i");
|
||||
SQAIEngine.DefSQStaticMethod(engine, &ScriptEngine::IsWagon, "IsWagon", 2, ".i");
|
||||
SQAIEngine.DefSQStaticMethod(engine, &ScriptEngine::CanRunOnRail, "CanRunOnRail", 3, ".ii");
|
||||
SQAIEngine.DefSQStaticMethod(engine, &ScriptEngine::HasPowerOnRail, "HasPowerOnRail", 3, ".ii");
|
||||
SQAIEngine.DefSQStaticMethod(engine, &ScriptEngine::CanRunOnRoad, "CanRunOnRoad", 3, ".ii");
|
||||
SQAIEngine.DefSQStaticMethod(engine, &ScriptEngine::HasPowerOnRoad, "HasPowerOnRoad", 3, ".ii");
|
||||
SQAIEngine.DefSQStaticMethod(engine, &ScriptEngine::GetRoadType, "GetRoadType", 2, ".i");
|
||||
SQAIEngine.DefSQStaticMethod(engine, &ScriptEngine::GetRailType, "GetRailType", 2, ".i");
|
||||
SQAIEngine.DefSQStaticMethod(engine, &ScriptEngine::IsArticulated, "IsArticulated", 2, ".i");
|
||||
SQAIEngine.DefSQStaticMethod(engine, &ScriptEngine::GetPlaneType, "GetPlaneType", 2, ".i");
|
||||
SQAIEngine.DefSQStaticMethod(engine, &ScriptEngine::GetMaximumOrderDistance, "GetMaximumOrderDistance", 2, ".i");
|
||||
|
||||
SQAIEngine.PostRegister(engine);
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_enginelist.hpp"
|
||||
#include "../template/template_enginelist.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptEngineList, ST_AI>() { return "AIEngineList"; }
|
||||
|
||||
void SQAIEngineList_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptEngineList, ST_AI> SQAIEngineList("AIEngineList");
|
||||
SQAIEngineList.PreRegister(engine, "AIList");
|
||||
SQAIEngineList.AddConstructor<void (ScriptEngineList::*)(ScriptVehicle::VehicleType vehicle_type), 2>(engine, "xi");
|
||||
|
||||
SQAIEngineList.PostRegister(engine);
|
||||
}
|
@ -1,120 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_error.hpp"
|
||||
#include "../template/template_error.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptError, ST_AI>() { return "AIError"; }
|
||||
|
||||
void SQAIError_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptError, ST_AI> SQAIError("AIError");
|
||||
SQAIError.PreRegister(engine);
|
||||
SQAIError.AddConstructor<void (ScriptError::*)(), 1>(engine, "x");
|
||||
|
||||
SQAIError.DefSQConst(engine, ScriptError::ERR_CAT_NONE, "ERR_CAT_NONE");
|
||||
SQAIError.DefSQConst(engine, ScriptError::ERR_CAT_GENERAL, "ERR_CAT_GENERAL");
|
||||
SQAIError.DefSQConst(engine, ScriptError::ERR_CAT_VEHICLE, "ERR_CAT_VEHICLE");
|
||||
SQAIError.DefSQConst(engine, ScriptError::ERR_CAT_STATION, "ERR_CAT_STATION");
|
||||
SQAIError.DefSQConst(engine, ScriptError::ERR_CAT_BRIDGE, "ERR_CAT_BRIDGE");
|
||||
SQAIError.DefSQConst(engine, ScriptError::ERR_CAT_TUNNEL, "ERR_CAT_TUNNEL");
|
||||
SQAIError.DefSQConst(engine, ScriptError::ERR_CAT_TILE, "ERR_CAT_TILE");
|
||||
SQAIError.DefSQConst(engine, ScriptError::ERR_CAT_SIGN, "ERR_CAT_SIGN");
|
||||
SQAIError.DefSQConst(engine, ScriptError::ERR_CAT_RAIL, "ERR_CAT_RAIL");
|
||||
SQAIError.DefSQConst(engine, ScriptError::ERR_CAT_ROAD, "ERR_CAT_ROAD");
|
||||
SQAIError.DefSQConst(engine, ScriptError::ERR_CAT_ORDER, "ERR_CAT_ORDER");
|
||||
SQAIError.DefSQConst(engine, ScriptError::ERR_CAT_MARINE, "ERR_CAT_MARINE");
|
||||
SQAIError.DefSQConst(engine, ScriptError::ERR_CAT_WAYPOINT, "ERR_CAT_WAYPOINT");
|
||||
SQAIError.DefSQConst(engine, ScriptError::ERR_CAT_BIT_SIZE, "ERR_CAT_BIT_SIZE");
|
||||
SQAIError.DefSQConst(engine, ScriptError::ERR_NONE, "ERR_NONE");
|
||||
SQAIError.DefSQConst(engine, ScriptError::ERR_UNKNOWN, "ERR_UNKNOWN");
|
||||
SQAIError.DefSQConst(engine, ScriptError::ERR_PRECONDITION_FAILED, "ERR_PRECONDITION_FAILED");
|
||||
SQAIError.DefSQConst(engine, ScriptError::ERR_PRECONDITION_STRING_TOO_LONG, "ERR_PRECONDITION_STRING_TOO_LONG");
|
||||
SQAIError.DefSQConst(engine, ScriptError::ERR_PRECONDITION_TOO_MANY_PARAMETERS, "ERR_PRECONDITION_TOO_MANY_PARAMETERS");
|
||||
SQAIError.DefSQConst(engine, ScriptError::ERR_PRECONDITION_INVALID_COMPANY, "ERR_PRECONDITION_INVALID_COMPANY");
|
||||
SQAIError.DefSQConst(engine, ScriptError::ERR_NEWGRF_SUPPLIED_ERROR, "ERR_NEWGRF_SUPPLIED_ERROR");
|
||||
SQAIError.DefSQConst(engine, ScriptError::ERR_GENERAL_BASE, "ERR_GENERAL_BASE");
|
||||
SQAIError.DefSQConst(engine, ScriptError::ERR_NOT_ENOUGH_CASH, "ERR_NOT_ENOUGH_CASH");
|
||||
SQAIError.DefSQConst(engine, ScriptError::ERR_LOCAL_AUTHORITY_REFUSES, "ERR_LOCAL_AUTHORITY_REFUSES");
|
||||
SQAIError.DefSQConst(engine, ScriptError::ERR_ALREADY_BUILT, "ERR_ALREADY_BUILT");
|
||||
SQAIError.DefSQConst(engine, ScriptError::ERR_AREA_NOT_CLEAR, "ERR_AREA_NOT_CLEAR");
|
||||
SQAIError.DefSQConst(engine, ScriptError::ERR_OWNED_BY_ANOTHER_COMPANY, "ERR_OWNED_BY_ANOTHER_COMPANY");
|
||||
SQAIError.DefSQConst(engine, ScriptError::ERR_NAME_IS_NOT_UNIQUE, "ERR_NAME_IS_NOT_UNIQUE");
|
||||
SQAIError.DefSQConst(engine, ScriptError::ERR_FLAT_LAND_REQUIRED, "ERR_FLAT_LAND_REQUIRED");
|
||||
SQAIError.DefSQConst(engine, ScriptError::ERR_LAND_SLOPED_WRONG, "ERR_LAND_SLOPED_WRONG");
|
||||
SQAIError.DefSQConst(engine, ScriptError::ERR_VEHICLE_IN_THE_WAY, "ERR_VEHICLE_IN_THE_WAY");
|
||||
SQAIError.DefSQConst(engine, ScriptError::ERR_SITE_UNSUITABLE, "ERR_SITE_UNSUITABLE");
|
||||
SQAIError.DefSQConst(engine, ScriptError::ERR_TOO_CLOSE_TO_EDGE, "ERR_TOO_CLOSE_TO_EDGE");
|
||||
SQAIError.DefSQConst(engine, ScriptError::ERR_STATION_TOO_SPREAD_OUT, "ERR_STATION_TOO_SPREAD_OUT");
|
||||
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_NOT_ENOUGH_CASH_REQUIRES_CURRENCY, ScriptError::ERR_NOT_ENOUGH_CASH);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_LOCAL_AUTHORITY_REFUSES_TO_ALLOW_THIS, ScriptError::ERR_LOCAL_AUTHORITY_REFUSES);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_LOCAL_AUTHORITY_REFUSES_NOISE, ScriptError::ERR_LOCAL_AUTHORITY_REFUSES);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_ALREADY_BUILT, ScriptError::ERR_ALREADY_BUILT);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST, ScriptError::ERR_ALREADY_BUILT);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_TREE_ALREADY_HERE, ScriptError::ERR_ALREADY_BUILT);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_BUILDING_MUST_BE_DEMOLISHED, ScriptError::ERR_AREA_NOT_CLEAR);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST, ScriptError::ERR_AREA_NOT_CLEAR);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_MUST_DEMOLISH_RAILROAD, ScriptError::ERR_AREA_NOT_CLEAR);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_MUST_DEMOLISH_AIRPORT_FIRST, ScriptError::ERR_AREA_NOT_CLEAR);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_MUST_DEMOLISH_CARGO_TRAM_STATION_FIRST, ScriptError::ERR_AREA_NOT_CLEAR);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_MUST_DEMOLISH_TRUCK_STATION_FIRST, ScriptError::ERR_AREA_NOT_CLEAR);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_MUST_DEMOLISH_PASSENGER_TRAM_STATION_FIRST, ScriptError::ERR_AREA_NOT_CLEAR);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_MUST_DEMOLISH_BUS_STATION_FIRST, ScriptError::ERR_AREA_NOT_CLEAR);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_BUOY_IN_THE_WAY, ScriptError::ERR_AREA_NOT_CLEAR);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_MUST_DEMOLISH_DOCK_FIRST, ScriptError::ERR_AREA_NOT_CLEAR);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_GENERIC_OBJECT_IN_THE_WAY, ScriptError::ERR_AREA_NOT_CLEAR);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_COMPANY_HEADQUARTERS_IN, ScriptError::ERR_AREA_NOT_CLEAR);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_OBJECT_IN_THE_WAY, ScriptError::ERR_AREA_NOT_CLEAR);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_MUST_REMOVE_ROAD_FIRST, ScriptError::ERR_AREA_NOT_CLEAR);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_MUST_REMOVE_RAILROAD_TRACK, ScriptError::ERR_AREA_NOT_CLEAR);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST, ScriptError::ERR_AREA_NOT_CLEAR);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_MUST_DEMOLISH_TUNNEL_FIRST, ScriptError::ERR_AREA_NOT_CLEAR);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_EXCAVATION_WOULD_DAMAGE, ScriptError::ERR_AREA_NOT_CLEAR);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_AREA_IS_OWNED_BY_ANOTHER, ScriptError::ERR_OWNED_BY_ANOTHER_COMPANY);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_OWNED_BY, ScriptError::ERR_OWNED_BY_ANOTHER_COMPANY);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_NAME_MUST_BE_UNIQUE, ScriptError::ERR_NAME_IS_NOT_UNIQUE);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_FLAT_LAND_REQUIRED, ScriptError::ERR_FLAT_LAND_REQUIRED);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_LAND_SLOPED_IN_WRONG_DIRECTION, ScriptError::ERR_LAND_SLOPED_WRONG);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_TRAIN_IN_THE_WAY, ScriptError::ERR_VEHICLE_IN_THE_WAY);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_ROAD_VEHICLE_IN_THE_WAY, ScriptError::ERR_VEHICLE_IN_THE_WAY);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_SHIP_IN_THE_WAY, ScriptError::ERR_VEHICLE_IN_THE_WAY);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_AIRCRAFT_IN_THE_WAY, ScriptError::ERR_VEHICLE_IN_THE_WAY);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_SITE_UNSUITABLE, ScriptError::ERR_SITE_UNSUITABLE);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_TREE_WRONG_TERRAIN_FOR_TREE_TYPE, ScriptError::ERR_SITE_UNSUITABLE);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_TOO_CLOSE_TO_EDGE_OF_MAP, ScriptError::ERR_TOO_CLOSE_TO_EDGE);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_STATION_TOO_SPREAD_OUT, ScriptError::ERR_STATION_TOO_SPREAD_OUT);
|
||||
|
||||
ScriptError::RegisterErrorMapString(ScriptError::ERR_NONE, "ERR_NONE");
|
||||
ScriptError::RegisterErrorMapString(ScriptError::ERR_UNKNOWN, "ERR_UNKNOWN");
|
||||
ScriptError::RegisterErrorMapString(ScriptError::ERR_PRECONDITION_FAILED, "ERR_PRECONDITION_FAILED");
|
||||
ScriptError::RegisterErrorMapString(ScriptError::ERR_PRECONDITION_STRING_TOO_LONG, "ERR_PRECONDITION_STRING_TOO_LONG");
|
||||
ScriptError::RegisterErrorMapString(ScriptError::ERR_PRECONDITION_TOO_MANY_PARAMETERS, "ERR_PRECONDITION_TOO_MANY_PARAMETERS");
|
||||
ScriptError::RegisterErrorMapString(ScriptError::ERR_PRECONDITION_INVALID_COMPANY, "ERR_PRECONDITION_INVALID_COMPANY");
|
||||
ScriptError::RegisterErrorMapString(ScriptError::ERR_NEWGRF_SUPPLIED_ERROR, "ERR_NEWGRF_SUPPLIED_ERROR");
|
||||
ScriptError::RegisterErrorMapString(ScriptError::ERR_NOT_ENOUGH_CASH, "ERR_NOT_ENOUGH_CASH");
|
||||
ScriptError::RegisterErrorMapString(ScriptError::ERR_LOCAL_AUTHORITY_REFUSES, "ERR_LOCAL_AUTHORITY_REFUSES");
|
||||
ScriptError::RegisterErrorMapString(ScriptError::ERR_ALREADY_BUILT, "ERR_ALREADY_BUILT");
|
||||
ScriptError::RegisterErrorMapString(ScriptError::ERR_AREA_NOT_CLEAR, "ERR_AREA_NOT_CLEAR");
|
||||
ScriptError::RegisterErrorMapString(ScriptError::ERR_OWNED_BY_ANOTHER_COMPANY, "ERR_OWNED_BY_ANOTHER_COMPANY");
|
||||
ScriptError::RegisterErrorMapString(ScriptError::ERR_NAME_IS_NOT_UNIQUE, "ERR_NAME_IS_NOT_UNIQUE");
|
||||
ScriptError::RegisterErrorMapString(ScriptError::ERR_FLAT_LAND_REQUIRED, "ERR_FLAT_LAND_REQUIRED");
|
||||
ScriptError::RegisterErrorMapString(ScriptError::ERR_LAND_SLOPED_WRONG, "ERR_LAND_SLOPED_WRONG");
|
||||
ScriptError::RegisterErrorMapString(ScriptError::ERR_VEHICLE_IN_THE_WAY, "ERR_VEHICLE_IN_THE_WAY");
|
||||
ScriptError::RegisterErrorMapString(ScriptError::ERR_SITE_UNSUITABLE, "ERR_SITE_UNSUITABLE");
|
||||
ScriptError::RegisterErrorMapString(ScriptError::ERR_TOO_CLOSE_TO_EDGE, "ERR_TOO_CLOSE_TO_EDGE");
|
||||
ScriptError::RegisterErrorMapString(ScriptError::ERR_STATION_TOO_SPREAD_OUT, "ERR_STATION_TOO_SPREAD_OUT");
|
||||
|
||||
SQAIError.DefSQStaticMethod(engine, &ScriptError::GetErrorCategory, "GetErrorCategory", 1, ".");
|
||||
SQAIError.DefSQStaticMethod(engine, &ScriptError::GetLastError, "GetLastError", 1, ".");
|
||||
SQAIError.DefSQStaticMethod(engine, &ScriptError::GetLastErrorString, "GetLastErrorString", 1, ".");
|
||||
|
||||
SQAIError.PostRegister(engine);
|
||||
}
|
@ -1,74 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_event.hpp"
|
||||
#include "../template/template_event.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptEvent, ST_AI>() { return "AIEvent"; }
|
||||
|
||||
void SQAIEvent_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptEvent, ST_AI> SQAIEvent("AIEvent");
|
||||
SQAIEvent.PreRegister(engine);
|
||||
SQAIEvent.AddConstructor<void (ScriptEvent::*)(ScriptEvent::ScriptEventType type), 2>(engine, "xi");
|
||||
|
||||
SQAIEvent.DefSQConst(engine, ScriptEvent::ET_INVALID, "ET_INVALID");
|
||||
SQAIEvent.DefSQConst(engine, ScriptEvent::ET_TEST, "ET_TEST");
|
||||
SQAIEvent.DefSQConst(engine, ScriptEvent::ET_SUBSIDY_OFFER, "ET_SUBSIDY_OFFER");
|
||||
SQAIEvent.DefSQConst(engine, ScriptEvent::ET_SUBSIDY_OFFER_EXPIRED, "ET_SUBSIDY_OFFER_EXPIRED");
|
||||
SQAIEvent.DefSQConst(engine, ScriptEvent::ET_SUBSIDY_AWARDED, "ET_SUBSIDY_AWARDED");
|
||||
SQAIEvent.DefSQConst(engine, ScriptEvent::ET_SUBSIDY_EXPIRED, "ET_SUBSIDY_EXPIRED");
|
||||
SQAIEvent.DefSQConst(engine, ScriptEvent::ET_ENGINE_PREVIEW, "ET_ENGINE_PREVIEW");
|
||||
SQAIEvent.DefSQConst(engine, ScriptEvent::ET_COMPANY_NEW, "ET_COMPANY_NEW");
|
||||
SQAIEvent.DefSQConst(engine, ScriptEvent::ET_COMPANY_IN_TROUBLE, "ET_COMPANY_IN_TROUBLE");
|
||||
SQAIEvent.DefSQConst(engine, ScriptEvent::ET_COMPANY_ASK_MERGER, "ET_COMPANY_ASK_MERGER");
|
||||
SQAIEvent.DefSQConst(engine, ScriptEvent::ET_COMPANY_MERGER, "ET_COMPANY_MERGER");
|
||||
SQAIEvent.DefSQConst(engine, ScriptEvent::ET_COMPANY_BANKRUPT, "ET_COMPANY_BANKRUPT");
|
||||
SQAIEvent.DefSQConst(engine, ScriptEvent::ET_VEHICLE_CRASHED, "ET_VEHICLE_CRASHED");
|
||||
SQAIEvent.DefSQConst(engine, ScriptEvent::ET_VEHICLE_LOST, "ET_VEHICLE_LOST");
|
||||
SQAIEvent.DefSQConst(engine, ScriptEvent::ET_VEHICLE_WAITING_IN_DEPOT, "ET_VEHICLE_WAITING_IN_DEPOT");
|
||||
SQAIEvent.DefSQConst(engine, ScriptEvent::ET_VEHICLE_UNPROFITABLE, "ET_VEHICLE_UNPROFITABLE");
|
||||
SQAIEvent.DefSQConst(engine, ScriptEvent::ET_INDUSTRY_OPEN, "ET_INDUSTRY_OPEN");
|
||||
SQAIEvent.DefSQConst(engine, ScriptEvent::ET_INDUSTRY_CLOSE, "ET_INDUSTRY_CLOSE");
|
||||
SQAIEvent.DefSQConst(engine, ScriptEvent::ET_ENGINE_AVAILABLE, "ET_ENGINE_AVAILABLE");
|
||||
SQAIEvent.DefSQConst(engine, ScriptEvent::ET_STATION_FIRST_VEHICLE, "ET_STATION_FIRST_VEHICLE");
|
||||
SQAIEvent.DefSQConst(engine, ScriptEvent::ET_DISASTER_ZEPPELINER_CRASHED, "ET_DISASTER_ZEPPELINER_CRASHED");
|
||||
SQAIEvent.DefSQConst(engine, ScriptEvent::ET_DISASTER_ZEPPELINER_CLEARED, "ET_DISASTER_ZEPPELINER_CLEARED");
|
||||
SQAIEvent.DefSQConst(engine, ScriptEvent::ET_TOWN_FOUNDED, "ET_TOWN_FOUNDED");
|
||||
SQAIEvent.DefSQConst(engine, ScriptEvent::ET_AIRCRAFT_DEST_TOO_FAR, "ET_AIRCRAFT_DEST_TOO_FAR");
|
||||
SQAIEvent.DefSQConst(engine, ScriptEvent::ET_ADMIN_PORT, "ET_ADMIN_PORT");
|
||||
SQAIEvent.DefSQConst(engine, ScriptEvent::ET_WINDOW_WIDGET_CLICK, "ET_WINDOW_WIDGET_CLICK");
|
||||
SQAIEvent.DefSQConst(engine, ScriptEvent::ET_GOAL_QUESTION_ANSWER, "ET_GOAL_QUESTION_ANSWER");
|
||||
SQAIEvent.DefSQConst(engine, ScriptEvent::ET_EXCLUSIVE_TRANSPORT_RIGHTS, "ET_EXCLUSIVE_TRANSPORT_RIGHTS");
|
||||
SQAIEvent.DefSQConst(engine, ScriptEvent::ET_ROAD_RECONSTRUCTION, "ET_ROAD_RECONSTRUCTION");
|
||||
SQAIEvent.DefSQConst(engine, ScriptEvent::ET_VEHICLE_AUTOREPLACED, "ET_VEHICLE_AUTOREPLACED");
|
||||
SQAIEvent.DefSQConst(engine, ScriptEvent::ET_STORYPAGE_BUTTON_CLICK, "ET_STORYPAGE_BUTTON_CLICK");
|
||||
SQAIEvent.DefSQConst(engine, ScriptEvent::ET_STORYPAGE_TILE_SELECT, "ET_STORYPAGE_TILE_SELECT");
|
||||
SQAIEvent.DefSQConst(engine, ScriptEvent::ET_STORYPAGE_VEHICLE_SELECT, "ET_STORYPAGE_VEHICLE_SELECT");
|
||||
|
||||
SQAIEvent.DefSQMethod(engine, &ScriptEvent::GetEventType, "GetEventType", 1, "x");
|
||||
|
||||
SQAIEvent.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptEventController, ST_AI>() { return "AIEventController"; }
|
||||
|
||||
void SQAIEventController_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptEventController, ST_AI> SQAIEventController("AIEventController");
|
||||
SQAIEventController.PreRegister(engine);
|
||||
SQAIEventController.AddConstructor<void (ScriptEventController::*)(), 1>(engine, "x");
|
||||
|
||||
SQAIEventController.DefSQStaticMethod(engine, &ScriptEventController::IsEventWaiting, "IsEventWaiting", 1, ".");
|
||||
SQAIEventController.DefSQStaticMethod(engine, &ScriptEventController::GetNextEvent, "GetNextEvent", 1, ".");
|
||||
|
||||
SQAIEventController.PostRegister(engine);
|
||||
}
|
@ -1,421 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_event_types.hpp"
|
||||
#include "../template/template_event_types.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptEventVehicleCrashed, ST_AI>() { return "AIEventVehicleCrashed"; }
|
||||
|
||||
void SQAIEventVehicleCrashed_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptEventVehicleCrashed, ST_AI> SQAIEventVehicleCrashed("AIEventVehicleCrashed");
|
||||
SQAIEventVehicleCrashed.PreRegister(engine, "AIEvent");
|
||||
|
||||
SQAIEventVehicleCrashed.DefSQConst(engine, ScriptEventVehicleCrashed::CRASH_TRAIN, "CRASH_TRAIN");
|
||||
SQAIEventVehicleCrashed.DefSQConst(engine, ScriptEventVehicleCrashed::CRASH_RV_LEVEL_CROSSING, "CRASH_RV_LEVEL_CROSSING");
|
||||
SQAIEventVehicleCrashed.DefSQConst(engine, ScriptEventVehicleCrashed::CRASH_RV_UFO, "CRASH_RV_UFO");
|
||||
SQAIEventVehicleCrashed.DefSQConst(engine, ScriptEventVehicleCrashed::CRASH_PLANE_LANDING, "CRASH_PLANE_LANDING");
|
||||
SQAIEventVehicleCrashed.DefSQConst(engine, ScriptEventVehicleCrashed::CRASH_AIRCRAFT_NO_AIRPORT, "CRASH_AIRCRAFT_NO_AIRPORT");
|
||||
SQAIEventVehicleCrashed.DefSQConst(engine, ScriptEventVehicleCrashed::CRASH_FLOODED, "CRASH_FLOODED");
|
||||
|
||||
SQAIEventVehicleCrashed.DefSQStaticMethod(engine, &ScriptEventVehicleCrashed::Convert, "Convert", 2, ".x");
|
||||
|
||||
SQAIEventVehicleCrashed.DefSQMethod(engine, &ScriptEventVehicleCrashed::GetVehicleID, "GetVehicleID", 1, "x");
|
||||
SQAIEventVehicleCrashed.DefSQMethod(engine, &ScriptEventVehicleCrashed::GetCrashSite, "GetCrashSite", 1, "x");
|
||||
SQAIEventVehicleCrashed.DefSQMethod(engine, &ScriptEventVehicleCrashed::GetCrashReason, "GetCrashReason", 1, "x");
|
||||
|
||||
SQAIEventVehicleCrashed.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptEventSubsidyOffer, ST_AI>() { return "AIEventSubsidyOffer"; }
|
||||
|
||||
void SQAIEventSubsidyOffer_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptEventSubsidyOffer, ST_AI> SQAIEventSubsidyOffer("AIEventSubsidyOffer");
|
||||
SQAIEventSubsidyOffer.PreRegister(engine, "AIEvent");
|
||||
|
||||
SQAIEventSubsidyOffer.DefSQStaticMethod(engine, &ScriptEventSubsidyOffer::Convert, "Convert", 2, ".x");
|
||||
|
||||
SQAIEventSubsidyOffer.DefSQMethod(engine, &ScriptEventSubsidyOffer::GetSubsidyID, "GetSubsidyID", 1, "x");
|
||||
|
||||
SQAIEventSubsidyOffer.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptEventSubsidyOfferExpired, ST_AI>() { return "AIEventSubsidyOfferExpired"; }
|
||||
|
||||
void SQAIEventSubsidyOfferExpired_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptEventSubsidyOfferExpired, ST_AI> SQAIEventSubsidyOfferExpired("AIEventSubsidyOfferExpired");
|
||||
SQAIEventSubsidyOfferExpired.PreRegister(engine, "AIEvent");
|
||||
|
||||
SQAIEventSubsidyOfferExpired.DefSQStaticMethod(engine, &ScriptEventSubsidyOfferExpired::Convert, "Convert", 2, ".x");
|
||||
|
||||
SQAIEventSubsidyOfferExpired.DefSQMethod(engine, &ScriptEventSubsidyOfferExpired::GetSubsidyID, "GetSubsidyID", 1, "x");
|
||||
|
||||
SQAIEventSubsidyOfferExpired.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptEventSubsidyAwarded, ST_AI>() { return "AIEventSubsidyAwarded"; }
|
||||
|
||||
void SQAIEventSubsidyAwarded_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptEventSubsidyAwarded, ST_AI> SQAIEventSubsidyAwarded("AIEventSubsidyAwarded");
|
||||
SQAIEventSubsidyAwarded.PreRegister(engine, "AIEvent");
|
||||
|
||||
SQAIEventSubsidyAwarded.DefSQStaticMethod(engine, &ScriptEventSubsidyAwarded::Convert, "Convert", 2, ".x");
|
||||
|
||||
SQAIEventSubsidyAwarded.DefSQMethod(engine, &ScriptEventSubsidyAwarded::GetSubsidyID, "GetSubsidyID", 1, "x");
|
||||
|
||||
SQAIEventSubsidyAwarded.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptEventSubsidyExpired, ST_AI>() { return "AIEventSubsidyExpired"; }
|
||||
|
||||
void SQAIEventSubsidyExpired_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptEventSubsidyExpired, ST_AI> SQAIEventSubsidyExpired("AIEventSubsidyExpired");
|
||||
SQAIEventSubsidyExpired.PreRegister(engine, "AIEvent");
|
||||
|
||||
SQAIEventSubsidyExpired.DefSQStaticMethod(engine, &ScriptEventSubsidyExpired::Convert, "Convert", 2, ".x");
|
||||
|
||||
SQAIEventSubsidyExpired.DefSQMethod(engine, &ScriptEventSubsidyExpired::GetSubsidyID, "GetSubsidyID", 1, "x");
|
||||
|
||||
SQAIEventSubsidyExpired.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptEventEnginePreview, ST_AI>() { return "AIEventEnginePreview"; }
|
||||
|
||||
void SQAIEventEnginePreview_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptEventEnginePreview, ST_AI> SQAIEventEnginePreview("AIEventEnginePreview");
|
||||
SQAIEventEnginePreview.PreRegister(engine, "AIEvent");
|
||||
|
||||
SQAIEventEnginePreview.DefSQStaticMethod(engine, &ScriptEventEnginePreview::Convert, "Convert", 2, ".x");
|
||||
|
||||
SQAIEventEnginePreview.DefSQMethod(engine, &ScriptEventEnginePreview::GetName, "GetName", 1, "x");
|
||||
SQAIEventEnginePreview.DefSQMethod(engine, &ScriptEventEnginePreview::GetCargoType, "GetCargoType", 1, "x");
|
||||
SQAIEventEnginePreview.DefSQMethod(engine, &ScriptEventEnginePreview::GetCapacity, "GetCapacity", 1, "x");
|
||||
SQAIEventEnginePreview.DefSQMethod(engine, &ScriptEventEnginePreview::GetMaxSpeed, "GetMaxSpeed", 1, "x");
|
||||
SQAIEventEnginePreview.DefSQMethod(engine, &ScriptEventEnginePreview::GetPrice, "GetPrice", 1, "x");
|
||||
SQAIEventEnginePreview.DefSQMethod(engine, &ScriptEventEnginePreview::GetRunningCost, "GetRunningCost", 1, "x");
|
||||
SQAIEventEnginePreview.DefSQMethod(engine, &ScriptEventEnginePreview::GetVehicleType, "GetVehicleType", 1, "x");
|
||||
SQAIEventEnginePreview.DefSQMethod(engine, &ScriptEventEnginePreview::AcceptPreview, "AcceptPreview", 1, "x");
|
||||
|
||||
SQAIEventEnginePreview.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptEventCompanyNew, ST_AI>() { return "AIEventCompanyNew"; }
|
||||
|
||||
void SQAIEventCompanyNew_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptEventCompanyNew, ST_AI> SQAIEventCompanyNew("AIEventCompanyNew");
|
||||
SQAIEventCompanyNew.PreRegister(engine, "AIEvent");
|
||||
|
||||
SQAIEventCompanyNew.DefSQStaticMethod(engine, &ScriptEventCompanyNew::Convert, "Convert", 2, ".x");
|
||||
|
||||
SQAIEventCompanyNew.DefSQMethod(engine, &ScriptEventCompanyNew::GetCompanyID, "GetCompanyID", 1, "x");
|
||||
|
||||
SQAIEventCompanyNew.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptEventCompanyInTrouble, ST_AI>() { return "AIEventCompanyInTrouble"; }
|
||||
|
||||
void SQAIEventCompanyInTrouble_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptEventCompanyInTrouble, ST_AI> SQAIEventCompanyInTrouble("AIEventCompanyInTrouble");
|
||||
SQAIEventCompanyInTrouble.PreRegister(engine, "AIEvent");
|
||||
|
||||
SQAIEventCompanyInTrouble.DefSQStaticMethod(engine, &ScriptEventCompanyInTrouble::Convert, "Convert", 2, ".x");
|
||||
|
||||
SQAIEventCompanyInTrouble.DefSQMethod(engine, &ScriptEventCompanyInTrouble::GetCompanyID, "GetCompanyID", 1, "x");
|
||||
|
||||
SQAIEventCompanyInTrouble.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptEventCompanyAskMerger, ST_AI>() { return "AIEventCompanyAskMerger"; }
|
||||
|
||||
void SQAIEventCompanyAskMerger_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptEventCompanyAskMerger, ST_AI> SQAIEventCompanyAskMerger("AIEventCompanyAskMerger");
|
||||
SQAIEventCompanyAskMerger.PreRegister(engine, "AIEvent");
|
||||
|
||||
SQAIEventCompanyAskMerger.DefSQStaticMethod(engine, &ScriptEventCompanyAskMerger::Convert, "Convert", 2, ".x");
|
||||
|
||||
SQAIEventCompanyAskMerger.DefSQMethod(engine, &ScriptEventCompanyAskMerger::GetCompanyID, "GetCompanyID", 1, "x");
|
||||
SQAIEventCompanyAskMerger.DefSQMethod(engine, &ScriptEventCompanyAskMerger::GetValue, "GetValue", 1, "x");
|
||||
SQAIEventCompanyAskMerger.DefSQMethod(engine, &ScriptEventCompanyAskMerger::AcceptMerger, "AcceptMerger", 1, "x");
|
||||
|
||||
SQAIEventCompanyAskMerger.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptEventCompanyMerger, ST_AI>() { return "AIEventCompanyMerger"; }
|
||||
|
||||
void SQAIEventCompanyMerger_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptEventCompanyMerger, ST_AI> SQAIEventCompanyMerger("AIEventCompanyMerger");
|
||||
SQAIEventCompanyMerger.PreRegister(engine, "AIEvent");
|
||||
|
||||
SQAIEventCompanyMerger.DefSQStaticMethod(engine, &ScriptEventCompanyMerger::Convert, "Convert", 2, ".x");
|
||||
|
||||
SQAIEventCompanyMerger.DefSQMethod(engine, &ScriptEventCompanyMerger::GetOldCompanyID, "GetOldCompanyID", 1, "x");
|
||||
SQAIEventCompanyMerger.DefSQMethod(engine, &ScriptEventCompanyMerger::GetNewCompanyID, "GetNewCompanyID", 1, "x");
|
||||
|
||||
SQAIEventCompanyMerger.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptEventCompanyBankrupt, ST_AI>() { return "AIEventCompanyBankrupt"; }
|
||||
|
||||
void SQAIEventCompanyBankrupt_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptEventCompanyBankrupt, ST_AI> SQAIEventCompanyBankrupt("AIEventCompanyBankrupt");
|
||||
SQAIEventCompanyBankrupt.PreRegister(engine, "AIEvent");
|
||||
|
||||
SQAIEventCompanyBankrupt.DefSQStaticMethod(engine, &ScriptEventCompanyBankrupt::Convert, "Convert", 2, ".x");
|
||||
|
||||
SQAIEventCompanyBankrupt.DefSQMethod(engine, &ScriptEventCompanyBankrupt::GetCompanyID, "GetCompanyID", 1, "x");
|
||||
|
||||
SQAIEventCompanyBankrupt.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptEventVehicleLost, ST_AI>() { return "AIEventVehicleLost"; }
|
||||
|
||||
void SQAIEventVehicleLost_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptEventVehicleLost, ST_AI> SQAIEventVehicleLost("AIEventVehicleLost");
|
||||
SQAIEventVehicleLost.PreRegister(engine, "AIEvent");
|
||||
|
||||
SQAIEventVehicleLost.DefSQStaticMethod(engine, &ScriptEventVehicleLost::Convert, "Convert", 2, ".x");
|
||||
|
||||
SQAIEventVehicleLost.DefSQMethod(engine, &ScriptEventVehicleLost::GetVehicleID, "GetVehicleID", 1, "x");
|
||||
|
||||
SQAIEventVehicleLost.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptEventVehicleWaitingInDepot, ST_AI>() { return "AIEventVehicleWaitingInDepot"; }
|
||||
|
||||
void SQAIEventVehicleWaitingInDepot_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptEventVehicleWaitingInDepot, ST_AI> SQAIEventVehicleWaitingInDepot("AIEventVehicleWaitingInDepot");
|
||||
SQAIEventVehicleWaitingInDepot.PreRegister(engine, "AIEvent");
|
||||
|
||||
SQAIEventVehicleWaitingInDepot.DefSQStaticMethod(engine, &ScriptEventVehicleWaitingInDepot::Convert, "Convert", 2, ".x");
|
||||
|
||||
SQAIEventVehicleWaitingInDepot.DefSQMethod(engine, &ScriptEventVehicleWaitingInDepot::GetVehicleID, "GetVehicleID", 1, "x");
|
||||
|
||||
SQAIEventVehicleWaitingInDepot.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptEventVehicleUnprofitable, ST_AI>() { return "AIEventVehicleUnprofitable"; }
|
||||
|
||||
void SQAIEventVehicleUnprofitable_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptEventVehicleUnprofitable, ST_AI> SQAIEventVehicleUnprofitable("AIEventVehicleUnprofitable");
|
||||
SQAIEventVehicleUnprofitable.PreRegister(engine, "AIEvent");
|
||||
|
||||
SQAIEventVehicleUnprofitable.DefSQStaticMethod(engine, &ScriptEventVehicleUnprofitable::Convert, "Convert", 2, ".x");
|
||||
|
||||
SQAIEventVehicleUnprofitable.DefSQMethod(engine, &ScriptEventVehicleUnprofitable::GetVehicleID, "GetVehicleID", 1, "x");
|
||||
|
||||
SQAIEventVehicleUnprofitable.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptEventIndustryOpen, ST_AI>() { return "AIEventIndustryOpen"; }
|
||||
|
||||
void SQAIEventIndustryOpen_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptEventIndustryOpen, ST_AI> SQAIEventIndustryOpen("AIEventIndustryOpen");
|
||||
SQAIEventIndustryOpen.PreRegister(engine, "AIEvent");
|
||||
|
||||
SQAIEventIndustryOpen.DefSQStaticMethod(engine, &ScriptEventIndustryOpen::Convert, "Convert", 2, ".x");
|
||||
|
||||
SQAIEventIndustryOpen.DefSQMethod(engine, &ScriptEventIndustryOpen::GetIndustryID, "GetIndustryID", 1, "x");
|
||||
|
||||
SQAIEventIndustryOpen.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptEventIndustryClose, ST_AI>() { return "AIEventIndustryClose"; }
|
||||
|
||||
void SQAIEventIndustryClose_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptEventIndustryClose, ST_AI> SQAIEventIndustryClose("AIEventIndustryClose");
|
||||
SQAIEventIndustryClose.PreRegister(engine, "AIEvent");
|
||||
|
||||
SQAIEventIndustryClose.DefSQStaticMethod(engine, &ScriptEventIndustryClose::Convert, "Convert", 2, ".x");
|
||||
|
||||
SQAIEventIndustryClose.DefSQMethod(engine, &ScriptEventIndustryClose::GetIndustryID, "GetIndustryID", 1, "x");
|
||||
|
||||
SQAIEventIndustryClose.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptEventEngineAvailable, ST_AI>() { return "AIEventEngineAvailable"; }
|
||||
|
||||
void SQAIEventEngineAvailable_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptEventEngineAvailable, ST_AI> SQAIEventEngineAvailable("AIEventEngineAvailable");
|
||||
SQAIEventEngineAvailable.PreRegister(engine, "AIEvent");
|
||||
|
||||
SQAIEventEngineAvailable.DefSQStaticMethod(engine, &ScriptEventEngineAvailable::Convert, "Convert", 2, ".x");
|
||||
|
||||
SQAIEventEngineAvailable.DefSQMethod(engine, &ScriptEventEngineAvailable::GetEngineID, "GetEngineID", 1, "x");
|
||||
|
||||
SQAIEventEngineAvailable.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptEventStationFirstVehicle, ST_AI>() { return "AIEventStationFirstVehicle"; }
|
||||
|
||||
void SQAIEventStationFirstVehicle_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptEventStationFirstVehicle, ST_AI> SQAIEventStationFirstVehicle("AIEventStationFirstVehicle");
|
||||
SQAIEventStationFirstVehicle.PreRegister(engine, "AIEvent");
|
||||
|
||||
SQAIEventStationFirstVehicle.DefSQStaticMethod(engine, &ScriptEventStationFirstVehicle::Convert, "Convert", 2, ".x");
|
||||
|
||||
SQAIEventStationFirstVehicle.DefSQMethod(engine, &ScriptEventStationFirstVehicle::GetStationID, "GetStationID", 1, "x");
|
||||
SQAIEventStationFirstVehicle.DefSQMethod(engine, &ScriptEventStationFirstVehicle::GetVehicleID, "GetVehicleID", 1, "x");
|
||||
|
||||
SQAIEventStationFirstVehicle.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptEventDisasterZeppelinerCrashed, ST_AI>() { return "AIEventDisasterZeppelinerCrashed"; }
|
||||
|
||||
void SQAIEventDisasterZeppelinerCrashed_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptEventDisasterZeppelinerCrashed, ST_AI> SQAIEventDisasterZeppelinerCrashed("AIEventDisasterZeppelinerCrashed");
|
||||
SQAIEventDisasterZeppelinerCrashed.PreRegister(engine, "AIEvent");
|
||||
|
||||
SQAIEventDisasterZeppelinerCrashed.DefSQStaticMethod(engine, &ScriptEventDisasterZeppelinerCrashed::Convert, "Convert", 2, ".x");
|
||||
|
||||
SQAIEventDisasterZeppelinerCrashed.DefSQMethod(engine, &ScriptEventDisasterZeppelinerCrashed::GetStationID, "GetStationID", 1, "x");
|
||||
|
||||
SQAIEventDisasterZeppelinerCrashed.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptEventDisasterZeppelinerCleared, ST_AI>() { return "AIEventDisasterZeppelinerCleared"; }
|
||||
|
||||
void SQAIEventDisasterZeppelinerCleared_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptEventDisasterZeppelinerCleared, ST_AI> SQAIEventDisasterZeppelinerCleared("AIEventDisasterZeppelinerCleared");
|
||||
SQAIEventDisasterZeppelinerCleared.PreRegister(engine, "AIEvent");
|
||||
|
||||
SQAIEventDisasterZeppelinerCleared.DefSQStaticMethod(engine, &ScriptEventDisasterZeppelinerCleared::Convert, "Convert", 2, ".x");
|
||||
|
||||
SQAIEventDisasterZeppelinerCleared.DefSQMethod(engine, &ScriptEventDisasterZeppelinerCleared::GetStationID, "GetStationID", 1, "x");
|
||||
|
||||
SQAIEventDisasterZeppelinerCleared.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptEventTownFounded, ST_AI>() { return "AIEventTownFounded"; }
|
||||
|
||||
void SQAIEventTownFounded_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptEventTownFounded, ST_AI> SQAIEventTownFounded("AIEventTownFounded");
|
||||
SQAIEventTownFounded.PreRegister(engine, "AIEvent");
|
||||
|
||||
SQAIEventTownFounded.DefSQStaticMethod(engine, &ScriptEventTownFounded::Convert, "Convert", 2, ".x");
|
||||
|
||||
SQAIEventTownFounded.DefSQMethod(engine, &ScriptEventTownFounded::GetTownID, "GetTownID", 1, "x");
|
||||
|
||||
SQAIEventTownFounded.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptEventAircraftDestTooFar, ST_AI>() { return "AIEventAircraftDestTooFar"; }
|
||||
|
||||
void SQAIEventAircraftDestTooFar_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptEventAircraftDestTooFar, ST_AI> SQAIEventAircraftDestTooFar("AIEventAircraftDestTooFar");
|
||||
SQAIEventAircraftDestTooFar.PreRegister(engine, "AIEvent");
|
||||
|
||||
SQAIEventAircraftDestTooFar.DefSQStaticMethod(engine, &ScriptEventAircraftDestTooFar::Convert, "Convert", 2, ".x");
|
||||
|
||||
SQAIEventAircraftDestTooFar.DefSQMethod(engine, &ScriptEventAircraftDestTooFar::GetVehicleID, "GetVehicleID", 1, "x");
|
||||
|
||||
SQAIEventAircraftDestTooFar.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptEventCompanyTown, ST_AI>() { return "AIEventCompanyTown"; }
|
||||
|
||||
void SQAIEventCompanyTown_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptEventCompanyTown, ST_AI> SQAIEventCompanyTown("AIEventCompanyTown");
|
||||
SQAIEventCompanyTown.PreRegister(engine, "AIEvent");
|
||||
|
||||
SQAIEventCompanyTown.DefSQStaticMethod(engine, &ScriptEventCompanyTown::Convert, "Convert", 2, ".x");
|
||||
|
||||
SQAIEventCompanyTown.DefSQMethod(engine, &ScriptEventCompanyTown::GetCompanyID, "GetCompanyID", 1, "x");
|
||||
SQAIEventCompanyTown.DefSQMethod(engine, &ScriptEventCompanyTown::GetTownID, "GetTownID", 1, "x");
|
||||
|
||||
SQAIEventCompanyTown.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptEventExclusiveTransportRights, ST_AI>() { return "AIEventExclusiveTransportRights"; }
|
||||
|
||||
void SQAIEventExclusiveTransportRights_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptEventExclusiveTransportRights, ST_AI> SQAIEventExclusiveTransportRights("AIEventExclusiveTransportRights");
|
||||
SQAIEventExclusiveTransportRights.PreRegister(engine, "AIEventCompanyTown");
|
||||
SQAIEventExclusiveTransportRights.AddConstructor<void (ScriptEventExclusiveTransportRights::*)(ScriptCompany::CompanyID company, TownID town), 3>(engine, "xii");
|
||||
|
||||
SQAIEventExclusiveTransportRights.DefSQStaticMethod(engine, &ScriptEventExclusiveTransportRights::Convert, "Convert", 2, ".x");
|
||||
|
||||
SQAIEventExclusiveTransportRights.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptEventRoadReconstruction, ST_AI>() { return "AIEventRoadReconstruction"; }
|
||||
|
||||
void SQAIEventRoadReconstruction_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptEventRoadReconstruction, ST_AI> SQAIEventRoadReconstruction("AIEventRoadReconstruction");
|
||||
SQAIEventRoadReconstruction.PreRegister(engine, "AIEventCompanyTown");
|
||||
SQAIEventRoadReconstruction.AddConstructor<void (ScriptEventRoadReconstruction::*)(ScriptCompany::CompanyID company, TownID town), 3>(engine, "xii");
|
||||
|
||||
SQAIEventRoadReconstruction.DefSQStaticMethod(engine, &ScriptEventRoadReconstruction::Convert, "Convert", 2, ".x");
|
||||
|
||||
SQAIEventRoadReconstruction.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptEventVehicleAutoReplaced, ST_AI>() { return "AIEventVehicleAutoReplaced"; }
|
||||
|
||||
void SQAIEventVehicleAutoReplaced_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptEventVehicleAutoReplaced, ST_AI> SQAIEventVehicleAutoReplaced("AIEventVehicleAutoReplaced");
|
||||
SQAIEventVehicleAutoReplaced.PreRegister(engine, "AIEvent");
|
||||
|
||||
SQAIEventVehicleAutoReplaced.DefSQStaticMethod(engine, &ScriptEventVehicleAutoReplaced::Convert, "Convert", 2, ".x");
|
||||
|
||||
SQAIEventVehicleAutoReplaced.DefSQMethod(engine, &ScriptEventVehicleAutoReplaced::GetOldVehicleID, "GetOldVehicleID", 1, "x");
|
||||
SQAIEventVehicleAutoReplaced.DefSQMethod(engine, &ScriptEventVehicleAutoReplaced::GetNewVehicleID, "GetNewVehicleID", 1, "x");
|
||||
|
||||
SQAIEventVehicleAutoReplaced.PostRegister(engine);
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_execmode.hpp"
|
||||
#include "../template/template_execmode.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptExecMode, ST_AI>() { return "AIExecMode"; }
|
||||
|
||||
void SQAIExecMode_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptExecMode, ST_AI> SQAIExecMode("AIExecMode");
|
||||
SQAIExecMode.PreRegister(engine);
|
||||
SQAIExecMode.AddConstructor<void (ScriptExecMode::*)(), 1>(engine, "x");
|
||||
|
||||
SQAIExecMode.PostRegister(engine);
|
||||
}
|
@ -1,27 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_gamesettings.hpp"
|
||||
#include "../template/template_gamesettings.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptGameSettings, ST_AI>() { return "AIGameSettings"; }
|
||||
|
||||
void SQAIGameSettings_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptGameSettings, ST_AI> SQAIGameSettings("AIGameSettings");
|
||||
SQAIGameSettings.PreRegister(engine);
|
||||
SQAIGameSettings.AddConstructor<void (ScriptGameSettings::*)(), 1>(engine, "x");
|
||||
|
||||
SQAIGameSettings.DefSQStaticMethod(engine, &ScriptGameSettings::IsValid, "IsValid", 2, "..");
|
||||
SQAIGameSettings.DefSQStaticMethod(engine, &ScriptGameSettings::GetValue, "GetValue", 2, "..");
|
||||
SQAIGameSettings.DefSQStaticMethod(engine, &ScriptGameSettings::IsDisabledVehicleType, "IsDisabledVehicleType", 2, ".i");
|
||||
|
||||
SQAIGameSettings.PostRegister(engine);
|
||||
}
|
@ -1,52 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_group.hpp"
|
||||
#include "../template/template_group.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptGroup, ST_AI>() { return "AIGroup"; }
|
||||
|
||||
void SQAIGroup_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptGroup, ST_AI> SQAIGroup("AIGroup");
|
||||
SQAIGroup.PreRegister(engine);
|
||||
SQAIGroup.AddConstructor<void (ScriptGroup::*)(), 1>(engine, "x");
|
||||
|
||||
SQAIGroup.DefSQConst(engine, ScriptGroup::GROUP_ALL, "GROUP_ALL");
|
||||
SQAIGroup.DefSQConst(engine, ScriptGroup::GROUP_DEFAULT, "GROUP_DEFAULT");
|
||||
SQAIGroup.DefSQConst(engine, ScriptGroup::GROUP_INVALID, "GROUP_INVALID");
|
||||
|
||||
SQAIGroup.DefSQStaticMethod(engine, &ScriptGroup::IsValidGroup, "IsValidGroup", 2, ".i");
|
||||
SQAIGroup.DefSQStaticMethod(engine, &ScriptGroup::CreateGroup, "CreateGroup", 3, ".ii");
|
||||
SQAIGroup.DefSQStaticMethod(engine, &ScriptGroup::DeleteGroup, "DeleteGroup", 2, ".i");
|
||||
SQAIGroup.DefSQStaticMethod(engine, &ScriptGroup::GetVehicleType, "GetVehicleType", 2, ".i");
|
||||
SQAIGroup.DefSQStaticMethod(engine, &ScriptGroup::SetName, "SetName", 3, ".i.");
|
||||
SQAIGroup.DefSQStaticMethod(engine, &ScriptGroup::GetName, "GetName", 2, ".i");
|
||||
SQAIGroup.DefSQStaticMethod(engine, &ScriptGroup::SetParent, "SetParent", 3, ".ii");
|
||||
SQAIGroup.DefSQStaticMethod(engine, &ScriptGroup::GetParent, "GetParent", 2, ".i");
|
||||
SQAIGroup.DefSQStaticMethod(engine, &ScriptGroup::EnableAutoReplaceProtection, "EnableAutoReplaceProtection", 3, ".ib");
|
||||
SQAIGroup.DefSQStaticMethod(engine, &ScriptGroup::GetAutoReplaceProtection, "GetAutoReplaceProtection", 2, ".i");
|
||||
SQAIGroup.DefSQStaticMethod(engine, &ScriptGroup::GetNumEngines, "GetNumEngines", 3, ".ii");
|
||||
SQAIGroup.DefSQStaticMethod(engine, &ScriptGroup::MoveVehicle, "MoveVehicle", 3, ".ii");
|
||||
SQAIGroup.DefSQStaticMethod(engine, &ScriptGroup::EnableWagonRemoval, "EnableWagonRemoval", 2, ".b");
|
||||
SQAIGroup.DefSQStaticMethod(engine, &ScriptGroup::HasWagonRemoval, "HasWagonRemoval", 1, ".");
|
||||
SQAIGroup.DefSQStaticMethod(engine, &ScriptGroup::SetAutoReplace, "SetAutoReplace", 4, ".iii");
|
||||
SQAIGroup.DefSQStaticMethod(engine, &ScriptGroup::GetEngineReplacement, "GetEngineReplacement", 3, ".ii");
|
||||
SQAIGroup.DefSQStaticMethod(engine, &ScriptGroup::StopAutoReplace, "StopAutoReplace", 3, ".ii");
|
||||
SQAIGroup.DefSQStaticMethod(engine, &ScriptGroup::GetProfitThisYear, "GetProfitThisYear", 2, ".i");
|
||||
SQAIGroup.DefSQStaticMethod(engine, &ScriptGroup::GetProfitLastYear, "GetProfitLastYear", 2, ".i");
|
||||
SQAIGroup.DefSQStaticMethod(engine, &ScriptGroup::GetCurrentUsage, "GetCurrentUsage", 2, ".i");
|
||||
SQAIGroup.DefSQStaticMethod(engine, &ScriptGroup::SetPrimaryColour, "SetPrimaryColour", 3, ".ii");
|
||||
SQAIGroup.DefSQStaticMethod(engine, &ScriptGroup::SetSecondaryColour, "SetSecondaryColour", 3, ".ii");
|
||||
SQAIGroup.DefSQStaticMethod(engine, &ScriptGroup::GetPrimaryColour, "GetPrimaryColour", 2, ".i");
|
||||
SQAIGroup.DefSQStaticMethod(engine, &ScriptGroup::GetSecondaryColour, "GetSecondaryColour", 2, ".i");
|
||||
|
||||
SQAIGroup.PostRegister(engine);
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_grouplist.hpp"
|
||||
#include "../template/template_grouplist.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptGroupList, ST_AI>() { return "AIGroupList"; }
|
||||
|
||||
void SQAIGroupList_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptGroupList, ST_AI> SQAIGroupList("AIGroupList");
|
||||
SQAIGroupList.PreRegister(engine, "AIList");
|
||||
SQAIGroupList.AddConstructor<void (ScriptGroupList::*)(), 1>(engine, "x");
|
||||
|
||||
SQAIGroupList.PostRegister(engine);
|
||||
}
|
@ -1,47 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_industry.hpp"
|
||||
#include "../template/template_industry.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptIndustry, ST_AI>() { return "AIIndustry"; }
|
||||
|
||||
void SQAIIndustry_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptIndustry, ST_AI> SQAIIndustry("AIIndustry");
|
||||
SQAIIndustry.PreRegister(engine);
|
||||
SQAIIndustry.AddConstructor<void (ScriptIndustry::*)(), 1>(engine, "x");
|
||||
|
||||
SQAIIndustry.DefSQConst(engine, ScriptIndustry::CAS_NOT_ACCEPTED, "CAS_NOT_ACCEPTED");
|
||||
SQAIIndustry.DefSQConst(engine, ScriptIndustry::CAS_ACCEPTED, "CAS_ACCEPTED");
|
||||
SQAIIndustry.DefSQConst(engine, ScriptIndustry::CAS_TEMP_REFUSED, "CAS_TEMP_REFUSED");
|
||||
|
||||
SQAIIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetIndustryCount, "GetIndustryCount", 1, ".");
|
||||
SQAIIndustry.DefSQStaticMethod(engine, &ScriptIndustry::IsValidIndustry, "IsValidIndustry", 2, ".i");
|
||||
SQAIIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetIndustryID, "GetIndustryID", 2, ".i");
|
||||
SQAIIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetName, "GetName", 2, ".i");
|
||||
SQAIIndustry.DefSQStaticMethod(engine, &ScriptIndustry::IsCargoAccepted, "IsCargoAccepted", 3, ".ii");
|
||||
SQAIIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetStockpiledCargo, "GetStockpiledCargo", 3, ".ii");
|
||||
SQAIIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetLastMonthProduction, "GetLastMonthProduction", 3, ".ii");
|
||||
SQAIIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetLastMonthTransported, "GetLastMonthTransported", 3, ".ii");
|
||||
SQAIIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetLastMonthTransportedPercentage, "GetLastMonthTransportedPercentage", 3, ".ii");
|
||||
SQAIIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetLocation, "GetLocation", 2, ".i");
|
||||
SQAIIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetAmountOfStationsAround, "GetAmountOfStationsAround", 2, ".i");
|
||||
SQAIIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetDistanceManhattanToTile, "GetDistanceManhattanToTile", 3, ".ii");
|
||||
SQAIIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetDistanceSquareToTile, "GetDistanceSquareToTile", 3, ".ii");
|
||||
SQAIIndustry.DefSQStaticMethod(engine, &ScriptIndustry::IsBuiltOnWater, "IsBuiltOnWater", 2, ".i");
|
||||
SQAIIndustry.DefSQStaticMethod(engine, &ScriptIndustry::HasHeliport, "HasHeliport", 2, ".i");
|
||||
SQAIIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetHeliportLocation, "GetHeliportLocation", 2, ".i");
|
||||
SQAIIndustry.DefSQStaticMethod(engine, &ScriptIndustry::HasDock, "HasDock", 2, ".i");
|
||||
SQAIIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetDockLocation, "GetDockLocation", 2, ".i");
|
||||
SQAIIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetIndustryType, "GetIndustryType", 2, ".i");
|
||||
|
||||
SQAIIndustry.PostRegister(engine);
|
||||
}
|
@ -1,47 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_industrylist.hpp"
|
||||
#include "../template/template_industrylist.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptIndustryList, ST_AI>() { return "AIIndustryList"; }
|
||||
|
||||
void SQAIIndustryList_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptIndustryList, ST_AI> SQAIIndustryList("AIIndustryList");
|
||||
SQAIIndustryList.PreRegister(engine, "AIList");
|
||||
SQAIIndustryList.AddConstructor<void (ScriptIndustryList::*)(), 1>(engine, "x");
|
||||
|
||||
SQAIIndustryList.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptIndustryList_CargoAccepting, ST_AI>() { return "AIIndustryList_CargoAccepting"; }
|
||||
|
||||
void SQAIIndustryList_CargoAccepting_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptIndustryList_CargoAccepting, ST_AI> SQAIIndustryList_CargoAccepting("AIIndustryList_CargoAccepting");
|
||||
SQAIIndustryList_CargoAccepting.PreRegister(engine, "AIList");
|
||||
SQAIIndustryList_CargoAccepting.AddConstructor<void (ScriptIndustryList_CargoAccepting::*)(CargoID cargo_id), 2>(engine, "xi");
|
||||
|
||||
SQAIIndustryList_CargoAccepting.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptIndustryList_CargoProducing, ST_AI>() { return "AIIndustryList_CargoProducing"; }
|
||||
|
||||
void SQAIIndustryList_CargoProducing_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptIndustryList_CargoProducing, ST_AI> SQAIIndustryList_CargoProducing("AIIndustryList_CargoProducing");
|
||||
SQAIIndustryList_CargoProducing.PreRegister(engine, "AIList");
|
||||
SQAIIndustryList_CargoProducing.AddConstructor<void (ScriptIndustryList_CargoProducing::*)(CargoID cargo_id), 2>(engine, "xi");
|
||||
|
||||
SQAIIndustryList_CargoProducing.PostRegister(engine);
|
||||
}
|
@ -1,42 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_industrytype.hpp"
|
||||
#include "../template/template_industrytype.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptIndustryType, ST_AI>() { return "AIIndustryType"; }
|
||||
|
||||
void SQAIIndustryType_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptIndustryType, ST_AI> SQAIIndustryType("AIIndustryType");
|
||||
SQAIIndustryType.PreRegister(engine);
|
||||
SQAIIndustryType.AddConstructor<void (ScriptIndustryType::*)(), 1>(engine, "x");
|
||||
|
||||
SQAIIndustryType.DefSQConst(engine, ScriptIndustryType::INDUSTRYTYPE_UNKNOWN, "INDUSTRYTYPE_UNKNOWN");
|
||||
SQAIIndustryType.DefSQConst(engine, ScriptIndustryType::INDUSTRYTYPE_TOWN, "INDUSTRYTYPE_TOWN");
|
||||
|
||||
SQAIIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::IsValidIndustryType, "IsValidIndustryType", 2, ".i");
|
||||
SQAIIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::GetName, "GetName", 2, ".i");
|
||||
SQAIIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::GetProducedCargo, "GetProducedCargo", 2, ".i");
|
||||
SQAIIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::GetAcceptedCargo, "GetAcceptedCargo", 2, ".i");
|
||||
SQAIIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::IsRawIndustry, "IsRawIndustry", 2, ".i");
|
||||
SQAIIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::IsProcessingIndustry, "IsProcessingIndustry", 2, ".i");
|
||||
SQAIIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::ProductionCanIncrease, "ProductionCanIncrease", 2, ".i");
|
||||
SQAIIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::GetConstructionCost, "GetConstructionCost", 2, ".i");
|
||||
SQAIIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::CanBuildIndustry, "CanBuildIndustry", 2, ".i");
|
||||
SQAIIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::CanProspectIndustry, "CanProspectIndustry", 2, ".i");
|
||||
SQAIIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::BuildIndustry, "BuildIndustry", 3, ".ii");
|
||||
SQAIIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::ProspectIndustry, "ProspectIndustry", 2, ".i");
|
||||
SQAIIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::IsBuiltOnWater, "IsBuiltOnWater", 2, ".i");
|
||||
SQAIIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::HasHeliport, "HasHeliport", 2, ".i");
|
||||
SQAIIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::HasDock, "HasDock", 2, ".i");
|
||||
|
||||
SQAIIndustryType.PostRegister(engine);
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_industrytypelist.hpp"
|
||||
#include "../template/template_industrytypelist.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptIndustryTypeList, ST_AI>() { return "AIIndustryTypeList"; }
|
||||
|
||||
void SQAIIndustryTypeList_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptIndustryTypeList, ST_AI> SQAIIndustryTypeList("AIIndustryTypeList");
|
||||
SQAIIndustryTypeList.PreRegister(engine, "AIList");
|
||||
SQAIIndustryTypeList.AddConstructor<void (ScriptIndustryTypeList::*)(), 1>(engine, "x");
|
||||
|
||||
SQAIIndustryTypeList.PostRegister(engine);
|
||||
}
|
@ -1,37 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_infrastructure.hpp"
|
||||
#include "../template/template_infrastructure.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptInfrastructure, ST_AI>() { return "AIInfrastructure"; }
|
||||
|
||||
void SQAIInfrastructure_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptInfrastructure, ST_AI> SQAIInfrastructure("AIInfrastructure");
|
||||
SQAIInfrastructure.PreRegister(engine);
|
||||
SQAIInfrastructure.AddConstructor<void (ScriptInfrastructure::*)(), 1>(engine, "x");
|
||||
|
||||
SQAIInfrastructure.DefSQConst(engine, ScriptInfrastructure::INFRASTRUCTURE_RAIL, "INFRASTRUCTURE_RAIL");
|
||||
SQAIInfrastructure.DefSQConst(engine, ScriptInfrastructure::INFRASTRUCTURE_SIGNALS, "INFRASTRUCTURE_SIGNALS");
|
||||
SQAIInfrastructure.DefSQConst(engine, ScriptInfrastructure::INFRASTRUCTURE_ROAD, "INFRASTRUCTURE_ROAD");
|
||||
SQAIInfrastructure.DefSQConst(engine, ScriptInfrastructure::INFRASTRUCTURE_CANAL, "INFRASTRUCTURE_CANAL");
|
||||
SQAIInfrastructure.DefSQConst(engine, ScriptInfrastructure::INFRASTRUCTURE_STATION, "INFRASTRUCTURE_STATION");
|
||||
SQAIInfrastructure.DefSQConst(engine, ScriptInfrastructure::INFRASTRUCTURE_AIRPORT, "INFRASTRUCTURE_AIRPORT");
|
||||
|
||||
SQAIInfrastructure.DefSQStaticMethod(engine, &ScriptInfrastructure::GetRailPieceCount, "GetRailPieceCount", 3, ".ii");
|
||||
SQAIInfrastructure.DefSQStaticMethod(engine, &ScriptInfrastructure::GetRoadPieceCount, "GetRoadPieceCount", 3, ".ii");
|
||||
SQAIInfrastructure.DefSQStaticMethod(engine, &ScriptInfrastructure::GetInfrastructurePieceCount, "GetInfrastructurePieceCount", 3, ".ii");
|
||||
SQAIInfrastructure.DefSQStaticMethod(engine, &ScriptInfrastructure::GetMonthlyRailCosts, "GetMonthlyRailCosts", 3, ".ii");
|
||||
SQAIInfrastructure.DefSQStaticMethod(engine, &ScriptInfrastructure::GetMonthlyRoadCosts, "GetMonthlyRoadCosts", 3, ".ii");
|
||||
SQAIInfrastructure.DefSQStaticMethod(engine, &ScriptInfrastructure::GetMonthlyInfrastructureCosts, "GetMonthlyInfrastructureCosts", 3, ".ii");
|
||||
|
||||
SQAIInfrastructure.PostRegister(engine);
|
||||
}
|
@ -1,62 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_list.hpp"
|
||||
#include "../template/template_list.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptList, ST_AI>() { return "AIList"; }
|
||||
|
||||
void SQAIList_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptList, ST_AI> SQAIList("AIList");
|
||||
SQAIList.PreRegister(engine);
|
||||
SQAIList.AddConstructor<void (ScriptList::*)(), 1>(engine, "x");
|
||||
|
||||
SQAIList.DefSQConst(engine, ScriptList::SORT_BY_VALUE, "SORT_BY_VALUE");
|
||||
SQAIList.DefSQConst(engine, ScriptList::SORT_BY_ITEM, "SORT_BY_ITEM");
|
||||
|
||||
SQAIList.DefSQConst(engine, ScriptList::SORT_ASCENDING, "SORT_ASCENDING");
|
||||
SQAIList.DefSQConst(engine, ScriptList::SORT_DESCENDING, "SORT_DESCENDING");
|
||||
|
||||
SQAIList.DefSQMethod(engine, &ScriptList::AddItem, "AddItem", 3, "xii");
|
||||
SQAIList.DefSQMethod(engine, &ScriptList::RemoveItem, "RemoveItem", 2, "xi");
|
||||
SQAIList.DefSQMethod(engine, &ScriptList::Clear, "Clear", 1, "x");
|
||||
SQAIList.DefSQMethod(engine, &ScriptList::HasItem, "HasItem", 2, "xi");
|
||||
SQAIList.DefSQMethod(engine, &ScriptList::Begin, "Begin", 1, "x");
|
||||
SQAIList.DefSQMethod(engine, &ScriptList::Next, "Next", 1, "x");
|
||||
SQAIList.DefSQMethod(engine, &ScriptList::IsEmpty, "IsEmpty", 1, "x");
|
||||
SQAIList.DefSQMethod(engine, &ScriptList::IsEnd, "IsEnd", 1, "x");
|
||||
SQAIList.DefSQMethod(engine, &ScriptList::Count, "Count", 1, "x");
|
||||
SQAIList.DefSQMethod(engine, &ScriptList::GetValue, "GetValue", 2, "xi");
|
||||
SQAIList.DefSQMethod(engine, &ScriptList::SetValue, "SetValue", 3, "xii");
|
||||
SQAIList.DefSQMethod(engine, &ScriptList::Sort, "Sort", 3, "xib");
|
||||
SQAIList.DefSQMethod(engine, &ScriptList::AddList, "AddList", 2, "xx");
|
||||
SQAIList.DefSQMethod(engine, &ScriptList::SwapList, "SwapList", 2, "xx");
|
||||
SQAIList.DefSQMethod(engine, &ScriptList::RemoveAboveValue, "RemoveAboveValue", 2, "xi");
|
||||
SQAIList.DefSQMethod(engine, &ScriptList::RemoveBelowValue, "RemoveBelowValue", 2, "xi");
|
||||
SQAIList.DefSQMethod(engine, &ScriptList::RemoveBetweenValue, "RemoveBetweenValue", 3, "xii");
|
||||
SQAIList.DefSQMethod(engine, &ScriptList::RemoveValue, "RemoveValue", 2, "xi");
|
||||
SQAIList.DefSQMethod(engine, &ScriptList::RemoveTop, "RemoveTop", 2, "xi");
|
||||
SQAIList.DefSQMethod(engine, &ScriptList::RemoveBottom, "RemoveBottom", 2, "xi");
|
||||
SQAIList.DefSQMethod(engine, &ScriptList::RemoveList, "RemoveList", 2, "xx");
|
||||
SQAIList.DefSQMethod(engine, &ScriptList::KeepAboveValue, "KeepAboveValue", 2, "xi");
|
||||
SQAIList.DefSQMethod(engine, &ScriptList::KeepBelowValue, "KeepBelowValue", 2, "xi");
|
||||
SQAIList.DefSQMethod(engine, &ScriptList::KeepBetweenValue, "KeepBetweenValue", 3, "xii");
|
||||
SQAIList.DefSQMethod(engine, &ScriptList::KeepValue, "KeepValue", 2, "xi");
|
||||
SQAIList.DefSQMethod(engine, &ScriptList::KeepTop, "KeepTop", 2, "xi");
|
||||
SQAIList.DefSQMethod(engine, &ScriptList::KeepBottom, "KeepBottom", 2, "xi");
|
||||
SQAIList.DefSQMethod(engine, &ScriptList::KeepList, "KeepList", 2, "xx");
|
||||
SQAIList.DefSQAdvancedMethod(engine, &ScriptList::_get, "_get");
|
||||
SQAIList.DefSQAdvancedMethod(engine, &ScriptList::_set, "_set");
|
||||
SQAIList.DefSQAdvancedMethod(engine, &ScriptList::_nexti, "_nexti");
|
||||
SQAIList.DefSQAdvancedMethod(engine, &ScriptList::Valuate, "Valuate");
|
||||
|
||||
SQAIList.PostRegister(engine);
|
||||
}
|
@ -1,27 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_log.hpp"
|
||||
#include "../template/template_log.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptLog, ST_AI>() { return "AILog"; }
|
||||
|
||||
void SQAILog_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptLog, ST_AI> SQAILog("AILog");
|
||||
SQAILog.PreRegister(engine);
|
||||
SQAILog.AddConstructor<void (ScriptLog::*)(), 1>(engine, "x");
|
||||
|
||||
SQAILog.DefSQStaticMethod(engine, &ScriptLog::Info, "Info", 2, "..");
|
||||
SQAILog.DefSQStaticMethod(engine, &ScriptLog::Warning, "Warning", 2, "..");
|
||||
SQAILog.DefSQStaticMethod(engine, &ScriptLog::Error, "Error", 2, "..");
|
||||
|
||||
SQAILog.PostRegister(engine);
|
||||
}
|
@ -1,37 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_map.hpp"
|
||||
#include "../template/template_map.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptMap, ST_AI>() { return "AIMap"; }
|
||||
|
||||
void SQAIMap_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptMap, ST_AI> SQAIMap("AIMap");
|
||||
SQAIMap.PreRegister(engine);
|
||||
SQAIMap.AddConstructor<void (ScriptMap::*)(), 1>(engine, "x");
|
||||
|
||||
SQAIMap.DefSQConst(engine, ScriptMap::TILE_INVALID, "TILE_INVALID");
|
||||
|
||||
SQAIMap.DefSQStaticMethod(engine, &ScriptMap::IsValidTile, "IsValidTile", 2, ".i");
|
||||
SQAIMap.DefSQStaticMethod(engine, &ScriptMap::GetMapSize, "GetMapSize", 1, ".");
|
||||
SQAIMap.DefSQStaticMethod(engine, &ScriptMap::GetMapSizeX, "GetMapSizeX", 1, ".");
|
||||
SQAIMap.DefSQStaticMethod(engine, &ScriptMap::GetMapSizeY, "GetMapSizeY", 1, ".");
|
||||
SQAIMap.DefSQStaticMethod(engine, &ScriptMap::GetTileX, "GetTileX", 2, ".i");
|
||||
SQAIMap.DefSQStaticMethod(engine, &ScriptMap::GetTileY, "GetTileY", 2, ".i");
|
||||
SQAIMap.DefSQStaticMethod(engine, &ScriptMap::GetTileIndex, "GetTileIndex", 3, ".ii");
|
||||
SQAIMap.DefSQStaticMethod(engine, &ScriptMap::DistanceManhattan, "DistanceManhattan", 3, ".ii");
|
||||
SQAIMap.DefSQStaticMethod(engine, &ScriptMap::DistanceMax, "DistanceMax", 3, ".ii");
|
||||
SQAIMap.DefSQStaticMethod(engine, &ScriptMap::DistanceSquare, "DistanceSquare", 3, ".ii");
|
||||
SQAIMap.DefSQStaticMethod(engine, &ScriptMap::DistanceFromEdge, "DistanceFromEdge", 2, ".i");
|
||||
|
||||
SQAIMap.PostRegister(engine);
|
||||
}
|
@ -1,51 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_marine.hpp"
|
||||
#include "../template/template_marine.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptMarine, ST_AI>() { return "AIMarine"; }
|
||||
|
||||
void SQAIMarine_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptMarine, ST_AI> SQAIMarine("AIMarine");
|
||||
SQAIMarine.PreRegister(engine);
|
||||
SQAIMarine.AddConstructor<void (ScriptMarine::*)(), 1>(engine, "x");
|
||||
|
||||
SQAIMarine.DefSQConst(engine, ScriptMarine::ERR_MARINE_BASE, "ERR_MARINE_BASE");
|
||||
SQAIMarine.DefSQConst(engine, ScriptMarine::ERR_MARINE_MUST_BE_BUILT_ON_WATER, "ERR_MARINE_MUST_BE_BUILT_ON_WATER");
|
||||
SQAIMarine.DefSQConst(engine, ScriptMarine::BT_DOCK, "BT_DOCK");
|
||||
SQAIMarine.DefSQConst(engine, ScriptMarine::BT_DEPOT, "BT_DEPOT");
|
||||
SQAIMarine.DefSQConst(engine, ScriptMarine::BT_BUOY, "BT_BUOY");
|
||||
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_MUST_BE_BUILT_ON_WATER, ScriptMarine::ERR_MARINE_MUST_BE_BUILT_ON_WATER);
|
||||
|
||||
ScriptError::RegisterErrorMapString(ScriptMarine::ERR_MARINE_MUST_BE_BUILT_ON_WATER, "ERR_MARINE_MUST_BE_BUILT_ON_WATER");
|
||||
|
||||
SQAIMarine.DefSQStaticMethod(engine, &ScriptMarine::IsWaterDepotTile, "IsWaterDepotTile", 2, ".i");
|
||||
SQAIMarine.DefSQStaticMethod(engine, &ScriptMarine::IsDockTile, "IsDockTile", 2, ".i");
|
||||
SQAIMarine.DefSQStaticMethod(engine, &ScriptMarine::IsBuoyTile, "IsBuoyTile", 2, ".i");
|
||||
SQAIMarine.DefSQStaticMethod(engine, &ScriptMarine::IsLockTile, "IsLockTile", 2, ".i");
|
||||
SQAIMarine.DefSQStaticMethod(engine, &ScriptMarine::IsCanalTile, "IsCanalTile", 2, ".i");
|
||||
SQAIMarine.DefSQStaticMethod(engine, &ScriptMarine::AreWaterTilesConnected, "AreWaterTilesConnected", 3, ".ii");
|
||||
SQAIMarine.DefSQStaticMethod(engine, &ScriptMarine::BuildWaterDepot, "BuildWaterDepot", 3, ".ii");
|
||||
SQAIMarine.DefSQStaticMethod(engine, &ScriptMarine::BuildDock, "BuildDock", 3, ".ii");
|
||||
SQAIMarine.DefSQStaticMethod(engine, &ScriptMarine::BuildBuoy, "BuildBuoy", 2, ".i");
|
||||
SQAIMarine.DefSQStaticMethod(engine, &ScriptMarine::BuildLock, "BuildLock", 2, ".i");
|
||||
SQAIMarine.DefSQStaticMethod(engine, &ScriptMarine::BuildCanal, "BuildCanal", 2, ".i");
|
||||
SQAIMarine.DefSQStaticMethod(engine, &ScriptMarine::RemoveWaterDepot, "RemoveWaterDepot", 2, ".i");
|
||||
SQAIMarine.DefSQStaticMethod(engine, &ScriptMarine::RemoveDock, "RemoveDock", 2, ".i");
|
||||
SQAIMarine.DefSQStaticMethod(engine, &ScriptMarine::RemoveBuoy, "RemoveBuoy", 2, ".i");
|
||||
SQAIMarine.DefSQStaticMethod(engine, &ScriptMarine::RemoveLock, "RemoveLock", 2, ".i");
|
||||
SQAIMarine.DefSQStaticMethod(engine, &ScriptMarine::RemoveCanal, "RemoveCanal", 2, ".i");
|
||||
SQAIMarine.DefSQStaticMethod(engine, &ScriptMarine::GetBuildCost, "GetBuildCost", 2, ".i");
|
||||
|
||||
SQAIMarine.PostRegister(engine);
|
||||
}
|
@ -1,116 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_order.hpp"
|
||||
#include "../template/template_order.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptOrder, ST_AI>() { return "AIOrder"; }
|
||||
|
||||
void SQAIOrder_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptOrder, ST_AI> SQAIOrder("AIOrder");
|
||||
SQAIOrder.PreRegister(engine);
|
||||
SQAIOrder.AddConstructor<void (ScriptOrder::*)(), 1>(engine, "x");
|
||||
|
||||
SQAIOrder.DefSQConst(engine, ScriptOrder::ERR_ORDER_BASE, "ERR_ORDER_BASE");
|
||||
SQAIOrder.DefSQConst(engine, ScriptOrder::ERR_ORDER_TOO_MANY, "ERR_ORDER_TOO_MANY");
|
||||
SQAIOrder.DefSQConst(engine, ScriptOrder::ERR_ORDER_TOO_FAR_AWAY_FROM_PREVIOUS_DESTINATION, "ERR_ORDER_TOO_FAR_AWAY_FROM_PREVIOUS_DESTINATION");
|
||||
SQAIOrder.DefSQConst(engine, ScriptOrder::ERR_ORDER_AIRCRAFT_NOT_ENOUGH_RANGE, "ERR_ORDER_AIRCRAFT_NOT_ENOUGH_RANGE");
|
||||
SQAIOrder.DefSQConst(engine, ScriptOrder::OF_NONE, "OF_NONE");
|
||||
SQAIOrder.DefSQConst(engine, ScriptOrder::OF_NON_STOP_INTERMEDIATE, "OF_NON_STOP_INTERMEDIATE");
|
||||
SQAIOrder.DefSQConst(engine, ScriptOrder::OF_NON_STOP_DESTINATION, "OF_NON_STOP_DESTINATION");
|
||||
SQAIOrder.DefSQConst(engine, ScriptOrder::OF_UNLOAD, "OF_UNLOAD");
|
||||
SQAIOrder.DefSQConst(engine, ScriptOrder::OF_TRANSFER, "OF_TRANSFER");
|
||||
SQAIOrder.DefSQConst(engine, ScriptOrder::OF_NO_UNLOAD, "OF_NO_UNLOAD");
|
||||
SQAIOrder.DefSQConst(engine, ScriptOrder::OF_FULL_LOAD, "OF_FULL_LOAD");
|
||||
SQAIOrder.DefSQConst(engine, ScriptOrder::OF_FULL_LOAD_ANY, "OF_FULL_LOAD_ANY");
|
||||
SQAIOrder.DefSQConst(engine, ScriptOrder::OF_NO_LOAD, "OF_NO_LOAD");
|
||||
SQAIOrder.DefSQConst(engine, ScriptOrder::OF_SERVICE_IF_NEEDED, "OF_SERVICE_IF_NEEDED");
|
||||
SQAIOrder.DefSQConst(engine, ScriptOrder::OF_STOP_IN_DEPOT, "OF_STOP_IN_DEPOT");
|
||||
SQAIOrder.DefSQConst(engine, ScriptOrder::OF_GOTO_NEAREST_DEPOT, "OF_GOTO_NEAREST_DEPOT");
|
||||
SQAIOrder.DefSQConst(engine, ScriptOrder::OF_NON_STOP_FLAGS, "OF_NON_STOP_FLAGS");
|
||||
SQAIOrder.DefSQConst(engine, ScriptOrder::OF_UNLOAD_FLAGS, "OF_UNLOAD_FLAGS");
|
||||
SQAIOrder.DefSQConst(engine, ScriptOrder::OF_LOAD_FLAGS, "OF_LOAD_FLAGS");
|
||||
SQAIOrder.DefSQConst(engine, ScriptOrder::OF_DEPOT_FLAGS, "OF_DEPOT_FLAGS");
|
||||
SQAIOrder.DefSQConst(engine, ScriptOrder::OF_INVALID, "OF_INVALID");
|
||||
SQAIOrder.DefSQConst(engine, ScriptOrder::OC_LOAD_PERCENTAGE, "OC_LOAD_PERCENTAGE");
|
||||
SQAIOrder.DefSQConst(engine, ScriptOrder::OC_RELIABILITY, "OC_RELIABILITY");
|
||||
SQAIOrder.DefSQConst(engine, ScriptOrder::OC_MAX_RELIABILITY, "OC_MAX_RELIABILITY");
|
||||
SQAIOrder.DefSQConst(engine, ScriptOrder::OC_MAX_SPEED, "OC_MAX_SPEED");
|
||||
SQAIOrder.DefSQConst(engine, ScriptOrder::OC_AGE, "OC_AGE");
|
||||
SQAIOrder.DefSQConst(engine, ScriptOrder::OC_REQUIRES_SERVICE, "OC_REQUIRES_SERVICE");
|
||||
SQAIOrder.DefSQConst(engine, ScriptOrder::OC_UNCONDITIONALLY, "OC_UNCONDITIONALLY");
|
||||
SQAIOrder.DefSQConst(engine, ScriptOrder::OC_REMAINING_LIFETIME, "OC_REMAINING_LIFETIME");
|
||||
SQAIOrder.DefSQConst(engine, ScriptOrder::OC_INVALID, "OC_INVALID");
|
||||
SQAIOrder.DefSQConst(engine, ScriptOrder::CF_EQUALS, "CF_EQUALS");
|
||||
SQAIOrder.DefSQConst(engine, ScriptOrder::CF_NOT_EQUALS, "CF_NOT_EQUALS");
|
||||
SQAIOrder.DefSQConst(engine, ScriptOrder::CF_LESS_THAN, "CF_LESS_THAN");
|
||||
SQAIOrder.DefSQConst(engine, ScriptOrder::CF_LESS_EQUALS, "CF_LESS_EQUALS");
|
||||
SQAIOrder.DefSQConst(engine, ScriptOrder::CF_MORE_THAN, "CF_MORE_THAN");
|
||||
SQAIOrder.DefSQConst(engine, ScriptOrder::CF_MORE_EQUALS, "CF_MORE_EQUALS");
|
||||
SQAIOrder.DefSQConst(engine, ScriptOrder::CF_IS_TRUE, "CF_IS_TRUE");
|
||||
SQAIOrder.DefSQConst(engine, ScriptOrder::CF_IS_FALSE, "CF_IS_FALSE");
|
||||
SQAIOrder.DefSQConst(engine, ScriptOrder::CF_INVALID, "CF_INVALID");
|
||||
SQAIOrder.DefSQConst(engine, ScriptOrder::ORDER_CURRENT, "ORDER_CURRENT");
|
||||
SQAIOrder.DefSQConst(engine, ScriptOrder::ORDER_INVALID, "ORDER_INVALID");
|
||||
SQAIOrder.DefSQConst(engine, ScriptOrder::STOPLOCATION_NEAR, "STOPLOCATION_NEAR");
|
||||
SQAIOrder.DefSQConst(engine, ScriptOrder::STOPLOCATION_MIDDLE, "STOPLOCATION_MIDDLE");
|
||||
SQAIOrder.DefSQConst(engine, ScriptOrder::STOPLOCATION_FAR, "STOPLOCATION_FAR");
|
||||
SQAIOrder.DefSQConst(engine, ScriptOrder::STOPLOCATION_INVALID, "STOPLOCATION_INVALID");
|
||||
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_NO_MORE_SPACE_FOR_ORDERS, ScriptOrder::ERR_ORDER_TOO_MANY);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_TOO_FAR_FROM_PREVIOUS_DESTINATION, ScriptOrder::ERR_ORDER_TOO_FAR_AWAY_FROM_PREVIOUS_DESTINATION);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_AIRCRAFT_NOT_ENOUGH_RANGE, ScriptOrder::ERR_ORDER_AIRCRAFT_NOT_ENOUGH_RANGE);
|
||||
|
||||
ScriptError::RegisterErrorMapString(ScriptOrder::ERR_ORDER_TOO_MANY, "ERR_ORDER_TOO_MANY");
|
||||
ScriptError::RegisterErrorMapString(ScriptOrder::ERR_ORDER_TOO_FAR_AWAY_FROM_PREVIOUS_DESTINATION, "ERR_ORDER_TOO_FAR_AWAY_FROM_PREVIOUS_DESTINATION");
|
||||
ScriptError::RegisterErrorMapString(ScriptOrder::ERR_ORDER_AIRCRAFT_NOT_ENOUGH_RANGE, "ERR_ORDER_AIRCRAFT_NOT_ENOUGH_RANGE");
|
||||
|
||||
SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::IsValidVehicleOrder, "IsValidVehicleOrder", 3, ".ii");
|
||||
SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::IsGotoStationOrder, "IsGotoStationOrder", 3, ".ii");
|
||||
SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::IsGotoDepotOrder, "IsGotoDepotOrder", 3, ".ii");
|
||||
SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::IsGotoWaypointOrder, "IsGotoWaypointOrder", 3, ".ii");
|
||||
SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::IsConditionalOrder, "IsConditionalOrder", 3, ".ii");
|
||||
SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::IsVoidOrder, "IsVoidOrder", 3, ".ii");
|
||||
SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::IsRefitOrder, "IsRefitOrder", 3, ".ii");
|
||||
SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::IsCurrentOrderPartOfOrderList, "IsCurrentOrderPartOfOrderList", 2, ".i");
|
||||
SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::ResolveOrderPosition, "ResolveOrderPosition", 3, ".ii");
|
||||
SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::AreOrderFlagsValid, "AreOrderFlagsValid", 3, ".ii");
|
||||
SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::IsValidConditionalOrder, "IsValidConditionalOrder", 3, ".ii");
|
||||
SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::GetOrderCount, "GetOrderCount", 2, ".i");
|
||||
SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::GetOrderDestination, "GetOrderDestination", 3, ".ii");
|
||||
SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::GetOrderFlags, "GetOrderFlags", 3, ".ii");
|
||||
SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::GetOrderJumpTo, "GetOrderJumpTo", 3, ".ii");
|
||||
SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::GetOrderCondition, "GetOrderCondition", 3, ".ii");
|
||||
SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::GetOrderCompareFunction, "GetOrderCompareFunction", 3, ".ii");
|
||||
SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::GetOrderCompareValue, "GetOrderCompareValue", 3, ".ii");
|
||||
SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::GetStopLocation, "GetStopLocation", 3, ".ii");
|
||||
SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::GetOrderRefit, "GetOrderRefit", 3, ".ii");
|
||||
SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::SetOrderJumpTo, "SetOrderJumpTo", 4, ".iii");
|
||||
SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::SetOrderCondition, "SetOrderCondition", 4, ".iii");
|
||||
SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::SetOrderCompareFunction, "SetOrderCompareFunction", 4, ".iii");
|
||||
SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::SetOrderCompareValue, "SetOrderCompareValue", 4, ".iii");
|
||||
SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::SetStopLocation, "SetStopLocation", 4, ".iii");
|
||||
SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::SetOrderRefit, "SetOrderRefit", 4, ".iii");
|
||||
SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::AppendOrder, "AppendOrder", 4, ".iii");
|
||||
SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::AppendConditionalOrder, "AppendConditionalOrder", 3, ".ii");
|
||||
SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::InsertOrder, "InsertOrder", 5, ".iiii");
|
||||
SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::InsertConditionalOrder, "InsertConditionalOrder", 4, ".iii");
|
||||
SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::RemoveOrder, "RemoveOrder", 3, ".ii");
|
||||
SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::SetOrderFlags, "SetOrderFlags", 4, ".iii");
|
||||
SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::MoveOrder, "MoveOrder", 4, ".iii");
|
||||
SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::SkipToOrder, "SkipToOrder", 3, ".ii");
|
||||
SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::CopyOrders, "CopyOrders", 3, ".ii");
|
||||
SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::ShareOrders, "ShareOrders", 3, ".ii");
|
||||
SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::UnshareOrders, "UnshareOrders", 2, ".i");
|
||||
SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::GetOrderDistance, "GetOrderDistance", 4, ".iii");
|
||||
|
||||
SQAIOrder.PostRegister(engine);
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_priorityqueue.hpp"
|
||||
#include "../template/template_priorityqueue.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptPriorityQueue, ST_AI>() { return "AIPriorityQueue"; }
|
||||
|
||||
void SQAIPriorityQueue_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptPriorityQueue, ST_AI> SQAIPriorityQueue("AIPriorityQueue");
|
||||
SQAIPriorityQueue.PreRegister(engine);
|
||||
SQAIPriorityQueue.AddConstructor<void (ScriptPriorityQueue::*)(), 1>(engine, "x");
|
||||
|
||||
SQAIPriorityQueue.DefSQAdvancedMethod(engine, &ScriptPriorityQueue::Insert, "Insert");
|
||||
SQAIPriorityQueue.DefSQAdvancedMethod(engine, &ScriptPriorityQueue::Pop, "Pop");
|
||||
SQAIPriorityQueue.DefSQAdvancedMethod(engine, &ScriptPriorityQueue::Peek, "Peek");
|
||||
SQAIPriorityQueue.DefSQAdvancedMethod(engine, &ScriptPriorityQueue::Exists, "Exists");
|
||||
SQAIPriorityQueue.DefSQAdvancedMethod(engine, &ScriptPriorityQueue::Clear, "Clear");
|
||||
SQAIPriorityQueue.DefSQMethod(engine, &ScriptPriorityQueue::IsEmpty, "IsEmpty", 1, "x");
|
||||
SQAIPriorityQueue.DefSQMethod(engine, &ScriptPriorityQueue::Count, "Count", 1, "x");
|
||||
|
||||
SQAIPriorityQueue.PostRegister(engine);
|
||||
}
|
@ -1,98 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_rail.hpp"
|
||||
#include "../template/template_rail.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptRail, ST_AI>() { return "AIRail"; }
|
||||
|
||||
void SQAIRail_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptRail, ST_AI> SQAIRail("AIRail");
|
||||
SQAIRail.PreRegister(engine);
|
||||
SQAIRail.AddConstructor<void (ScriptRail::*)(), 1>(engine, "x");
|
||||
|
||||
SQAIRail.DefSQConst(engine, ScriptRail::ERR_RAIL_BASE, "ERR_RAIL_BASE");
|
||||
SQAIRail.DefSQConst(engine, ScriptRail::ERR_CROSSING_ON_ONEWAY_ROAD, "ERR_CROSSING_ON_ONEWAY_ROAD");
|
||||
SQAIRail.DefSQConst(engine, ScriptRail::ERR_UNSUITABLE_TRACK, "ERR_UNSUITABLE_TRACK");
|
||||
SQAIRail.DefSQConst(engine, ScriptRail::ERR_RAILTYPE_DISALLOWS_CROSSING, "ERR_RAILTYPE_DISALLOWS_CROSSING");
|
||||
SQAIRail.DefSQConst(engine, ScriptRail::RAILTYPE_INVALID, "RAILTYPE_INVALID");
|
||||
SQAIRail.DefSQConst(engine, ScriptRail::RAILTRACK_NE_SW, "RAILTRACK_NE_SW");
|
||||
SQAIRail.DefSQConst(engine, ScriptRail::RAILTRACK_NW_SE, "RAILTRACK_NW_SE");
|
||||
SQAIRail.DefSQConst(engine, ScriptRail::RAILTRACK_NW_NE, "RAILTRACK_NW_NE");
|
||||
SQAIRail.DefSQConst(engine, ScriptRail::RAILTRACK_SW_SE, "RAILTRACK_SW_SE");
|
||||
SQAIRail.DefSQConst(engine, ScriptRail::RAILTRACK_NW_SW, "RAILTRACK_NW_SW");
|
||||
SQAIRail.DefSQConst(engine, ScriptRail::RAILTRACK_NE_SE, "RAILTRACK_NE_SE");
|
||||
SQAIRail.DefSQConst(engine, ScriptRail::RAILTRACK_INVALID, "RAILTRACK_INVALID");
|
||||
SQAIRail.DefSQConst(engine, ScriptRail::SIGNALTYPE_NORMAL, "SIGNALTYPE_NORMAL");
|
||||
SQAIRail.DefSQConst(engine, ScriptRail::SIGNALTYPE_ENTRY, "SIGNALTYPE_ENTRY");
|
||||
SQAIRail.DefSQConst(engine, ScriptRail::SIGNALTYPE_EXIT, "SIGNALTYPE_EXIT");
|
||||
SQAIRail.DefSQConst(engine, ScriptRail::SIGNALTYPE_COMBO, "SIGNALTYPE_COMBO");
|
||||
SQAIRail.DefSQConst(engine, ScriptRail::SIGNALTYPE_PBS, "SIGNALTYPE_PBS");
|
||||
SQAIRail.DefSQConst(engine, ScriptRail::SIGNALTYPE_PBS_ONEWAY, "SIGNALTYPE_PBS_ONEWAY");
|
||||
SQAIRail.DefSQConst(engine, ScriptRail::SIGNALTYPE_TWOWAY, "SIGNALTYPE_TWOWAY");
|
||||
SQAIRail.DefSQConst(engine, ScriptRail::SIGNALTYPE_NORMAL_TWOWAY, "SIGNALTYPE_NORMAL_TWOWAY");
|
||||
SQAIRail.DefSQConst(engine, ScriptRail::SIGNALTYPE_ENTRY_TWOWAY, "SIGNALTYPE_ENTRY_TWOWAY");
|
||||
SQAIRail.DefSQConst(engine, ScriptRail::SIGNALTYPE_EXIT_TWOWAY, "SIGNALTYPE_EXIT_TWOWAY");
|
||||
SQAIRail.DefSQConst(engine, ScriptRail::SIGNALTYPE_COMBO_TWOWAY, "SIGNALTYPE_COMBO_TWOWAY");
|
||||
SQAIRail.DefSQConst(engine, ScriptRail::SIGNALTYPE_NONE, "SIGNALTYPE_NONE");
|
||||
SQAIRail.DefSQConst(engine, ScriptRail::BT_TRACK, "BT_TRACK");
|
||||
SQAIRail.DefSQConst(engine, ScriptRail::BT_SIGNAL, "BT_SIGNAL");
|
||||
SQAIRail.DefSQConst(engine, ScriptRail::BT_DEPOT, "BT_DEPOT");
|
||||
SQAIRail.DefSQConst(engine, ScriptRail::BT_STATION, "BT_STATION");
|
||||
SQAIRail.DefSQConst(engine, ScriptRail::BT_WAYPOINT, "BT_WAYPOINT");
|
||||
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_CROSSING_ON_ONEWAY_ROAD, ScriptRail::ERR_CROSSING_ON_ONEWAY_ROAD);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_NO_SUITABLE_RAILROAD_TRACK, ScriptRail::ERR_UNSUITABLE_TRACK);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_THERE_IS_NO_RAILROAD_TRACK, ScriptRail::ERR_UNSUITABLE_TRACK);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_THERE_ARE_NO_SIGNALS, ScriptRail::ERR_UNSUITABLE_TRACK);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_THERE_IS_NO_STATION, ScriptRail::ERR_UNSUITABLE_TRACK);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_CROSSING_DISALLOWED_RAIL, ScriptRail::ERR_RAILTYPE_DISALLOWS_CROSSING);
|
||||
|
||||
ScriptError::RegisterErrorMapString(ScriptRail::ERR_CROSSING_ON_ONEWAY_ROAD, "ERR_CROSSING_ON_ONEWAY_ROAD");
|
||||
ScriptError::RegisterErrorMapString(ScriptRail::ERR_UNSUITABLE_TRACK, "ERR_UNSUITABLE_TRACK");
|
||||
ScriptError::RegisterErrorMapString(ScriptRail::ERR_RAILTYPE_DISALLOWS_CROSSING, "ERR_RAILTYPE_DISALLOWS_CROSSING");
|
||||
|
||||
SQAIRail.DefSQStaticMethod(engine, &ScriptRail::GetName, "GetName", 2, ".i");
|
||||
SQAIRail.DefSQStaticMethod(engine, &ScriptRail::IsRailTile, "IsRailTile", 2, ".i");
|
||||
SQAIRail.DefSQStaticMethod(engine, &ScriptRail::IsLevelCrossingTile, "IsLevelCrossingTile", 2, ".i");
|
||||
SQAIRail.DefSQStaticMethod(engine, &ScriptRail::IsRailDepotTile, "IsRailDepotTile", 2, ".i");
|
||||
SQAIRail.DefSQStaticMethod(engine, &ScriptRail::IsRailStationTile, "IsRailStationTile", 2, ".i");
|
||||
SQAIRail.DefSQStaticMethod(engine, &ScriptRail::IsRailWaypointTile, "IsRailWaypointTile", 2, ".i");
|
||||
SQAIRail.DefSQStaticMethod(engine, &ScriptRail::IsRailTypeAvailable, "IsRailTypeAvailable", 2, ".i");
|
||||
SQAIRail.DefSQStaticMethod(engine, &ScriptRail::GetCurrentRailType, "GetCurrentRailType", 1, ".");
|
||||
SQAIRail.DefSQStaticMethod(engine, &ScriptRail::SetCurrentRailType, "SetCurrentRailType", 2, ".i");
|
||||
SQAIRail.DefSQStaticMethod(engine, &ScriptRail::TrainCanRunOnRail, "TrainCanRunOnRail", 3, ".ii");
|
||||
SQAIRail.DefSQStaticMethod(engine, &ScriptRail::TrainHasPowerOnRail, "TrainHasPowerOnRail", 3, ".ii");
|
||||
SQAIRail.DefSQStaticMethod(engine, &ScriptRail::GetRailType, "GetRailType", 2, ".i");
|
||||
SQAIRail.DefSQStaticMethod(engine, &ScriptRail::ConvertRailType, "ConvertRailType", 4, ".iii");
|
||||
SQAIRail.DefSQStaticMethod(engine, &ScriptRail::GetRailDepotFrontTile, "GetRailDepotFrontTile", 2, ".i");
|
||||
SQAIRail.DefSQStaticMethod(engine, &ScriptRail::GetRailStationDirection, "GetRailStationDirection", 2, ".i");
|
||||
SQAIRail.DefSQStaticMethod(engine, &ScriptRail::BuildRailDepot, "BuildRailDepot", 3, ".ii");
|
||||
SQAIRail.DefSQStaticMethod(engine, &ScriptRail::BuildRailStation, "BuildRailStation", 6, ".iiiii");
|
||||
SQAIRail.DefSQStaticMethod(engine, &ScriptRail::BuildNewGRFRailStation, "BuildNewGRFRailStation", 11, ".iiiiiiiiib");
|
||||
SQAIRail.DefSQStaticMethod(engine, &ScriptRail::BuildRailWaypoint, "BuildRailWaypoint", 2, ".i");
|
||||
SQAIRail.DefSQStaticMethod(engine, &ScriptRail::RemoveRailWaypointTileRectangle, "RemoveRailWaypointTileRectangle", 4, ".iib");
|
||||
SQAIRail.DefSQStaticMethod(engine, &ScriptRail::RemoveRailStationTileRectangle, "RemoveRailStationTileRectangle", 4, ".iib");
|
||||
SQAIRail.DefSQStaticMethod(engine, &ScriptRail::GetRailTracks, "GetRailTracks", 2, ".i");
|
||||
SQAIRail.DefSQStaticMethod(engine, &ScriptRail::BuildRailTrack, "BuildRailTrack", 3, ".ii");
|
||||
SQAIRail.DefSQStaticMethod(engine, &ScriptRail::RemoveRailTrack, "RemoveRailTrack", 3, ".ii");
|
||||
SQAIRail.DefSQStaticMethod(engine, &ScriptRail::AreTilesConnected, "AreTilesConnected", 4, ".iii");
|
||||
SQAIRail.DefSQStaticMethod(engine, &ScriptRail::BuildRail, "BuildRail", 4, ".iii");
|
||||
SQAIRail.DefSQStaticMethod(engine, &ScriptRail::RemoveRail, "RemoveRail", 4, ".iii");
|
||||
SQAIRail.DefSQStaticMethod(engine, &ScriptRail::GetSignalType, "GetSignalType", 3, ".ii");
|
||||
SQAIRail.DefSQStaticMethod(engine, &ScriptRail::BuildSignal, "BuildSignal", 4, ".iii");
|
||||
SQAIRail.DefSQStaticMethod(engine, &ScriptRail::RemoveSignal, "RemoveSignal", 3, ".ii");
|
||||
SQAIRail.DefSQStaticMethod(engine, &ScriptRail::GetBuildCost, "GetBuildCost", 3, ".ii");
|
||||
SQAIRail.DefSQStaticMethod(engine, &ScriptRail::GetMaxSpeed, "GetMaxSpeed", 2, ".i");
|
||||
SQAIRail.DefSQStaticMethod(engine, &ScriptRail::GetMaintenanceCostFactor, "GetMaintenanceCostFactor", 2, ".i");
|
||||
|
||||
SQAIRail.PostRegister(engine);
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_railtypelist.hpp"
|
||||
#include "../template/template_railtypelist.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptRailTypeList, ST_AI>() { return "AIRailTypeList"; }
|
||||
|
||||
void SQAIRailTypeList_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptRailTypeList, ST_AI> SQAIRailTypeList("AIRailTypeList");
|
||||
SQAIRailTypeList.PreRegister(engine, "AIList");
|
||||
SQAIRailTypeList.AddConstructor<void (ScriptRailTypeList::*)(), 1>(engine, "x");
|
||||
|
||||
SQAIRailTypeList.PostRegister(engine);
|
||||
}
|
@ -1,93 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_road.hpp"
|
||||
#include "../template/template_road.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptRoad, ST_AI>() { return "AIRoad"; }
|
||||
|
||||
void SQAIRoad_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptRoad, ST_AI> SQAIRoad("AIRoad");
|
||||
SQAIRoad.PreRegister(engine);
|
||||
SQAIRoad.AddConstructor<void (ScriptRoad::*)(), 1>(engine, "x");
|
||||
|
||||
SQAIRoad.DefSQConst(engine, ScriptRoad::ERR_ROAD_BASE, "ERR_ROAD_BASE");
|
||||
SQAIRoad.DefSQConst(engine, ScriptRoad::ERR_ROAD_WORKS_IN_PROGRESS, "ERR_ROAD_WORKS_IN_PROGRESS");
|
||||
SQAIRoad.DefSQConst(engine, ScriptRoad::ERR_ROAD_DRIVE_THROUGH_WRONG_DIRECTION, "ERR_ROAD_DRIVE_THROUGH_WRONG_DIRECTION");
|
||||
SQAIRoad.DefSQConst(engine, ScriptRoad::ERR_ROAD_CANNOT_BUILD_ON_TOWN_ROAD, "ERR_ROAD_CANNOT_BUILD_ON_TOWN_ROAD");
|
||||
SQAIRoad.DefSQConst(engine, ScriptRoad::ERR_ROAD_ONE_WAY_ROADS_CANNOT_HAVE_JUNCTIONS, "ERR_ROAD_ONE_WAY_ROADS_CANNOT_HAVE_JUNCTIONS");
|
||||
SQAIRoad.DefSQConst(engine, ScriptRoad::ERR_ROADTYPE_DISALLOWS_CROSSING, "ERR_ROADTYPE_DISALLOWS_CROSSING");
|
||||
SQAIRoad.DefSQConst(engine, ScriptRoad::ERR_UNSUITABLE_ROAD, "ERR_UNSUITABLE_ROAD");
|
||||
SQAIRoad.DefSQConst(engine, ScriptRoad::ROADTYPE_ROAD, "ROADTYPE_ROAD");
|
||||
SQAIRoad.DefSQConst(engine, ScriptRoad::ROADTYPE_TRAM, "ROADTYPE_TRAM");
|
||||
SQAIRoad.DefSQConst(engine, ScriptRoad::ROADTYPE_INVALID, "ROADTYPE_INVALID");
|
||||
SQAIRoad.DefSQConst(engine, ScriptRoad::ROADTRAMTYPES_ROAD, "ROADTRAMTYPES_ROAD");
|
||||
SQAIRoad.DefSQConst(engine, ScriptRoad::ROADTRAMTYPES_TRAM, "ROADTRAMTYPES_TRAM");
|
||||
SQAIRoad.DefSQConst(engine, ScriptRoad::ROADVEHTYPE_BUS, "ROADVEHTYPE_BUS");
|
||||
SQAIRoad.DefSQConst(engine, ScriptRoad::ROADVEHTYPE_TRUCK, "ROADVEHTYPE_TRUCK");
|
||||
SQAIRoad.DefSQConst(engine, ScriptRoad::BT_ROAD, "BT_ROAD");
|
||||
SQAIRoad.DefSQConst(engine, ScriptRoad::BT_DEPOT, "BT_DEPOT");
|
||||
SQAIRoad.DefSQConst(engine, ScriptRoad::BT_BUS_STOP, "BT_BUS_STOP");
|
||||
SQAIRoad.DefSQConst(engine, ScriptRoad::BT_TRUCK_STOP, "BT_TRUCK_STOP");
|
||||
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_ROAD_WORKS_IN_PROGRESS, ScriptRoad::ERR_ROAD_WORKS_IN_PROGRESS);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_DRIVE_THROUGH_DIRECTION, ScriptRoad::ERR_ROAD_DRIVE_THROUGH_WRONG_DIRECTION);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_DRIVE_THROUGH_ON_TOWN_ROAD, ScriptRoad::ERR_ROAD_CANNOT_BUILD_ON_TOWN_ROAD);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_ONEWAY_ROADS_CAN_T_HAVE_JUNCTION, ScriptRoad::ERR_ROAD_ONE_WAY_ROADS_CANNOT_HAVE_JUNCTIONS);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_CROSSING_DISALLOWED_ROAD, ScriptRoad::ERR_ROADTYPE_DISALLOWS_CROSSING);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_NO_SUITABLE_ROAD, ScriptRoad::ERR_UNSUITABLE_ROAD);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_NO_SUITABLE_TRAMWAY, ScriptRoad::ERR_UNSUITABLE_ROAD);
|
||||
|
||||
ScriptError::RegisterErrorMapString(ScriptRoad::ERR_ROAD_WORKS_IN_PROGRESS, "ERR_ROAD_WORKS_IN_PROGRESS");
|
||||
ScriptError::RegisterErrorMapString(ScriptRoad::ERR_ROAD_DRIVE_THROUGH_WRONG_DIRECTION, "ERR_ROAD_DRIVE_THROUGH_WRONG_DIRECTION");
|
||||
ScriptError::RegisterErrorMapString(ScriptRoad::ERR_ROAD_CANNOT_BUILD_ON_TOWN_ROAD, "ERR_ROAD_CANNOT_BUILD_ON_TOWN_ROAD");
|
||||
ScriptError::RegisterErrorMapString(ScriptRoad::ERR_ROAD_ONE_WAY_ROADS_CANNOT_HAVE_JUNCTIONS, "ERR_ROAD_ONE_WAY_ROADS_CANNOT_HAVE_JUNCTIONS");
|
||||
ScriptError::RegisterErrorMapString(ScriptRoad::ERR_ROADTYPE_DISALLOWS_CROSSING, "ERR_ROADTYPE_DISALLOWS_CROSSING");
|
||||
ScriptError::RegisterErrorMapString(ScriptRoad::ERR_UNSUITABLE_ROAD, "ERR_UNSUITABLE_ROAD");
|
||||
|
||||
SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::GetName, "GetName", 2, ".i");
|
||||
SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::GetRoadVehicleTypeForCargo, "GetRoadVehicleTypeForCargo", 2, ".i");
|
||||
SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::IsRoadTile, "IsRoadTile", 2, ".i");
|
||||
SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::IsRoadDepotTile, "IsRoadDepotTile", 2, ".i");
|
||||
SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::IsRoadStationTile, "IsRoadStationTile", 2, ".i");
|
||||
SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::IsDriveThroughRoadStationTile, "IsDriveThroughRoadStationTile", 2, ".i");
|
||||
SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::IsRoadTypeAvailable, "IsRoadTypeAvailable", 2, ".i");
|
||||
SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::GetCurrentRoadType, "GetCurrentRoadType", 1, ".");
|
||||
SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::SetCurrentRoadType, "SetCurrentRoadType", 2, ".i");
|
||||
SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::RoadVehCanRunOnRoad, "RoadVehCanRunOnRoad", 3, ".ii");
|
||||
SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::RoadVehHasPowerOnRoad, "RoadVehHasPowerOnRoad", 3, ".ii");
|
||||
SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::ConvertRoadType, "ConvertRoadType", 4, ".iii");
|
||||
SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::HasRoadType, "HasRoadType", 3, ".ii");
|
||||
SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::AreRoadTilesConnected, "AreRoadTilesConnected", 3, ".ii");
|
||||
SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::CanBuildConnectedRoadParts, "CanBuildConnectedRoadParts", 5, ".iaii");
|
||||
SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::CanBuildConnectedRoadPartsHere, "CanBuildConnectedRoadPartsHere", 4, ".iii");
|
||||
SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::GetNeighbourRoadCount, "GetNeighbourRoadCount", 2, ".i");
|
||||
SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::GetRoadDepotFrontTile, "GetRoadDepotFrontTile", 2, ".i");
|
||||
SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::GetRoadStationFrontTile, "GetRoadStationFrontTile", 2, ".i");
|
||||
SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::GetDriveThroughBackTile, "GetDriveThroughBackTile", 2, ".i");
|
||||
SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::BuildRoad, "BuildRoad", 3, ".ii");
|
||||
SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::BuildOneWayRoad, "BuildOneWayRoad", 3, ".ii");
|
||||
SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::BuildRoadFull, "BuildRoadFull", 3, ".ii");
|
||||
SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::BuildOneWayRoadFull, "BuildOneWayRoadFull", 3, ".ii");
|
||||
SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::BuildRoadDepot, "BuildRoadDepot", 3, ".ii");
|
||||
SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::BuildRoadStation, "BuildRoadStation", 5, ".iiii");
|
||||
SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::BuildDriveThroughRoadStation, "BuildDriveThroughRoadStation", 5, ".iiii");
|
||||
SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::RemoveRoad, "RemoveRoad", 3, ".ii");
|
||||
SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::RemoveRoadFull, "RemoveRoadFull", 3, ".ii");
|
||||
SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::RemoveRoadDepot, "RemoveRoadDepot", 2, ".i");
|
||||
SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::RemoveRoadStation, "RemoveRoadStation", 2, ".i");
|
||||
SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::GetBuildCost, "GetBuildCost", 3, ".ii");
|
||||
SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::GetRoadTramType, "GetRoadTramType", 2, ".i");
|
||||
SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::GetMaxSpeed, "GetMaxSpeed", 2, ".i");
|
||||
SQAIRoad.DefSQStaticMethod(engine, &ScriptRoad::GetMaintenanceCostFactor, "GetMaintenanceCostFactor", 2, ".i");
|
||||
|
||||
SQAIRoad.PostRegister(engine);
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_roadtypelist.hpp"
|
||||
#include "../template/template_roadtypelist.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptRoadTypeList, ST_AI>() { return "AIRoadTypeList"; }
|
||||
|
||||
void SQAIRoadTypeList_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptRoadTypeList, ST_AI> SQAIRoadTypeList("AIRoadTypeList");
|
||||
SQAIRoadTypeList.PreRegister(engine, "AIList");
|
||||
SQAIRoadTypeList.AddConstructor<void (ScriptRoadTypeList::*)(ScriptRoad::RoadTramTypes rtts), 2>(engine, "xi");
|
||||
|
||||
SQAIRoadTypeList.PostRegister(engine);
|
||||
}
|
@ -1,37 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_sign.hpp"
|
||||
#include "../template/template_sign.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptSign, ST_AI>() { return "AISign"; }
|
||||
|
||||
void SQAISign_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptSign, ST_AI> SQAISign("AISign");
|
||||
SQAISign.PreRegister(engine);
|
||||
SQAISign.AddConstructor<void (ScriptSign::*)(), 1>(engine, "x");
|
||||
|
||||
SQAISign.DefSQConst(engine, ScriptSign::ERR_SIGN_BASE, "ERR_SIGN_BASE");
|
||||
SQAISign.DefSQConst(engine, ScriptSign::ERR_SIGN_TOO_MANY_SIGNS, "ERR_SIGN_TOO_MANY_SIGNS");
|
||||
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_TOO_MANY_SIGNS, ScriptSign::ERR_SIGN_TOO_MANY_SIGNS);
|
||||
|
||||
ScriptError::RegisterErrorMapString(ScriptSign::ERR_SIGN_TOO_MANY_SIGNS, "ERR_SIGN_TOO_MANY_SIGNS");
|
||||
|
||||
SQAISign.DefSQStaticMethod(engine, &ScriptSign::IsValidSign, "IsValidSign", 2, ".i");
|
||||
SQAISign.DefSQStaticMethod(engine, &ScriptSign::SetName, "SetName", 3, ".i.");
|
||||
SQAISign.DefSQStaticMethod(engine, &ScriptSign::GetName, "GetName", 2, ".i");
|
||||
SQAISign.DefSQStaticMethod(engine, &ScriptSign::GetLocation, "GetLocation", 2, ".i");
|
||||
SQAISign.DefSQStaticMethod(engine, &ScriptSign::BuildSign, "BuildSign", 3, ".i.");
|
||||
SQAISign.DefSQStaticMethod(engine, &ScriptSign::RemoveSign, "RemoveSign", 2, ".i");
|
||||
|
||||
SQAISign.PostRegister(engine);
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_signlist.hpp"
|
||||
#include "../template/template_signlist.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptSignList, ST_AI>() { return "AISignList"; }
|
||||
|
||||
void SQAISignList_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptSignList, ST_AI> SQAISignList("AISignList");
|
||||
SQAISignList.PreRegister(engine, "AIList");
|
||||
SQAISignList.AddConstructor<void (ScriptSignList::*)(), 1>(engine, "x");
|
||||
|
||||
SQAISignList.PostRegister(engine);
|
||||
}
|
@ -1,68 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_station.hpp"
|
||||
#include "../template/template_station.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptStation, ST_AI>() { return "AIStation"; }
|
||||
|
||||
void SQAIStation_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptStation, ST_AI> SQAIStation("AIStation");
|
||||
SQAIStation.PreRegister(engine, "AIBaseStation");
|
||||
SQAIStation.AddConstructor<void (ScriptStation::*)(), 1>(engine, "x");
|
||||
|
||||
SQAIStation.DefSQConst(engine, ScriptStation::ERR_STATION_BASE, "ERR_STATION_BASE");
|
||||
SQAIStation.DefSQConst(engine, ScriptStation::ERR_STATION_TOO_CLOSE_TO_ANOTHER_STATION, "ERR_STATION_TOO_CLOSE_TO_ANOTHER_STATION");
|
||||
SQAIStation.DefSQConst(engine, ScriptStation::ERR_STATION_TOO_MANY_STATIONS, "ERR_STATION_TOO_MANY_STATIONS");
|
||||
SQAIStation.DefSQConst(engine, ScriptStation::ERR_STATION_TOO_MANY_STATIONS_IN_TOWN, "ERR_STATION_TOO_MANY_STATIONS_IN_TOWN");
|
||||
SQAIStation.DefSQConst(engine, ScriptStation::STATION_TRAIN, "STATION_TRAIN");
|
||||
SQAIStation.DefSQConst(engine, ScriptStation::STATION_TRUCK_STOP, "STATION_TRUCK_STOP");
|
||||
SQAIStation.DefSQConst(engine, ScriptStation::STATION_BUS_STOP, "STATION_BUS_STOP");
|
||||
SQAIStation.DefSQConst(engine, ScriptStation::STATION_AIRPORT, "STATION_AIRPORT");
|
||||
SQAIStation.DefSQConst(engine, ScriptStation::STATION_DOCK, "STATION_DOCK");
|
||||
SQAIStation.DefSQConst(engine, ScriptStation::STATION_ANY, "STATION_ANY");
|
||||
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT, ScriptStation::ERR_STATION_TOO_CLOSE_TO_ANOTHER_STATION);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK, ScriptStation::ERR_STATION_TOO_CLOSE_TO_ANOTHER_STATION);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_TOO_MANY_STATIONS_LOADING, ScriptStation::ERR_STATION_TOO_MANY_STATIONS);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_TOO_MANY_TRUCK_STOPS, ScriptStation::ERR_STATION_TOO_MANY_STATIONS);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_TOO_MANY_BUS_STOPS, ScriptStation::ERR_STATION_TOO_MANY_STATIONS);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_LOCAL_AUTHORITY_REFUSES_AIRPORT, ScriptStation::ERR_STATION_TOO_MANY_STATIONS_IN_TOWN);
|
||||
|
||||
ScriptError::RegisterErrorMapString(ScriptStation::ERR_STATION_TOO_CLOSE_TO_ANOTHER_STATION, "ERR_STATION_TOO_CLOSE_TO_ANOTHER_STATION");
|
||||
ScriptError::RegisterErrorMapString(ScriptStation::ERR_STATION_TOO_MANY_STATIONS, "ERR_STATION_TOO_MANY_STATIONS");
|
||||
ScriptError::RegisterErrorMapString(ScriptStation::ERR_STATION_TOO_MANY_STATIONS_IN_TOWN, "ERR_STATION_TOO_MANY_STATIONS_IN_TOWN");
|
||||
|
||||
SQAIStation.DefSQStaticMethod(engine, &ScriptStation::IsValidStation, "IsValidStation", 2, ".i");
|
||||
SQAIStation.DefSQStaticMethod(engine, &ScriptStation::GetStationID, "GetStationID", 2, ".i");
|
||||
SQAIStation.DefSQStaticMethod(engine, &ScriptStation::GetCargoWaiting, "GetCargoWaiting", 3, ".ii");
|
||||
SQAIStation.DefSQStaticMethod(engine, &ScriptStation::GetCargoWaitingFrom, "GetCargoWaitingFrom", 4, ".iii");
|
||||
SQAIStation.DefSQStaticMethod(engine, &ScriptStation::GetCargoWaitingVia, "GetCargoWaitingVia", 4, ".iii");
|
||||
SQAIStation.DefSQStaticMethod(engine, &ScriptStation::GetCargoWaitingFromVia, "GetCargoWaitingFromVia", 5, ".iiii");
|
||||
SQAIStation.DefSQStaticMethod(engine, &ScriptStation::GetCargoPlanned, "GetCargoPlanned", 3, ".ii");
|
||||
SQAIStation.DefSQStaticMethod(engine, &ScriptStation::GetCargoPlannedFrom, "GetCargoPlannedFrom", 4, ".iii");
|
||||
SQAIStation.DefSQStaticMethod(engine, &ScriptStation::GetCargoPlannedVia, "GetCargoPlannedVia", 4, ".iii");
|
||||
SQAIStation.DefSQStaticMethod(engine, &ScriptStation::GetCargoPlannedFromVia, "GetCargoPlannedFromVia", 5, ".iiii");
|
||||
SQAIStation.DefSQStaticMethod(engine, &ScriptStation::HasCargoRating, "HasCargoRating", 3, ".ii");
|
||||
SQAIStation.DefSQStaticMethod(engine, &ScriptStation::GetCargoRating, "GetCargoRating", 3, ".ii");
|
||||
SQAIStation.DefSQStaticMethod(engine, &ScriptStation::GetCoverageRadius, "GetCoverageRadius", 2, ".i");
|
||||
SQAIStation.DefSQStaticMethod(engine, &ScriptStation::GetStationCoverageRadius, "GetStationCoverageRadius", 2, ".i");
|
||||
SQAIStation.DefSQStaticMethod(engine, &ScriptStation::GetDistanceManhattanToTile, "GetDistanceManhattanToTile", 3, ".ii");
|
||||
SQAIStation.DefSQStaticMethod(engine, &ScriptStation::GetDistanceSquareToTile, "GetDistanceSquareToTile", 3, ".ii");
|
||||
SQAIStation.DefSQStaticMethod(engine, &ScriptStation::IsWithinTownInfluence, "IsWithinTownInfluence", 3, ".ii");
|
||||
SQAIStation.DefSQStaticMethod(engine, &ScriptStation::HasStationType, "HasStationType", 3, ".ii");
|
||||
SQAIStation.DefSQStaticMethod(engine, &ScriptStation::HasRoadType, "HasRoadType", 3, ".ii");
|
||||
SQAIStation.DefSQStaticMethod(engine, &ScriptStation::GetNearestTown, "GetNearestTown", 2, ".i");
|
||||
SQAIStation.DefSQStaticMethod(engine, &ScriptStation::IsAirportClosed, "IsAirportClosed", 2, ".i");
|
||||
SQAIStation.DefSQStaticMethod(engine, &ScriptStation::OpenCloseAirport, "OpenCloseAirport", 2, ".i");
|
||||
|
||||
SQAIStation.PostRegister(engine);
|
||||
}
|
@ -1,174 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_stationlist.hpp"
|
||||
#include "../template/template_stationlist.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptStationList, ST_AI>() { return "AIStationList"; }
|
||||
|
||||
void SQAIStationList_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptStationList, ST_AI> SQAIStationList("AIStationList");
|
||||
SQAIStationList.PreRegister(engine, "AIList");
|
||||
SQAIStationList.AddConstructor<void (ScriptStationList::*)(ScriptStation::StationType station_type), 2>(engine, "xi");
|
||||
|
||||
SQAIStationList.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptStationList_Cargo, ST_AI>() { return "AIStationList_Cargo"; }
|
||||
|
||||
void SQAIStationList_Cargo_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptStationList_Cargo, ST_AI> SQAIStationList_Cargo("AIStationList_Cargo");
|
||||
SQAIStationList_Cargo.PreRegister(engine, "AIList");
|
||||
SQAIStationList_Cargo.AddConstructor<void (ScriptStationList_Cargo::*)(ScriptStationList_Cargo::CargoMode mode, ScriptStationList_Cargo::CargoSelector selector, StationID station_id, CargoID cargo, StationID other_station), 6>(engine, "xiiiii");
|
||||
|
||||
SQAIStationList_Cargo.DefSQConst(engine, ScriptStationList_Cargo::CS_BY_FROM, "CS_BY_FROM");
|
||||
SQAIStationList_Cargo.DefSQConst(engine, ScriptStationList_Cargo::CS_VIA_BY_FROM, "CS_VIA_BY_FROM");
|
||||
SQAIStationList_Cargo.DefSQConst(engine, ScriptStationList_Cargo::CS_BY_VIA, "CS_BY_VIA");
|
||||
SQAIStationList_Cargo.DefSQConst(engine, ScriptStationList_Cargo::CS_FROM_BY_VIA, "CS_FROM_BY_VIA");
|
||||
SQAIStationList_Cargo.DefSQConst(engine, ScriptStationList_Cargo::CM_WAITING, "CM_WAITING");
|
||||
SQAIStationList_Cargo.DefSQConst(engine, ScriptStationList_Cargo::CM_PLANNED, "CM_PLANNED");
|
||||
|
||||
SQAIStationList_Cargo.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptStationList_CargoWaiting, ST_AI>() { return "AIStationList_CargoWaiting"; }
|
||||
|
||||
void SQAIStationList_CargoWaiting_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptStationList_CargoWaiting, ST_AI> SQAIStationList_CargoWaiting("AIStationList_CargoWaiting");
|
||||
SQAIStationList_CargoWaiting.PreRegister(engine, "AIStationList_Cargo");
|
||||
SQAIStationList_CargoWaiting.AddConstructor<void (ScriptStationList_CargoWaiting::*)(ScriptStationList_Cargo::CargoSelector selector, StationID station_id, CargoID cargo, StationID other_station), 5>(engine, "xiiii");
|
||||
|
||||
SQAIStationList_CargoWaiting.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptStationList_CargoPlanned, ST_AI>() { return "AIStationList_CargoPlanned"; }
|
||||
|
||||
void SQAIStationList_CargoPlanned_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptStationList_CargoPlanned, ST_AI> SQAIStationList_CargoPlanned("AIStationList_CargoPlanned");
|
||||
SQAIStationList_CargoPlanned.PreRegister(engine, "AIStationList_Cargo");
|
||||
SQAIStationList_CargoPlanned.AddConstructor<void (ScriptStationList_CargoPlanned::*)(ScriptStationList_Cargo::CargoSelector selector, StationID station_id, CargoID cargo, StationID other_station), 5>(engine, "xiiii");
|
||||
|
||||
SQAIStationList_CargoPlanned.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptStationList_CargoWaitingByFrom, ST_AI>() { return "AIStationList_CargoWaitingByFrom"; }
|
||||
|
||||
void SQAIStationList_CargoWaitingByFrom_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptStationList_CargoWaitingByFrom, ST_AI> SQAIStationList_CargoWaitingByFrom("AIStationList_CargoWaitingByFrom");
|
||||
SQAIStationList_CargoWaitingByFrom.PreRegister(engine, "AIStationList_CargoWaiting");
|
||||
SQAIStationList_CargoWaitingByFrom.AddConstructor<void (ScriptStationList_CargoWaitingByFrom::*)(StationID station_id, CargoID cargo), 3>(engine, "xii");
|
||||
|
||||
SQAIStationList_CargoWaitingByFrom.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptStationList_CargoWaitingViaByFrom, ST_AI>() { return "AIStationList_CargoWaitingViaByFrom"; }
|
||||
|
||||
void SQAIStationList_CargoWaitingViaByFrom_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptStationList_CargoWaitingViaByFrom, ST_AI> SQAIStationList_CargoWaitingViaByFrom("AIStationList_CargoWaitingViaByFrom");
|
||||
SQAIStationList_CargoWaitingViaByFrom.PreRegister(engine, "AIStationList_CargoWaiting");
|
||||
SQAIStationList_CargoWaitingViaByFrom.AddConstructor<void (ScriptStationList_CargoWaitingViaByFrom::*)(StationID station_id, CargoID cargo, StationID via), 4>(engine, "xiii");
|
||||
|
||||
SQAIStationList_CargoWaitingViaByFrom.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptStationList_CargoWaitingByVia, ST_AI>() { return "AIStationList_CargoWaitingByVia"; }
|
||||
|
||||
void SQAIStationList_CargoWaitingByVia_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptStationList_CargoWaitingByVia, ST_AI> SQAIStationList_CargoWaitingByVia("AIStationList_CargoWaitingByVia");
|
||||
SQAIStationList_CargoWaitingByVia.PreRegister(engine, "AIStationList_CargoWaiting");
|
||||
SQAIStationList_CargoWaitingByVia.AddConstructor<void (ScriptStationList_CargoWaitingByVia::*)(StationID station_id, CargoID cargo), 3>(engine, "xii");
|
||||
|
||||
SQAIStationList_CargoWaitingByVia.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptStationList_CargoWaitingFromByVia, ST_AI>() { return "AIStationList_CargoWaitingFromByVia"; }
|
||||
|
||||
void SQAIStationList_CargoWaitingFromByVia_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptStationList_CargoWaitingFromByVia, ST_AI> SQAIStationList_CargoWaitingFromByVia("AIStationList_CargoWaitingFromByVia");
|
||||
SQAIStationList_CargoWaitingFromByVia.PreRegister(engine, "AIStationList_CargoWaiting");
|
||||
SQAIStationList_CargoWaitingFromByVia.AddConstructor<void (ScriptStationList_CargoWaitingFromByVia::*)(StationID station_id, CargoID cargo, StationID from), 4>(engine, "xiii");
|
||||
|
||||
SQAIStationList_CargoWaitingFromByVia.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptStationList_CargoPlannedByFrom, ST_AI>() { return "AIStationList_CargoPlannedByFrom"; }
|
||||
|
||||
void SQAIStationList_CargoPlannedByFrom_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptStationList_CargoPlannedByFrom, ST_AI> SQAIStationList_CargoPlannedByFrom("AIStationList_CargoPlannedByFrom");
|
||||
SQAIStationList_CargoPlannedByFrom.PreRegister(engine, "AIStationList_CargoPlanned");
|
||||
SQAIStationList_CargoPlannedByFrom.AddConstructor<void (ScriptStationList_CargoPlannedByFrom::*)(StationID station_id, CargoID cargo), 3>(engine, "xii");
|
||||
|
||||
SQAIStationList_CargoPlannedByFrom.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptStationList_CargoPlannedViaByFrom, ST_AI>() { return "AIStationList_CargoPlannedViaByFrom"; }
|
||||
|
||||
void SQAIStationList_CargoPlannedViaByFrom_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptStationList_CargoPlannedViaByFrom, ST_AI> SQAIStationList_CargoPlannedViaByFrom("AIStationList_CargoPlannedViaByFrom");
|
||||
SQAIStationList_CargoPlannedViaByFrom.PreRegister(engine, "AIStationList_CargoPlanned");
|
||||
SQAIStationList_CargoPlannedViaByFrom.AddConstructor<void (ScriptStationList_CargoPlannedViaByFrom::*)(StationID station_id, CargoID cargo, StationID via), 4>(engine, "xiii");
|
||||
|
||||
SQAIStationList_CargoPlannedViaByFrom.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptStationList_CargoPlannedByVia, ST_AI>() { return "AIStationList_CargoPlannedByVia"; }
|
||||
|
||||
void SQAIStationList_CargoPlannedByVia_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptStationList_CargoPlannedByVia, ST_AI> SQAIStationList_CargoPlannedByVia("AIStationList_CargoPlannedByVia");
|
||||
SQAIStationList_CargoPlannedByVia.PreRegister(engine, "AIStationList_CargoPlanned");
|
||||
SQAIStationList_CargoPlannedByVia.AddConstructor<void (ScriptStationList_CargoPlannedByVia::*)(StationID station_id, CargoID cargo), 3>(engine, "xii");
|
||||
|
||||
SQAIStationList_CargoPlannedByVia.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptStationList_CargoPlannedFromByVia, ST_AI>() { return "AIStationList_CargoPlannedFromByVia"; }
|
||||
|
||||
void SQAIStationList_CargoPlannedFromByVia_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptStationList_CargoPlannedFromByVia, ST_AI> SQAIStationList_CargoPlannedFromByVia("AIStationList_CargoPlannedFromByVia");
|
||||
SQAIStationList_CargoPlannedFromByVia.PreRegister(engine, "AIStationList_CargoPlanned");
|
||||
SQAIStationList_CargoPlannedFromByVia.AddConstructor<void (ScriptStationList_CargoPlannedFromByVia::*)(StationID station_id, CargoID cargo, StationID from), 4>(engine, "xiii");
|
||||
|
||||
SQAIStationList_CargoPlannedFromByVia.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptStationList_Vehicle, ST_AI>() { return "AIStationList_Vehicle"; }
|
||||
|
||||
void SQAIStationList_Vehicle_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptStationList_Vehicle, ST_AI> SQAIStationList_Vehicle("AIStationList_Vehicle");
|
||||
SQAIStationList_Vehicle.PreRegister(engine, "AIList");
|
||||
SQAIStationList_Vehicle.AddConstructor<void (ScriptStationList_Vehicle::*)(VehicleID vehicle_id), 2>(engine, "xi");
|
||||
|
||||
SQAIStationList_Vehicle.PostRegister(engine);
|
||||
}
|
@ -1,37 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_subsidy.hpp"
|
||||
#include "../template/template_subsidy.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptSubsidy, ST_AI>() { return "AISubsidy"; }
|
||||
|
||||
void SQAISubsidy_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptSubsidy, ST_AI> SQAISubsidy("AISubsidy");
|
||||
SQAISubsidy.PreRegister(engine);
|
||||
SQAISubsidy.AddConstructor<void (ScriptSubsidy::*)(), 1>(engine, "x");
|
||||
|
||||
SQAISubsidy.DefSQConst(engine, ScriptSubsidy::SPT_INDUSTRY, "SPT_INDUSTRY");
|
||||
SQAISubsidy.DefSQConst(engine, ScriptSubsidy::SPT_TOWN, "SPT_TOWN");
|
||||
SQAISubsidy.DefSQConst(engine, ScriptSubsidy::SPT_INVALID, "SPT_INVALID");
|
||||
|
||||
SQAISubsidy.DefSQStaticMethod(engine, &ScriptSubsidy::IsValidSubsidy, "IsValidSubsidy", 2, ".i");
|
||||
SQAISubsidy.DefSQStaticMethod(engine, &ScriptSubsidy::IsAwarded, "IsAwarded", 2, ".i");
|
||||
SQAISubsidy.DefSQStaticMethod(engine, &ScriptSubsidy::GetAwardedTo, "GetAwardedTo", 2, ".i");
|
||||
SQAISubsidy.DefSQStaticMethod(engine, &ScriptSubsidy::GetExpireDate, "GetExpireDate", 2, ".i");
|
||||
SQAISubsidy.DefSQStaticMethod(engine, &ScriptSubsidy::GetCargoType, "GetCargoType", 2, ".i");
|
||||
SQAISubsidy.DefSQStaticMethod(engine, &ScriptSubsidy::GetSourceType, "GetSourceType", 2, ".i");
|
||||
SQAISubsidy.DefSQStaticMethod(engine, &ScriptSubsidy::GetSourceIndex, "GetSourceIndex", 2, ".i");
|
||||
SQAISubsidy.DefSQStaticMethod(engine, &ScriptSubsidy::GetDestinationType, "GetDestinationType", 2, ".i");
|
||||
SQAISubsidy.DefSQStaticMethod(engine, &ScriptSubsidy::GetDestinationIndex, "GetDestinationIndex", 2, ".i");
|
||||
|
||||
SQAISubsidy.PostRegister(engine);
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_subsidylist.hpp"
|
||||
#include "../template/template_subsidylist.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptSubsidyList, ST_AI>() { return "AISubsidyList"; }
|
||||
|
||||
void SQAISubsidyList_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptSubsidyList, ST_AI> SQAISubsidyList("AISubsidyList");
|
||||
SQAISubsidyList.PreRegister(engine, "AIList");
|
||||
SQAISubsidyList.AddConstructor<void (ScriptSubsidyList::*)(), 1>(engine, "x");
|
||||
|
||||
SQAISubsidyList.PostRegister(engine);
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_testmode.hpp"
|
||||
#include "../template/template_testmode.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptTestMode, ST_AI>() { return "AITestMode"; }
|
||||
|
||||
void SQAITestMode_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptTestMode, ST_AI> SQAITestMode("AITestMode");
|
||||
SQAITestMode.PreRegister(engine);
|
||||
SQAITestMode.AddConstructor<void (ScriptTestMode::*)(), 1>(engine, "x");
|
||||
|
||||
SQAITestMode.PostRegister(engine);
|
||||
}
|
@ -1,124 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_tile.hpp"
|
||||
#include "../template/template_tile.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptTile, ST_AI>() { return "AITile"; }
|
||||
|
||||
void SQAITile_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptTile, ST_AI> SQAITile("AITile");
|
||||
SQAITile.PreRegister(engine);
|
||||
SQAITile.AddConstructor<void (ScriptTile::*)(), 1>(engine, "x");
|
||||
|
||||
SQAITile.DefSQConst(engine, ScriptTile::ERR_TILE_BASE, "ERR_TILE_BASE");
|
||||
SQAITile.DefSQConst(engine, ScriptTile::ERR_TILE_TOO_HIGH, "ERR_TILE_TOO_HIGH");
|
||||
SQAITile.DefSQConst(engine, ScriptTile::ERR_TILE_TOO_LOW, "ERR_TILE_TOO_LOW");
|
||||
SQAITile.DefSQConst(engine, ScriptTile::ERR_AREA_ALREADY_FLAT, "ERR_AREA_ALREADY_FLAT");
|
||||
SQAITile.DefSQConst(engine, ScriptTile::ERR_EXCAVATION_WOULD_DAMAGE, "ERR_EXCAVATION_WOULD_DAMAGE");
|
||||
SQAITile.DefSQConst(engine, ScriptTile::ERR_LIMIT_REACHED, "ERR_LIMIT_REACHED");
|
||||
SQAITile.DefSQConst(engine, ScriptTile::CORNER_W, "CORNER_W");
|
||||
SQAITile.DefSQConst(engine, ScriptTile::CORNER_S, "CORNER_S");
|
||||
SQAITile.DefSQConst(engine, ScriptTile::CORNER_E, "CORNER_E");
|
||||
SQAITile.DefSQConst(engine, ScriptTile::CORNER_N, "CORNER_N");
|
||||
SQAITile.DefSQConst(engine, ScriptTile::CORNER_INVALID, "CORNER_INVALID");
|
||||
SQAITile.DefSQConst(engine, ScriptTile::SLOPE_FLAT, "SLOPE_FLAT");
|
||||
SQAITile.DefSQConst(engine, ScriptTile::SLOPE_W, "SLOPE_W");
|
||||
SQAITile.DefSQConst(engine, ScriptTile::SLOPE_S, "SLOPE_S");
|
||||
SQAITile.DefSQConst(engine, ScriptTile::SLOPE_E, "SLOPE_E");
|
||||
SQAITile.DefSQConst(engine, ScriptTile::SLOPE_N, "SLOPE_N");
|
||||
SQAITile.DefSQConst(engine, ScriptTile::SLOPE_STEEP, "SLOPE_STEEP");
|
||||
SQAITile.DefSQConst(engine, ScriptTile::SLOPE_NW, "SLOPE_NW");
|
||||
SQAITile.DefSQConst(engine, ScriptTile::SLOPE_SW, "SLOPE_SW");
|
||||
SQAITile.DefSQConst(engine, ScriptTile::SLOPE_SE, "SLOPE_SE");
|
||||
SQAITile.DefSQConst(engine, ScriptTile::SLOPE_NE, "SLOPE_NE");
|
||||
SQAITile.DefSQConst(engine, ScriptTile::SLOPE_EW, "SLOPE_EW");
|
||||
SQAITile.DefSQConst(engine, ScriptTile::SLOPE_NS, "SLOPE_NS");
|
||||
SQAITile.DefSQConst(engine, ScriptTile::SLOPE_ELEVATED, "SLOPE_ELEVATED");
|
||||
SQAITile.DefSQConst(engine, ScriptTile::SLOPE_NWS, "SLOPE_NWS");
|
||||
SQAITile.DefSQConst(engine, ScriptTile::SLOPE_WSE, "SLOPE_WSE");
|
||||
SQAITile.DefSQConst(engine, ScriptTile::SLOPE_SEN, "SLOPE_SEN");
|
||||
SQAITile.DefSQConst(engine, ScriptTile::SLOPE_ENW, "SLOPE_ENW");
|
||||
SQAITile.DefSQConst(engine, ScriptTile::SLOPE_STEEP_W, "SLOPE_STEEP_W");
|
||||
SQAITile.DefSQConst(engine, ScriptTile::SLOPE_STEEP_S, "SLOPE_STEEP_S");
|
||||
SQAITile.DefSQConst(engine, ScriptTile::SLOPE_STEEP_E, "SLOPE_STEEP_E");
|
||||
SQAITile.DefSQConst(engine, ScriptTile::SLOPE_STEEP_N, "SLOPE_STEEP_N");
|
||||
SQAITile.DefSQConst(engine, ScriptTile::SLOPE_INVALID, "SLOPE_INVALID");
|
||||
SQAITile.DefSQConst(engine, ScriptTile::TRANSPORT_RAIL, "TRANSPORT_RAIL");
|
||||
SQAITile.DefSQConst(engine, ScriptTile::TRANSPORT_ROAD, "TRANSPORT_ROAD");
|
||||
SQAITile.DefSQConst(engine, ScriptTile::TRANSPORT_WATER, "TRANSPORT_WATER");
|
||||
SQAITile.DefSQConst(engine, ScriptTile::TRANSPORT_AIR, "TRANSPORT_AIR");
|
||||
SQAITile.DefSQConst(engine, ScriptTile::TRANSPORT_INVALID, "TRANSPORT_INVALID");
|
||||
SQAITile.DefSQConst(engine, ScriptTile::BT_FOUNDATION, "BT_FOUNDATION");
|
||||
SQAITile.DefSQConst(engine, ScriptTile::BT_TERRAFORM, "BT_TERRAFORM");
|
||||
SQAITile.DefSQConst(engine, ScriptTile::BT_BUILD_TREES, "BT_BUILD_TREES");
|
||||
SQAITile.DefSQConst(engine, ScriptTile::BT_CLEAR_GRASS, "BT_CLEAR_GRASS");
|
||||
SQAITile.DefSQConst(engine, ScriptTile::BT_CLEAR_ROUGH, "BT_CLEAR_ROUGH");
|
||||
SQAITile.DefSQConst(engine, ScriptTile::BT_CLEAR_ROCKY, "BT_CLEAR_ROCKY");
|
||||
SQAITile.DefSQConst(engine, ScriptTile::BT_CLEAR_FIELDS, "BT_CLEAR_FIELDS");
|
||||
SQAITile.DefSQConst(engine, ScriptTile::BT_CLEAR_HOUSE, "BT_CLEAR_HOUSE");
|
||||
SQAITile.DefSQConst(engine, ScriptTile::TERRAIN_NORMAL, "TERRAIN_NORMAL");
|
||||
SQAITile.DefSQConst(engine, ScriptTile::TERRAIN_DESERT, "TERRAIN_DESERT");
|
||||
SQAITile.DefSQConst(engine, ScriptTile::TERRAIN_RAINFOREST, "TERRAIN_RAINFOREST");
|
||||
SQAITile.DefSQConst(engine, ScriptTile::TERRAIN_SNOW, "TERRAIN_SNOW");
|
||||
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_ALREADY_AT_SEA_LEVEL, ScriptTile::ERR_TILE_TOO_HIGH);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_ALREADY_AT_SEA_LEVEL, ScriptTile::ERR_TILE_TOO_LOW);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_ALREADY_LEVELLED, ScriptTile::ERR_AREA_ALREADY_FLAT);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_EXCAVATION_WOULD_DAMAGE, ScriptTile::ERR_EXCAVATION_WOULD_DAMAGE);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_TERRAFORM_LIMIT_REACHED, ScriptTile::ERR_LIMIT_REACHED);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_CLEARING_LIMIT_REACHED, ScriptTile::ERR_LIMIT_REACHED);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_TREE_PLANT_LIMIT_REACHED, ScriptTile::ERR_LIMIT_REACHED);
|
||||
|
||||
ScriptError::RegisterErrorMapString(ScriptTile::ERR_TILE_TOO_HIGH, "ERR_TILE_TOO_HIGH");
|
||||
ScriptError::RegisterErrorMapString(ScriptTile::ERR_TILE_TOO_LOW, "ERR_TILE_TOO_LOW");
|
||||
ScriptError::RegisterErrorMapString(ScriptTile::ERR_AREA_ALREADY_FLAT, "ERR_AREA_ALREADY_FLAT");
|
||||
ScriptError::RegisterErrorMapString(ScriptTile::ERR_EXCAVATION_WOULD_DAMAGE, "ERR_EXCAVATION_WOULD_DAMAGE");
|
||||
ScriptError::RegisterErrorMapString(ScriptTile::ERR_LIMIT_REACHED, "ERR_LIMIT_REACHED");
|
||||
|
||||
SQAITile.DefSQStaticMethod(engine, &ScriptTile::IsBuildable, "IsBuildable", 2, ".i");
|
||||
SQAITile.DefSQStaticMethod(engine, &ScriptTile::IsBuildableRectangle, "IsBuildableRectangle", 4, ".iii");
|
||||
SQAITile.DefSQStaticMethod(engine, &ScriptTile::IsWaterTile, "IsWaterTile", 2, ".i");
|
||||
SQAITile.DefSQStaticMethod(engine, &ScriptTile::IsCoastTile, "IsCoastTile", 2, ".i");
|
||||
SQAITile.DefSQStaticMethod(engine, &ScriptTile::IsStationTile, "IsStationTile", 2, ".i");
|
||||
SQAITile.DefSQStaticMethod(engine, &ScriptTile::IsSteepSlope, "IsSteepSlope", 2, ".i");
|
||||
SQAITile.DefSQStaticMethod(engine, &ScriptTile::IsHalftileSlope, "IsHalftileSlope", 2, ".i");
|
||||
SQAITile.DefSQStaticMethod(engine, &ScriptTile::HasTreeOnTile, "HasTreeOnTile", 2, ".i");
|
||||
SQAITile.DefSQStaticMethod(engine, &ScriptTile::IsFarmTile, "IsFarmTile", 2, ".i");
|
||||
SQAITile.DefSQStaticMethod(engine, &ScriptTile::IsRockTile, "IsRockTile", 2, ".i");
|
||||
SQAITile.DefSQStaticMethod(engine, &ScriptTile::IsRoughTile, "IsRoughTile", 2, ".i");
|
||||
SQAITile.DefSQStaticMethod(engine, &ScriptTile::IsSnowTile, "IsSnowTile", 2, ".i");
|
||||
SQAITile.DefSQStaticMethod(engine, &ScriptTile::IsDesertTile, "IsDesertTile", 2, ".i");
|
||||
SQAITile.DefSQStaticMethod(engine, &ScriptTile::GetTerrainType, "GetTerrainType", 2, ".i");
|
||||
SQAITile.DefSQStaticMethod(engine, &ScriptTile::GetSlope, "GetSlope", 2, ".i");
|
||||
SQAITile.DefSQStaticMethod(engine, &ScriptTile::GetComplementSlope, "GetComplementSlope", 2, ".i");
|
||||
SQAITile.DefSQStaticMethod(engine, &ScriptTile::GetMinHeight, "GetMinHeight", 2, ".i");
|
||||
SQAITile.DefSQStaticMethod(engine, &ScriptTile::GetMaxHeight, "GetMaxHeight", 2, ".i");
|
||||
SQAITile.DefSQStaticMethod(engine, &ScriptTile::GetCornerHeight, "GetCornerHeight", 3, ".ii");
|
||||
SQAITile.DefSQStaticMethod(engine, &ScriptTile::GetOwner, "GetOwner", 2, ".i");
|
||||
SQAITile.DefSQStaticMethod(engine, &ScriptTile::HasTransportType, "HasTransportType", 3, ".ii");
|
||||
SQAITile.DefSQStaticMethod(engine, &ScriptTile::GetCargoAcceptance, "GetCargoAcceptance", 6, ".iiiii");
|
||||
SQAITile.DefSQStaticMethod(engine, &ScriptTile::GetCargoProduction, "GetCargoProduction", 6, ".iiiii");
|
||||
SQAITile.DefSQStaticMethod(engine, &ScriptTile::GetDistanceManhattanToTile, "GetDistanceManhattanToTile", 3, ".ii");
|
||||
SQAITile.DefSQStaticMethod(engine, &ScriptTile::GetDistanceSquareToTile, "GetDistanceSquareToTile", 3, ".ii");
|
||||
SQAITile.DefSQStaticMethod(engine, &ScriptTile::RaiseTile, "RaiseTile", 3, ".ii");
|
||||
SQAITile.DefSQStaticMethod(engine, &ScriptTile::LowerTile, "LowerTile", 3, ".ii");
|
||||
SQAITile.DefSQStaticMethod(engine, &ScriptTile::LevelTiles, "LevelTiles", 3, ".ii");
|
||||
SQAITile.DefSQStaticMethod(engine, &ScriptTile::DemolishTile, "DemolishTile", 2, ".i");
|
||||
SQAITile.DefSQStaticMethod(engine, &ScriptTile::PlantTree, "PlantTree", 2, ".i");
|
||||
SQAITile.DefSQStaticMethod(engine, &ScriptTile::PlantTreeRectangle, "PlantTreeRectangle", 4, ".iii");
|
||||
SQAITile.DefSQStaticMethod(engine, &ScriptTile::IsWithinTownInfluence, "IsWithinTownInfluence", 3, ".ii");
|
||||
SQAITile.DefSQStaticMethod(engine, &ScriptTile::GetTownAuthority, "GetTownAuthority", 2, ".i");
|
||||
SQAITile.DefSQStaticMethod(engine, &ScriptTile::GetClosestTown, "GetClosestTown", 2, ".i");
|
||||
SQAITile.DefSQStaticMethod(engine, &ScriptTile::GetBuildCost, "GetBuildCost", 2, ".i");
|
||||
|
||||
SQAITile.PostRegister(engine);
|
||||
}
|
@ -1,64 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_tilelist.hpp"
|
||||
#include "../template/template_tilelist.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptTileList, ST_AI>() { return "AITileList"; }
|
||||
|
||||
void SQAITileList_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptTileList, ST_AI> SQAITileList("AITileList");
|
||||
SQAITileList.PreRegister(engine, "AIList");
|
||||
SQAITileList.AddConstructor<void (ScriptTileList::*)(), 1>(engine, "x");
|
||||
|
||||
SQAITileList.DefSQMethod(engine, &ScriptTileList::AddRectangle, "AddRectangle", 3, "xii");
|
||||
SQAITileList.DefSQMethod(engine, &ScriptTileList::AddTile, "AddTile", 2, "xi");
|
||||
SQAITileList.DefSQMethod(engine, &ScriptTileList::RemoveRectangle, "RemoveRectangle", 3, "xii");
|
||||
SQAITileList.DefSQMethod(engine, &ScriptTileList::RemoveTile, "RemoveTile", 2, "xi");
|
||||
|
||||
SQAITileList.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptTileList_IndustryAccepting, ST_AI>() { return "AITileList_IndustryAccepting"; }
|
||||
|
||||
void SQAITileList_IndustryAccepting_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptTileList_IndustryAccepting, ST_AI> SQAITileList_IndustryAccepting("AITileList_IndustryAccepting");
|
||||
SQAITileList_IndustryAccepting.PreRegister(engine, "AITileList");
|
||||
SQAITileList_IndustryAccepting.AddConstructor<void (ScriptTileList_IndustryAccepting::*)(IndustryID industry_id, int radius), 3>(engine, "xii");
|
||||
|
||||
SQAITileList_IndustryAccepting.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptTileList_IndustryProducing, ST_AI>() { return "AITileList_IndustryProducing"; }
|
||||
|
||||
void SQAITileList_IndustryProducing_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptTileList_IndustryProducing, ST_AI> SQAITileList_IndustryProducing("AITileList_IndustryProducing");
|
||||
SQAITileList_IndustryProducing.PreRegister(engine, "AITileList");
|
||||
SQAITileList_IndustryProducing.AddConstructor<void (ScriptTileList_IndustryProducing::*)(IndustryID industry_id, int radius), 3>(engine, "xii");
|
||||
|
||||
SQAITileList_IndustryProducing.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptTileList_StationType, ST_AI>() { return "AITileList_StationType"; }
|
||||
|
||||
void SQAITileList_StationType_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptTileList_StationType, ST_AI> SQAITileList_StationType("AITileList_StationType");
|
||||
SQAITileList_StationType.PreRegister(engine, "AITileList");
|
||||
SQAITileList_StationType.AddConstructor<void (ScriptTileList_StationType::*)(StationID station_id, ScriptStation::StationType station_type), 3>(engine, "xii");
|
||||
|
||||
SQAITileList_StationType.PostRegister(engine);
|
||||
}
|
@ -1,81 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_town.hpp"
|
||||
#include "../template/template_town.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptTown, ST_AI>() { return "AITown"; }
|
||||
|
||||
void SQAITown_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptTown, ST_AI> SQAITown("AITown");
|
||||
SQAITown.PreRegister(engine);
|
||||
SQAITown.AddConstructor<void (ScriptTown::*)(), 1>(engine, "x");
|
||||
|
||||
SQAITown.DefSQConst(engine, ScriptTown::TOWN_ACTION_ADVERTISE_SMALL, "TOWN_ACTION_ADVERTISE_SMALL");
|
||||
SQAITown.DefSQConst(engine, ScriptTown::TOWN_ACTION_ADVERTISE_MEDIUM, "TOWN_ACTION_ADVERTISE_MEDIUM");
|
||||
SQAITown.DefSQConst(engine, ScriptTown::TOWN_ACTION_ADVERTISE_LARGE, "TOWN_ACTION_ADVERTISE_LARGE");
|
||||
SQAITown.DefSQConst(engine, ScriptTown::TOWN_ACTION_ROAD_REBUILD, "TOWN_ACTION_ROAD_REBUILD");
|
||||
SQAITown.DefSQConst(engine, ScriptTown::TOWN_ACTION_BUILD_STATUE, "TOWN_ACTION_BUILD_STATUE");
|
||||
SQAITown.DefSQConst(engine, ScriptTown::TOWN_ACTION_FUND_BUILDINGS, "TOWN_ACTION_FUND_BUILDINGS");
|
||||
SQAITown.DefSQConst(engine, ScriptTown::TOWN_ACTION_BUY_RIGHTS, "TOWN_ACTION_BUY_RIGHTS");
|
||||
SQAITown.DefSQConst(engine, ScriptTown::TOWN_ACTION_BRIBE, "TOWN_ACTION_BRIBE");
|
||||
SQAITown.DefSQConst(engine, ScriptTown::TOWN_RATING_NONE, "TOWN_RATING_NONE");
|
||||
SQAITown.DefSQConst(engine, ScriptTown::TOWN_RATING_APPALLING, "TOWN_RATING_APPALLING");
|
||||
SQAITown.DefSQConst(engine, ScriptTown::TOWN_RATING_VERY_POOR, "TOWN_RATING_VERY_POOR");
|
||||
SQAITown.DefSQConst(engine, ScriptTown::TOWN_RATING_POOR, "TOWN_RATING_POOR");
|
||||
SQAITown.DefSQConst(engine, ScriptTown::TOWN_RATING_MEDIOCRE, "TOWN_RATING_MEDIOCRE");
|
||||
SQAITown.DefSQConst(engine, ScriptTown::TOWN_RATING_GOOD, "TOWN_RATING_GOOD");
|
||||
SQAITown.DefSQConst(engine, ScriptTown::TOWN_RATING_VERY_GOOD, "TOWN_RATING_VERY_GOOD");
|
||||
SQAITown.DefSQConst(engine, ScriptTown::TOWN_RATING_EXCELLENT, "TOWN_RATING_EXCELLENT");
|
||||
SQAITown.DefSQConst(engine, ScriptTown::TOWN_RATING_OUTSTANDING, "TOWN_RATING_OUTSTANDING");
|
||||
SQAITown.DefSQConst(engine, ScriptTown::TOWN_RATING_INVALID, "TOWN_RATING_INVALID");
|
||||
SQAITown.DefSQConst(engine, ScriptTown::ROAD_LAYOUT_ORIGINAL, "ROAD_LAYOUT_ORIGINAL");
|
||||
SQAITown.DefSQConst(engine, ScriptTown::ROAD_LAYOUT_BETTER_ROADS, "ROAD_LAYOUT_BETTER_ROADS");
|
||||
SQAITown.DefSQConst(engine, ScriptTown::ROAD_LAYOUT_2x2, "ROAD_LAYOUT_2x2");
|
||||
SQAITown.DefSQConst(engine, ScriptTown::ROAD_LAYOUT_3x3, "ROAD_LAYOUT_3x3");
|
||||
SQAITown.DefSQConst(engine, ScriptTown::ROAD_LAYOUT_INVALID, "ROAD_LAYOUT_INVALID");
|
||||
SQAITown.DefSQConst(engine, ScriptTown::TOWN_SIZE_SMALL, "TOWN_SIZE_SMALL");
|
||||
SQAITown.DefSQConst(engine, ScriptTown::TOWN_SIZE_MEDIUM, "TOWN_SIZE_MEDIUM");
|
||||
SQAITown.DefSQConst(engine, ScriptTown::TOWN_SIZE_LARGE, "TOWN_SIZE_LARGE");
|
||||
SQAITown.DefSQConst(engine, ScriptTown::TOWN_SIZE_INVALID, "TOWN_SIZE_INVALID");
|
||||
SQAITown.DefSQConst(engine, ScriptTown::TOWN_GROWTH_NONE, "TOWN_GROWTH_NONE");
|
||||
SQAITown.DefSQConst(engine, ScriptTown::TOWN_GROWTH_NORMAL, "TOWN_GROWTH_NORMAL");
|
||||
|
||||
SQAITown.DefSQStaticMethod(engine, &ScriptTown::GetTownCount, "GetTownCount", 1, ".");
|
||||
SQAITown.DefSQStaticMethod(engine, &ScriptTown::IsValidTown, "IsValidTown", 2, ".i");
|
||||
SQAITown.DefSQStaticMethod(engine, &ScriptTown::GetName, "GetName", 2, ".i");
|
||||
SQAITown.DefSQStaticMethod(engine, &ScriptTown::GetPopulation, "GetPopulation", 2, ".i");
|
||||
SQAITown.DefSQStaticMethod(engine, &ScriptTown::GetHouseCount, "GetHouseCount", 2, ".i");
|
||||
SQAITown.DefSQStaticMethod(engine, &ScriptTown::GetLocation, "GetLocation", 2, ".i");
|
||||
SQAITown.DefSQStaticMethod(engine, &ScriptTown::GetLastMonthProduction, "GetLastMonthProduction", 3, ".ii");
|
||||
SQAITown.DefSQStaticMethod(engine, &ScriptTown::GetLastMonthSupplied, "GetLastMonthSupplied", 3, ".ii");
|
||||
SQAITown.DefSQStaticMethod(engine, &ScriptTown::GetLastMonthTransportedPercentage, "GetLastMonthTransportedPercentage", 3, ".ii");
|
||||
SQAITown.DefSQStaticMethod(engine, &ScriptTown::GetLastMonthReceived, "GetLastMonthReceived", 3, ".ii");
|
||||
SQAITown.DefSQStaticMethod(engine, &ScriptTown::GetCargoGoal, "GetCargoGoal", 3, ".ii");
|
||||
SQAITown.DefSQStaticMethod(engine, &ScriptTown::GetGrowthRate, "GetGrowthRate", 2, ".i");
|
||||
SQAITown.DefSQStaticMethod(engine, &ScriptTown::GetDistanceManhattanToTile, "GetDistanceManhattanToTile", 3, ".ii");
|
||||
SQAITown.DefSQStaticMethod(engine, &ScriptTown::GetDistanceSquareToTile, "GetDistanceSquareToTile", 3, ".ii");
|
||||
SQAITown.DefSQStaticMethod(engine, &ScriptTown::IsWithinTownInfluence, "IsWithinTownInfluence", 3, ".ii");
|
||||
SQAITown.DefSQStaticMethod(engine, &ScriptTown::HasStatue, "HasStatue", 2, ".i");
|
||||
SQAITown.DefSQStaticMethod(engine, &ScriptTown::IsCity, "IsCity", 2, ".i");
|
||||
SQAITown.DefSQStaticMethod(engine, &ScriptTown::GetRoadReworkDuration, "GetRoadReworkDuration", 2, ".i");
|
||||
SQAITown.DefSQStaticMethod(engine, &ScriptTown::GetFundBuildingsDuration, "GetFundBuildingsDuration", 2, ".i");
|
||||
SQAITown.DefSQStaticMethod(engine, &ScriptTown::GetExclusiveRightsCompany, "GetExclusiveRightsCompany", 2, ".i");
|
||||
SQAITown.DefSQStaticMethod(engine, &ScriptTown::GetExclusiveRightsDuration, "GetExclusiveRightsDuration", 2, ".i");
|
||||
SQAITown.DefSQStaticMethod(engine, &ScriptTown::IsActionAvailable, "IsActionAvailable", 3, ".ii");
|
||||
SQAITown.DefSQStaticMethod(engine, &ScriptTown::PerformTownAction, "PerformTownAction", 3, ".ii");
|
||||
SQAITown.DefSQStaticMethod(engine, &ScriptTown::FoundTown, "FoundTown", 6, ".iibi.");
|
||||
SQAITown.DefSQStaticMethod(engine, &ScriptTown::GetRating, "GetRating", 3, ".ii");
|
||||
SQAITown.DefSQStaticMethod(engine, &ScriptTown::GetAllowedNoise, "GetAllowedNoise", 2, ".i");
|
||||
SQAITown.DefSQStaticMethod(engine, &ScriptTown::GetRoadLayout, "GetRoadLayout", 2, ".i");
|
||||
|
||||
SQAITown.PostRegister(engine);
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_townlist.hpp"
|
||||
#include "../template/template_townlist.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptTownList, ST_AI>() { return "AITownList"; }
|
||||
|
||||
void SQAITownList_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptTownList, ST_AI> SQAITownList("AITownList");
|
||||
SQAITownList.PreRegister(engine, "AIList");
|
||||
SQAITownList.AddConstructor<void (ScriptTownList::*)(), 1>(engine, "x");
|
||||
|
||||
SQAITownList.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptTownEffectList, ST_AI>() { return "AITownEffectList"; }
|
||||
|
||||
void SQAITownEffectList_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptTownEffectList, ST_AI> SQAITownEffectList("AITownEffectList");
|
||||
SQAITownEffectList.PreRegister(engine, "AIList");
|
||||
SQAITownEffectList.AddConstructor<void (ScriptTownEffectList::*)(), 1>(engine, "x");
|
||||
|
||||
SQAITownEffectList.PostRegister(engine);
|
||||
}
|
@ -1,44 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_tunnel.hpp"
|
||||
#include "../template/template_tunnel.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptTunnel, ST_AI>() { return "AITunnel"; }
|
||||
|
||||
void SQAITunnel_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptTunnel, ST_AI> SQAITunnel("AITunnel");
|
||||
SQAITunnel.PreRegister(engine);
|
||||
SQAITunnel.AddConstructor<void (ScriptTunnel::*)(), 1>(engine, "x");
|
||||
|
||||
SQAITunnel.DefSQConst(engine, ScriptTunnel::ERR_TUNNEL_BASE, "ERR_TUNNEL_BASE");
|
||||
SQAITunnel.DefSQConst(engine, ScriptTunnel::ERR_TUNNEL_CANNOT_BUILD_ON_WATER, "ERR_TUNNEL_CANNOT_BUILD_ON_WATER");
|
||||
SQAITunnel.DefSQConst(engine, ScriptTunnel::ERR_TUNNEL_START_SITE_UNSUITABLE, "ERR_TUNNEL_START_SITE_UNSUITABLE");
|
||||
SQAITunnel.DefSQConst(engine, ScriptTunnel::ERR_TUNNEL_ANOTHER_TUNNEL_IN_THE_WAY, "ERR_TUNNEL_ANOTHER_TUNNEL_IN_THE_WAY");
|
||||
SQAITunnel.DefSQConst(engine, ScriptTunnel::ERR_TUNNEL_END_SITE_UNSUITABLE, "ERR_TUNNEL_END_SITE_UNSUITABLE");
|
||||
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_BUILD_ON_WATER, ScriptTunnel::ERR_TUNNEL_CANNOT_BUILD_ON_WATER);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_SITE_UNSUITABLE_FOR_TUNNEL, ScriptTunnel::ERR_TUNNEL_START_SITE_UNSUITABLE);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_ANOTHER_TUNNEL_IN_THE_WAY, ScriptTunnel::ERR_TUNNEL_ANOTHER_TUNNEL_IN_THE_WAY);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_UNABLE_TO_EXCAVATE_LAND, ScriptTunnel::ERR_TUNNEL_END_SITE_UNSUITABLE);
|
||||
|
||||
ScriptError::RegisterErrorMapString(ScriptTunnel::ERR_TUNNEL_CANNOT_BUILD_ON_WATER, "ERR_TUNNEL_CANNOT_BUILD_ON_WATER");
|
||||
ScriptError::RegisterErrorMapString(ScriptTunnel::ERR_TUNNEL_START_SITE_UNSUITABLE, "ERR_TUNNEL_START_SITE_UNSUITABLE");
|
||||
ScriptError::RegisterErrorMapString(ScriptTunnel::ERR_TUNNEL_ANOTHER_TUNNEL_IN_THE_WAY, "ERR_TUNNEL_ANOTHER_TUNNEL_IN_THE_WAY");
|
||||
ScriptError::RegisterErrorMapString(ScriptTunnel::ERR_TUNNEL_END_SITE_UNSUITABLE, "ERR_TUNNEL_END_SITE_UNSUITABLE");
|
||||
|
||||
SQAITunnel.DefSQStaticMethod(engine, &ScriptTunnel::IsTunnelTile, "IsTunnelTile", 2, ".i");
|
||||
SQAITunnel.DefSQStaticMethod(engine, &ScriptTunnel::GetOtherTunnelEnd, "GetOtherTunnelEnd", 2, ".i");
|
||||
SQAITunnel.DefSQStaticMethod(engine, &ScriptTunnel::BuildTunnel, "BuildTunnel", 3, ".ii");
|
||||
SQAITunnel.DefSQStaticMethod(engine, &ScriptTunnel::RemoveTunnel, "RemoveTunnel", 2, ".i");
|
||||
|
||||
SQAITunnel.PostRegister(engine);
|
||||
}
|
@ -1,147 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_vehicle.hpp"
|
||||
#include "../template/template_vehicle.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptVehicle, ST_AI>() { return "AIVehicle"; }
|
||||
|
||||
void SQAIVehicle_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptVehicle, ST_AI> SQAIVehicle("AIVehicle");
|
||||
SQAIVehicle.PreRegister(engine);
|
||||
SQAIVehicle.AddConstructor<void (ScriptVehicle::*)(), 1>(engine, "x");
|
||||
|
||||
SQAIVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_BASE, "ERR_VEHICLE_BASE");
|
||||
SQAIVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_TOO_MANY, "ERR_VEHICLE_TOO_MANY");
|
||||
SQAIVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_NOT_AVAILABLE, "ERR_VEHICLE_NOT_AVAILABLE");
|
||||
SQAIVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_BUILD_DISABLED, "ERR_VEHICLE_BUILD_DISABLED");
|
||||
SQAIVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_WRONG_DEPOT, "ERR_VEHICLE_WRONG_DEPOT");
|
||||
SQAIVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_CANNOT_SEND_TO_DEPOT, "ERR_VEHICLE_CANNOT_SEND_TO_DEPOT");
|
||||
SQAIVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_CANNOT_START_STOP, "ERR_VEHICLE_CANNOT_START_STOP");
|
||||
SQAIVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_CANNOT_TURN, "ERR_VEHICLE_CANNOT_TURN");
|
||||
SQAIVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_CANNOT_REFIT, "ERR_VEHICLE_CANNOT_REFIT");
|
||||
SQAIVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_IS_DESTROYED, "ERR_VEHICLE_IS_DESTROYED");
|
||||
SQAIVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_NOT_IN_DEPOT, "ERR_VEHICLE_NOT_IN_DEPOT");
|
||||
SQAIVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_IN_FLIGHT, "ERR_VEHICLE_IN_FLIGHT");
|
||||
SQAIVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_NO_POWER, "ERR_VEHICLE_NO_POWER");
|
||||
SQAIVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_TOO_LONG, "ERR_VEHICLE_TOO_LONG");
|
||||
SQAIVehicle.DefSQConst(engine, ScriptVehicle::VT_RAIL, "VT_RAIL");
|
||||
SQAIVehicle.DefSQConst(engine, ScriptVehicle::VT_ROAD, "VT_ROAD");
|
||||
SQAIVehicle.DefSQConst(engine, ScriptVehicle::VT_WATER, "VT_WATER");
|
||||
SQAIVehicle.DefSQConst(engine, ScriptVehicle::VT_AIR, "VT_AIR");
|
||||
SQAIVehicle.DefSQConst(engine, ScriptVehicle::VT_INVALID, "VT_INVALID");
|
||||
SQAIVehicle.DefSQConst(engine, ScriptVehicle::VS_RUNNING, "VS_RUNNING");
|
||||
SQAIVehicle.DefSQConst(engine, ScriptVehicle::VS_STOPPED, "VS_STOPPED");
|
||||
SQAIVehicle.DefSQConst(engine, ScriptVehicle::VS_IN_DEPOT, "VS_IN_DEPOT");
|
||||
SQAIVehicle.DefSQConst(engine, ScriptVehicle::VS_AT_STATION, "VS_AT_STATION");
|
||||
SQAIVehicle.DefSQConst(engine, ScriptVehicle::VS_BROKEN, "VS_BROKEN");
|
||||
SQAIVehicle.DefSQConst(engine, ScriptVehicle::VS_CRASHED, "VS_CRASHED");
|
||||
SQAIVehicle.DefSQConst(engine, ScriptVehicle::VS_INVALID, "VS_INVALID");
|
||||
|
||||
SQAIVehicle.DefSQConst(engine, ScriptVehicle::VEHICLE_INVALID, "VEHICLE_INVALID");
|
||||
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_TOO_MANY_VEHICLES_IN_GAME, ScriptVehicle::ERR_VEHICLE_TOO_MANY);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_AIRCRAFT_NOT_AVAILABLE, ScriptVehicle::ERR_VEHICLE_NOT_AVAILABLE);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_ROAD_VEHICLE_NOT_AVAILABLE, ScriptVehicle::ERR_VEHICLE_NOT_AVAILABLE);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_SHIP_NOT_AVAILABLE, ScriptVehicle::ERR_VEHICLE_NOT_AVAILABLE);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_RAIL_VEHICLE_NOT_AVAILABLE, ScriptVehicle::ERR_VEHICLE_NOT_AVAILABLE);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_BUY_TRAIN, ScriptVehicle::ERR_VEHICLE_BUILD_DISABLED);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_BUY_ROAD_VEHICLE, ScriptVehicle::ERR_VEHICLE_BUILD_DISABLED);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_BUY_SHIP, ScriptVehicle::ERR_VEHICLE_BUILD_DISABLED);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_BUY_AIRCRAFT, ScriptVehicle::ERR_VEHICLE_BUILD_DISABLED);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_DEPOT_WRONG_DEPOT_TYPE, ScriptVehicle::ERR_VEHICLE_WRONG_DEPOT);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_SEND_TRAIN_TO_DEPOT, ScriptVehicle::ERR_VEHICLE_CANNOT_SEND_TO_DEPOT);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_SEND_ROAD_VEHICLE_TO_DEPOT, ScriptVehicle::ERR_VEHICLE_CANNOT_SEND_TO_DEPOT);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_SEND_SHIP_TO_DEPOT, ScriptVehicle::ERR_VEHICLE_CANNOT_SEND_TO_DEPOT);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_SEND_AIRCRAFT_TO_HANGAR, ScriptVehicle::ERR_VEHICLE_CANNOT_SEND_TO_DEPOT);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_STOP_START_TRAIN, ScriptVehicle::ERR_VEHICLE_CANNOT_START_STOP);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_STOP_START_ROAD_VEHICLE, ScriptVehicle::ERR_VEHICLE_CANNOT_START_STOP);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_STOP_START_SHIP, ScriptVehicle::ERR_VEHICLE_CANNOT_START_STOP);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_STOP_START_AIRCRAFT, ScriptVehicle::ERR_VEHICLE_CANNOT_START_STOP);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_MAKE_ROAD_VEHICLE_TURN, ScriptVehicle::ERR_VEHICLE_CANNOT_TURN);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_REVERSE_DIRECTION_TRAIN, ScriptVehicle::ERR_VEHICLE_CANNOT_TURN);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_REVERSE_DIRECTION_RAIL_VEHICLE, ScriptVehicle::ERR_VEHICLE_CANNOT_TURN);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_REVERSE_DIRECTION_RAIL_VEHICLE_MULTIPLE_UNITS, ScriptVehicle::ERR_VEHICLE_CANNOT_TURN);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_REFIT_TRAIN, ScriptVehicle::ERR_VEHICLE_CANNOT_REFIT);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_REFIT_ROAD_VEHICLE, ScriptVehicle::ERR_VEHICLE_CANNOT_REFIT);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_REFIT_SHIP, ScriptVehicle::ERR_VEHICLE_CANNOT_REFIT);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_REFIT_AIRCRAFT, ScriptVehicle::ERR_VEHICLE_CANNOT_REFIT);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_VEHICLE_IS_DESTROYED, ScriptVehicle::ERR_VEHICLE_IS_DESTROYED);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_AIRCRAFT_MUST_BE_STOPPED_INSIDE_HANGAR, ScriptVehicle::ERR_VEHICLE_NOT_IN_DEPOT);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_ROAD_VEHICLE_MUST_BE_STOPPED_INSIDE_DEPOT, ScriptVehicle::ERR_VEHICLE_NOT_IN_DEPOT);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_TRAIN_MUST_BE_STOPPED_INSIDE_DEPOT, ScriptVehicle::ERR_VEHICLE_NOT_IN_DEPOT);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_SHIP_MUST_BE_STOPPED_INSIDE_DEPOT, ScriptVehicle::ERR_VEHICLE_NOT_IN_DEPOT);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_AIRCRAFT_IS_IN_FLIGHT, ScriptVehicle::ERR_VEHICLE_IN_FLIGHT);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_TRAIN_START_NO_POWER, ScriptVehicle::ERR_VEHICLE_NO_POWER);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_TRAIN_TOO_LONG, ScriptVehicle::ERR_VEHICLE_TOO_LONG);
|
||||
|
||||
ScriptError::RegisterErrorMapString(ScriptVehicle::ERR_VEHICLE_TOO_MANY, "ERR_VEHICLE_TOO_MANY");
|
||||
ScriptError::RegisterErrorMapString(ScriptVehicle::ERR_VEHICLE_NOT_AVAILABLE, "ERR_VEHICLE_NOT_AVAILABLE");
|
||||
ScriptError::RegisterErrorMapString(ScriptVehicle::ERR_VEHICLE_BUILD_DISABLED, "ERR_VEHICLE_BUILD_DISABLED");
|
||||
ScriptError::RegisterErrorMapString(ScriptVehicle::ERR_VEHICLE_WRONG_DEPOT, "ERR_VEHICLE_WRONG_DEPOT");
|
||||
ScriptError::RegisterErrorMapString(ScriptVehicle::ERR_VEHICLE_CANNOT_SEND_TO_DEPOT, "ERR_VEHICLE_CANNOT_SEND_TO_DEPOT");
|
||||
ScriptError::RegisterErrorMapString(ScriptVehicle::ERR_VEHICLE_CANNOT_START_STOP, "ERR_VEHICLE_CANNOT_START_STOP");
|
||||
ScriptError::RegisterErrorMapString(ScriptVehicle::ERR_VEHICLE_CANNOT_TURN, "ERR_VEHICLE_CANNOT_TURN");
|
||||
ScriptError::RegisterErrorMapString(ScriptVehicle::ERR_VEHICLE_CANNOT_REFIT, "ERR_VEHICLE_CANNOT_REFIT");
|
||||
ScriptError::RegisterErrorMapString(ScriptVehicle::ERR_VEHICLE_IS_DESTROYED, "ERR_VEHICLE_IS_DESTROYED");
|
||||
ScriptError::RegisterErrorMapString(ScriptVehicle::ERR_VEHICLE_NOT_IN_DEPOT, "ERR_VEHICLE_NOT_IN_DEPOT");
|
||||
ScriptError::RegisterErrorMapString(ScriptVehicle::ERR_VEHICLE_IN_FLIGHT, "ERR_VEHICLE_IN_FLIGHT");
|
||||
ScriptError::RegisterErrorMapString(ScriptVehicle::ERR_VEHICLE_NO_POWER, "ERR_VEHICLE_NO_POWER");
|
||||
ScriptError::RegisterErrorMapString(ScriptVehicle::ERR_VEHICLE_TOO_LONG, "ERR_VEHICLE_TOO_LONG");
|
||||
|
||||
SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::IsValidVehicle, "IsValidVehicle", 2, ".i");
|
||||
SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetNumWagons, "GetNumWagons", 2, ".i");
|
||||
SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::SetName, "SetName", 3, ".i.");
|
||||
SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetName, "GetName", 2, ".i");
|
||||
SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetLocation, "GetLocation", 2, ".i");
|
||||
SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetEngineType, "GetEngineType", 2, ".i");
|
||||
SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetWagonEngineType, "GetWagonEngineType", 3, ".ii");
|
||||
SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetUnitNumber, "GetUnitNumber", 2, ".i");
|
||||
SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetAge, "GetAge", 2, ".i");
|
||||
SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetWagonAge, "GetWagonAge", 3, ".ii");
|
||||
SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetMaxAge, "GetMaxAge", 2, ".i");
|
||||
SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetAgeLeft, "GetAgeLeft", 2, ".i");
|
||||
SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetCurrentSpeed, "GetCurrentSpeed", 2, ".i");
|
||||
SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetState, "GetState", 2, ".i");
|
||||
SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetRunningCost, "GetRunningCost", 2, ".i");
|
||||
SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetProfitThisYear, "GetProfitThisYear", 2, ".i");
|
||||
SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetProfitLastYear, "GetProfitLastYear", 2, ".i");
|
||||
SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetCurrentValue, "GetCurrentValue", 2, ".i");
|
||||
SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetVehicleType, "GetVehicleType", 2, ".i");
|
||||
SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetRoadType, "GetRoadType", 2, ".i");
|
||||
SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::IsInDepot, "IsInDepot", 2, ".i");
|
||||
SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::IsStoppedInDepot, "IsStoppedInDepot", 2, ".i");
|
||||
SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::BuildVehicle, "BuildVehicle", 3, ".ii");
|
||||
SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::BuildVehicleWithRefit, "BuildVehicleWithRefit", 4, ".iii");
|
||||
SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetBuildWithRefitCapacity, "GetBuildWithRefitCapacity", 4, ".iii");
|
||||
SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::CloneVehicle, "CloneVehicle", 4, ".iib");
|
||||
SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::MoveWagon, "MoveWagon", 5, ".iiii");
|
||||
SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::MoveWagonChain, "MoveWagonChain", 5, ".iiii");
|
||||
SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetRefitCapacity, "GetRefitCapacity", 3, ".ii");
|
||||
SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::RefitVehicle, "RefitVehicle", 3, ".ii");
|
||||
SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::SellVehicle, "SellVehicle", 2, ".i");
|
||||
SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::SellWagon, "SellWagon", 3, ".ii");
|
||||
SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::SellWagonChain, "SellWagonChain", 3, ".ii");
|
||||
SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::SendVehicleToDepot, "SendVehicleToDepot", 2, ".i");
|
||||
SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::SendVehicleToDepotForServicing, "SendVehicleToDepotForServicing", 2, ".i");
|
||||
SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::StartStopVehicle, "StartStopVehicle", 2, ".i");
|
||||
SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::ReverseVehicle, "ReverseVehicle", 2, ".i");
|
||||
SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetCapacity, "GetCapacity", 3, ".ii");
|
||||
SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetLength, "GetLength", 2, ".i");
|
||||
SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetCargoLoad, "GetCargoLoad", 3, ".ii");
|
||||
SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetGroupID, "GetGroupID", 2, ".i");
|
||||
SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::IsArticulated, "IsArticulated", 2, ".i");
|
||||
SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::HasSharedOrders, "HasSharedOrders", 2, ".i");
|
||||
SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetReliability, "GetReliability", 2, ".i");
|
||||
SQAIVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetMaximumOrderDistance, "GetMaximumOrderDistance", 2, ".i");
|
||||
|
||||
SQAIVehicle.PostRegister(engine);
|
||||
}
|
@ -1,83 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_vehiclelist.hpp"
|
||||
#include "../template/template_vehiclelist.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptVehicleList, ST_AI>() { return "AIVehicleList"; }
|
||||
|
||||
void SQAIVehicleList_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptVehicleList, ST_AI> SQAIVehicleList("AIVehicleList");
|
||||
SQAIVehicleList.PreRegister(engine, "AIList");
|
||||
SQAIVehicleList.AddConstructor<void (ScriptVehicleList::*)(), 1>(engine, "x");
|
||||
|
||||
SQAIVehicleList.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptVehicleList_Station, ST_AI>() { return "AIVehicleList_Station"; }
|
||||
|
||||
void SQAIVehicleList_Station_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptVehicleList_Station, ST_AI> SQAIVehicleList_Station("AIVehicleList_Station");
|
||||
SQAIVehicleList_Station.PreRegister(engine, "AIList");
|
||||
SQAIVehicleList_Station.AddConstructor<void (ScriptVehicleList_Station::*)(StationID station_id), 2>(engine, "xi");
|
||||
|
||||
SQAIVehicleList_Station.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptVehicleList_Depot, ST_AI>() { return "AIVehicleList_Depot"; }
|
||||
|
||||
void SQAIVehicleList_Depot_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptVehicleList_Depot, ST_AI> SQAIVehicleList_Depot("AIVehicleList_Depot");
|
||||
SQAIVehicleList_Depot.PreRegister(engine, "AIList");
|
||||
SQAIVehicleList_Depot.AddConstructor<void (ScriptVehicleList_Depot::*)(TileIndex tile), 2>(engine, "xi");
|
||||
|
||||
SQAIVehicleList_Depot.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptVehicleList_SharedOrders, ST_AI>() { return "AIVehicleList_SharedOrders"; }
|
||||
|
||||
void SQAIVehicleList_SharedOrders_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptVehicleList_SharedOrders, ST_AI> SQAIVehicleList_SharedOrders("AIVehicleList_SharedOrders");
|
||||
SQAIVehicleList_SharedOrders.PreRegister(engine, "AIList");
|
||||
SQAIVehicleList_SharedOrders.AddConstructor<void (ScriptVehicleList_SharedOrders::*)(VehicleID vehicle_id), 2>(engine, "xi");
|
||||
|
||||
SQAIVehicleList_SharedOrders.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptVehicleList_Group, ST_AI>() { return "AIVehicleList_Group"; }
|
||||
|
||||
void SQAIVehicleList_Group_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptVehicleList_Group, ST_AI> SQAIVehicleList_Group("AIVehicleList_Group");
|
||||
SQAIVehicleList_Group.PreRegister(engine, "AIList");
|
||||
SQAIVehicleList_Group.AddConstructor<void (ScriptVehicleList_Group::*)(GroupID group_id), 2>(engine, "xi");
|
||||
|
||||
SQAIVehicleList_Group.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptVehicleList_DefaultGroup, ST_AI>() { return "AIVehicleList_DefaultGroup"; }
|
||||
|
||||
void SQAIVehicleList_DefaultGroup_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptVehicleList_DefaultGroup, ST_AI> SQAIVehicleList_DefaultGroup("AIVehicleList_DefaultGroup");
|
||||
SQAIVehicleList_DefaultGroup.PreRegister(engine, "AIList");
|
||||
SQAIVehicleList_DefaultGroup.AddConstructor<void (ScriptVehicleList_DefaultGroup::*)(ScriptVehicle::VehicleType vehicle_type), 2>(engine, "xi");
|
||||
|
||||
SQAIVehicleList_DefaultGroup.PostRegister(engine);
|
||||
}
|
@ -1,40 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_waypoint.hpp"
|
||||
#include "../template/template_waypoint.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptWaypoint, ST_AI>() { return "AIWaypoint"; }
|
||||
|
||||
void SQAIWaypoint_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptWaypoint, ST_AI> SQAIWaypoint("AIWaypoint");
|
||||
SQAIWaypoint.PreRegister(engine, "AIBaseStation");
|
||||
SQAIWaypoint.AddConstructor<void (ScriptWaypoint::*)(), 1>(engine, "x");
|
||||
|
||||
SQAIWaypoint.DefSQConst(engine, ScriptWaypoint::ERR_WAYPOINT_BASE, "ERR_WAYPOINT_BASE");
|
||||
SQAIWaypoint.DefSQConst(engine, ScriptWaypoint::ERR_WAYPOINT_TOO_CLOSE_TO_ANOTHER_WAYPOINT, "ERR_WAYPOINT_TOO_CLOSE_TO_ANOTHER_WAYPOINT");
|
||||
SQAIWaypoint.DefSQConst(engine, ScriptWaypoint::ERR_WAYPOINT_ADJOINS_MULTIPLE_WAYPOINTS, "ERR_WAYPOINT_ADJOINS_MULTIPLE_WAYPOINTS");
|
||||
SQAIWaypoint.DefSQConst(engine, ScriptWaypoint::WAYPOINT_RAIL, "WAYPOINT_RAIL");
|
||||
SQAIWaypoint.DefSQConst(engine, ScriptWaypoint::WAYPOINT_BUOY, "WAYPOINT_BUOY");
|
||||
SQAIWaypoint.DefSQConst(engine, ScriptWaypoint::WAYPOINT_ANY, "WAYPOINT_ANY");
|
||||
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_TOO_CLOSE_TO_ANOTHER_WAYPOINT, ScriptWaypoint::ERR_WAYPOINT_TOO_CLOSE_TO_ANOTHER_WAYPOINT);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_WAYPOINT_ADJOINS_MORE_THAN_ONE_EXISTING, ScriptWaypoint::ERR_WAYPOINT_ADJOINS_MULTIPLE_WAYPOINTS);
|
||||
|
||||
ScriptError::RegisterErrorMapString(ScriptWaypoint::ERR_WAYPOINT_TOO_CLOSE_TO_ANOTHER_WAYPOINT, "ERR_WAYPOINT_TOO_CLOSE_TO_ANOTHER_WAYPOINT");
|
||||
ScriptError::RegisterErrorMapString(ScriptWaypoint::ERR_WAYPOINT_ADJOINS_MULTIPLE_WAYPOINTS, "ERR_WAYPOINT_ADJOINS_MULTIPLE_WAYPOINTS");
|
||||
|
||||
SQAIWaypoint.DefSQStaticMethod(engine, &ScriptWaypoint::IsValidWaypoint, "IsValidWaypoint", 2, ".i");
|
||||
SQAIWaypoint.DefSQStaticMethod(engine, &ScriptWaypoint::GetWaypointID, "GetWaypointID", 2, ".i");
|
||||
SQAIWaypoint.DefSQStaticMethod(engine, &ScriptWaypoint::HasWaypointType, "HasWaypointType", 3, ".ii");
|
||||
|
||||
SQAIWaypoint.PostRegister(engine);
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_waypointlist.hpp"
|
||||
#include "../template/template_waypointlist.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptWaypointList, ST_AI>() { return "AIWaypointList"; }
|
||||
|
||||
void SQAIWaypointList_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptWaypointList, ST_AI> SQAIWaypointList("AIWaypointList");
|
||||
SQAIWaypointList.PreRegister(engine, "AIList");
|
||||
SQAIWaypointList.AddConstructor<void (ScriptWaypointList::*)(ScriptWaypoint::WaypointType waypoint_type), 2>(engine, "xi");
|
||||
|
||||
SQAIWaypointList.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptWaypointList_Vehicle, ST_AI>() { return "AIWaypointList_Vehicle"; }
|
||||
|
||||
void SQAIWaypointList_Vehicle_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptWaypointList_Vehicle, ST_AI> SQAIWaypointList_Vehicle("AIWaypointList_Vehicle");
|
||||
SQAIWaypointList_Vehicle.PreRegister(engine, "AIList");
|
||||
SQAIWaypointList_Vehicle.AddConstructor<void (ScriptWaypointList_Vehicle::*)(VehicleID vehicle_id), 2>(engine, "xi");
|
||||
|
||||
SQAIWaypointList_Vehicle.PostRegister(engine);
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_accounting.hpp"
|
||||
#include "../template/template_accounting.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptAccounting, ST_GS>() { return "GSAccounting"; }
|
||||
|
||||
void SQGSAccounting_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptAccounting, ST_GS> SQGSAccounting("GSAccounting");
|
||||
SQGSAccounting.PreRegister(engine);
|
||||
SQGSAccounting.AddConstructor<void (ScriptAccounting::*)(), 1>(engine, "x");
|
||||
|
||||
SQGSAccounting.DefSQMethod(engine, &ScriptAccounting::GetCosts, "GetCosts", 1, "x");
|
||||
SQGSAccounting.DefSQMethod(engine, &ScriptAccounting::ResetCosts, "ResetCosts", 1, "x");
|
||||
|
||||
SQGSAccounting.PostRegister(engine);
|
||||
}
|
@ -1,25 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_admin.hpp"
|
||||
#include "../template/template_admin.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptAdmin, ST_GS>() { return "GSAdmin"; }
|
||||
|
||||
void SQGSAdmin_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptAdmin, ST_GS> SQGSAdmin("GSAdmin");
|
||||
SQGSAdmin.PreRegister(engine);
|
||||
SQGSAdmin.AddConstructor<void (ScriptAdmin::*)(), 1>(engine, "x");
|
||||
|
||||
SQGSAdmin.DefSQAdvancedStaticMethod(engine, &ScriptAdmin::Send, "Send");
|
||||
|
||||
SQGSAdmin.PostRegister(engine);
|
||||
}
|
@ -1,56 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_airport.hpp"
|
||||
#include "../template/template_airport.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptAirport, ST_GS>() { return "GSAirport"; }
|
||||
|
||||
void SQGSAirport_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptAirport, ST_GS> SQGSAirport("GSAirport");
|
||||
SQGSAirport.PreRegister(engine);
|
||||
SQGSAirport.AddConstructor<void (ScriptAirport::*)(), 1>(engine, "x");
|
||||
|
||||
SQGSAirport.DefSQConst(engine, ScriptAirport::AT_SMALL, "AT_SMALL");
|
||||
SQGSAirport.DefSQConst(engine, ScriptAirport::AT_LARGE, "AT_LARGE");
|
||||
SQGSAirport.DefSQConst(engine, ScriptAirport::AT_METROPOLITAN, "AT_METROPOLITAN");
|
||||
SQGSAirport.DefSQConst(engine, ScriptAirport::AT_INTERNATIONAL, "AT_INTERNATIONAL");
|
||||
SQGSAirport.DefSQConst(engine, ScriptAirport::AT_COMMUTER, "AT_COMMUTER");
|
||||
SQGSAirport.DefSQConst(engine, ScriptAirport::AT_INTERCON, "AT_INTERCON");
|
||||
SQGSAirport.DefSQConst(engine, ScriptAirport::AT_HELIPORT, "AT_HELIPORT");
|
||||
SQGSAirport.DefSQConst(engine, ScriptAirport::AT_HELISTATION, "AT_HELISTATION");
|
||||
SQGSAirport.DefSQConst(engine, ScriptAirport::AT_HELIDEPOT, "AT_HELIDEPOT");
|
||||
SQGSAirport.DefSQConst(engine, ScriptAirport::AT_INVALID, "AT_INVALID");
|
||||
SQGSAirport.DefSQConst(engine, ScriptAirport::PT_HELICOPTER, "PT_HELICOPTER");
|
||||
SQGSAirport.DefSQConst(engine, ScriptAirport::PT_SMALL_PLANE, "PT_SMALL_PLANE");
|
||||
SQGSAirport.DefSQConst(engine, ScriptAirport::PT_BIG_PLANE, "PT_BIG_PLANE");
|
||||
SQGSAirport.DefSQConst(engine, ScriptAirport::PT_INVALID, "PT_INVALID");
|
||||
|
||||
SQGSAirport.DefSQStaticMethod(engine, &ScriptAirport::IsValidAirportType, "IsValidAirportType", 2, ".i");
|
||||
SQGSAirport.DefSQStaticMethod(engine, &ScriptAirport::IsAirportInformationAvailable, "IsAirportInformationAvailable", 2, ".i");
|
||||
SQGSAirport.DefSQStaticMethod(engine, &ScriptAirport::GetPrice, "GetPrice", 2, ".i");
|
||||
SQGSAirport.DefSQStaticMethod(engine, &ScriptAirport::IsHangarTile, "IsHangarTile", 2, ".i");
|
||||
SQGSAirport.DefSQStaticMethod(engine, &ScriptAirport::IsAirportTile, "IsAirportTile", 2, ".i");
|
||||
SQGSAirport.DefSQStaticMethod(engine, &ScriptAirport::GetAirportWidth, "GetAirportWidth", 2, ".i");
|
||||
SQGSAirport.DefSQStaticMethod(engine, &ScriptAirport::GetAirportHeight, "GetAirportHeight", 2, ".i");
|
||||
SQGSAirport.DefSQStaticMethod(engine, &ScriptAirport::GetAirportCoverageRadius, "GetAirportCoverageRadius", 2, ".i");
|
||||
SQGSAirport.DefSQStaticMethod(engine, &ScriptAirport::GetNumHangars, "GetNumHangars", 2, ".i");
|
||||
SQGSAirport.DefSQStaticMethod(engine, &ScriptAirport::GetHangarOfAirport, "GetHangarOfAirport", 2, ".i");
|
||||
SQGSAirport.DefSQStaticMethod(engine, &ScriptAirport::BuildAirport, "BuildAirport", 4, ".iii");
|
||||
SQGSAirport.DefSQStaticMethod(engine, &ScriptAirport::RemoveAirport, "RemoveAirport", 2, ".i");
|
||||
SQGSAirport.DefSQStaticMethod(engine, &ScriptAirport::GetAirportType, "GetAirportType", 2, ".i");
|
||||
SQGSAirport.DefSQStaticMethod(engine, &ScriptAirport::GetNoiseLevelIncrease, "GetNoiseLevelIncrease", 3, ".ii");
|
||||
SQGSAirport.DefSQStaticMethod(engine, &ScriptAirport::GetNearestTown, "GetNearestTown", 3, ".ii");
|
||||
SQGSAirport.DefSQStaticMethod(engine, &ScriptAirport::GetMaintenanceCostFactor, "GetMaintenanceCostFactor", 2, ".i");
|
||||
SQGSAirport.DefSQStaticMethod(engine, &ScriptAirport::GetMonthlyMaintenanceCost, "GetMonthlyMaintenanceCost", 2, ".i");
|
||||
|
||||
SQGSAirport.PostRegister(engine);
|
||||
}
|
@ -1,30 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_base.hpp"
|
||||
#include "../template/template_base.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptBase, ST_GS>() { return "GSBase"; }
|
||||
|
||||
void SQGSBase_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptBase, ST_GS> SQGSBase("GSBase");
|
||||
SQGSBase.PreRegister(engine);
|
||||
SQGSBase.AddConstructor<void (ScriptBase::*)(), 1>(engine, "x");
|
||||
|
||||
SQGSBase.DefSQStaticMethod(engine, &ScriptBase::Rand, "Rand", 1, ".");
|
||||
SQGSBase.DefSQStaticMethod(engine, &ScriptBase::RandItem, "RandItem", 2, ".i");
|
||||
SQGSBase.DefSQStaticMethod(engine, &ScriptBase::RandRange, "RandRange", 2, ".i");
|
||||
SQGSBase.DefSQStaticMethod(engine, &ScriptBase::RandRangeItem, "RandRangeItem", 3, ".ii");
|
||||
SQGSBase.DefSQStaticMethod(engine, &ScriptBase::Chance, "Chance", 3, ".ii");
|
||||
SQGSBase.DefSQStaticMethod(engine, &ScriptBase::ChanceItem, "ChanceItem", 4, ".iii");
|
||||
|
||||
SQGSBase.PostRegister(engine);
|
||||
}
|
@ -1,33 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_basestation.hpp"
|
||||
#include "../template/template_basestation.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptBaseStation, ST_GS>() { return "GSBaseStation"; }
|
||||
|
||||
void SQGSBaseStation_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptBaseStation, ST_GS> SQGSBaseStation("GSBaseStation");
|
||||
SQGSBaseStation.PreRegister(engine);
|
||||
SQGSBaseStation.AddConstructor<void (ScriptBaseStation::*)(), 1>(engine, "x");
|
||||
|
||||
SQGSBaseStation.DefSQConst(engine, ScriptBaseStation::STATION_NEW, "STATION_NEW");
|
||||
SQGSBaseStation.DefSQConst(engine, ScriptBaseStation::STATION_JOIN_ADJACENT, "STATION_JOIN_ADJACENT");
|
||||
SQGSBaseStation.DefSQConst(engine, ScriptBaseStation::STATION_INVALID, "STATION_INVALID");
|
||||
|
||||
SQGSBaseStation.DefSQStaticMethod(engine, &ScriptBaseStation::IsValidBaseStation, "IsValidBaseStation", 2, ".i");
|
||||
SQGSBaseStation.DefSQStaticMethod(engine, &ScriptBaseStation::GetName, "GetName", 2, ".i");
|
||||
SQGSBaseStation.DefSQStaticMethod(engine, &ScriptBaseStation::SetName, "SetName", 3, ".i.");
|
||||
SQGSBaseStation.DefSQStaticMethod(engine, &ScriptBaseStation::GetLocation, "GetLocation", 2, ".i");
|
||||
SQGSBaseStation.DefSQStaticMethod(engine, &ScriptBaseStation::GetConstructionDate, "GetConstructionDate", 2, ".i");
|
||||
|
||||
SQGSBaseStation.PostRegister(engine);
|
||||
}
|
@ -1,48 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_bridge.hpp"
|
||||
#include "../template/template_bridge.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptBridge, ST_GS>() { return "GSBridge"; }
|
||||
|
||||
void SQGSBridge_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptBridge, ST_GS> SQGSBridge("GSBridge");
|
||||
SQGSBridge.PreRegister(engine);
|
||||
SQGSBridge.AddConstructor<void (ScriptBridge::*)(), 1>(engine, "x");
|
||||
|
||||
SQGSBridge.DefSQConst(engine, ScriptBridge::ERR_BRIDGE_BASE, "ERR_BRIDGE_BASE");
|
||||
SQGSBridge.DefSQConst(engine, ScriptBridge::ERR_BRIDGE_TYPE_UNAVAILABLE, "ERR_BRIDGE_TYPE_UNAVAILABLE");
|
||||
SQGSBridge.DefSQConst(engine, ScriptBridge::ERR_BRIDGE_CANNOT_END_IN_WATER, "ERR_BRIDGE_CANNOT_END_IN_WATER");
|
||||
SQGSBridge.DefSQConst(engine, ScriptBridge::ERR_BRIDGE_HEADS_NOT_ON_SAME_HEIGHT, "ERR_BRIDGE_HEADS_NOT_ON_SAME_HEIGHT");
|
||||
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_BUILD_BRIDGE_HERE, ScriptBridge::ERR_BRIDGE_TYPE_UNAVAILABLE);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_ENDS_OF_BRIDGE_MUST_BOTH, ScriptBridge::ERR_BRIDGE_CANNOT_END_IN_WATER);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_BRIDGEHEADS_NOT_SAME_HEIGHT, ScriptBridge::ERR_BRIDGE_HEADS_NOT_ON_SAME_HEIGHT);
|
||||
|
||||
ScriptError::RegisterErrorMapString(ScriptBridge::ERR_BRIDGE_TYPE_UNAVAILABLE, "ERR_BRIDGE_TYPE_UNAVAILABLE");
|
||||
ScriptError::RegisterErrorMapString(ScriptBridge::ERR_BRIDGE_CANNOT_END_IN_WATER, "ERR_BRIDGE_CANNOT_END_IN_WATER");
|
||||
ScriptError::RegisterErrorMapString(ScriptBridge::ERR_BRIDGE_HEADS_NOT_ON_SAME_HEIGHT, "ERR_BRIDGE_HEADS_NOT_ON_SAME_HEIGHT");
|
||||
|
||||
SQGSBridge.DefSQStaticMethod(engine, &ScriptBridge::IsValidBridge, "IsValidBridge", 2, ".i");
|
||||
SQGSBridge.DefSQStaticMethod(engine, &ScriptBridge::IsBridgeTile, "IsBridgeTile", 2, ".i");
|
||||
SQGSBridge.DefSQStaticMethod(engine, &ScriptBridge::GetBridgeID, "GetBridgeID", 2, ".i");
|
||||
SQGSBridge.DefSQStaticMethod(engine, &ScriptBridge::GetName, "GetName", 3, ".ii");
|
||||
SQGSBridge.DefSQStaticMethod(engine, &ScriptBridge::GetMaxSpeed, "GetMaxSpeed", 2, ".i");
|
||||
SQGSBridge.DefSQStaticMethod(engine, &ScriptBridge::GetPrice, "GetPrice", 3, ".ii");
|
||||
SQGSBridge.DefSQStaticMethod(engine, &ScriptBridge::GetMaxLength, "GetMaxLength", 2, ".i");
|
||||
SQGSBridge.DefSQStaticMethod(engine, &ScriptBridge::GetMinLength, "GetMinLength", 2, ".i");
|
||||
SQGSBridge.DefSQStaticMethod(engine, &ScriptBridge::BuildBridge, "BuildBridge", 5, ".iiii");
|
||||
SQGSBridge.DefSQStaticMethod(engine, &ScriptBridge::RemoveBridge, "RemoveBridge", 2, ".i");
|
||||
SQGSBridge.DefSQStaticMethod(engine, &ScriptBridge::GetOtherBridgeEnd, "GetOtherBridgeEnd", 2, ".i");
|
||||
|
||||
SQGSBridge.PostRegister(engine);
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_bridgelist.hpp"
|
||||
#include "../template/template_bridgelist.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptBridgeList, ST_GS>() { return "GSBridgeList"; }
|
||||
|
||||
void SQGSBridgeList_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptBridgeList, ST_GS> SQGSBridgeList("GSBridgeList");
|
||||
SQGSBridgeList.PreRegister(engine, "GSList");
|
||||
SQGSBridgeList.AddConstructor<void (ScriptBridgeList::*)(), 1>(engine, "x");
|
||||
|
||||
SQGSBridgeList.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptBridgeList_Length, ST_GS>() { return "GSBridgeList_Length"; }
|
||||
|
||||
void SQGSBridgeList_Length_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptBridgeList_Length, ST_GS> SQGSBridgeList_Length("GSBridgeList_Length");
|
||||
SQGSBridgeList_Length.PreRegister(engine, "GSList");
|
||||
SQGSBridgeList_Length.AddConstructor<void (ScriptBridgeList_Length::*)(uint length), 2>(engine, "xi");
|
||||
|
||||
SQGSBridgeList_Length.PostRegister(engine);
|
||||
}
|
@ -1,55 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_cargo.hpp"
|
||||
#include "../template/template_cargo.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptCargo, ST_GS>() { return "GSCargo"; }
|
||||
|
||||
void SQGSCargo_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptCargo, ST_GS> SQGSCargo("GSCargo");
|
||||
SQGSCargo.PreRegister(engine);
|
||||
SQGSCargo.AddConstructor<void (ScriptCargo::*)(), 1>(engine, "x");
|
||||
|
||||
SQGSCargo.DefSQConst(engine, ScriptCargo::CC_PASSENGERS, "CC_PASSENGERS");
|
||||
SQGSCargo.DefSQConst(engine, ScriptCargo::CC_MAIL, "CC_MAIL");
|
||||
SQGSCargo.DefSQConst(engine, ScriptCargo::CC_EXPRESS, "CC_EXPRESS");
|
||||
SQGSCargo.DefSQConst(engine, ScriptCargo::CC_ARMOURED, "CC_ARMOURED");
|
||||
SQGSCargo.DefSQConst(engine, ScriptCargo::CC_BULK, "CC_BULK");
|
||||
SQGSCargo.DefSQConst(engine, ScriptCargo::CC_PIECE_GOODS, "CC_PIECE_GOODS");
|
||||
SQGSCargo.DefSQConst(engine, ScriptCargo::CC_LIQUID, "CC_LIQUID");
|
||||
SQGSCargo.DefSQConst(engine, ScriptCargo::CC_REFRIGERATED, "CC_REFRIGERATED");
|
||||
SQGSCargo.DefSQConst(engine, ScriptCargo::CC_HAZARDOUS, "CC_HAZARDOUS");
|
||||
SQGSCargo.DefSQConst(engine, ScriptCargo::CC_COVERED, "CC_COVERED");
|
||||
SQGSCargo.DefSQConst(engine, ScriptCargo::TE_NONE, "TE_NONE");
|
||||
SQGSCargo.DefSQConst(engine, ScriptCargo::TE_PASSENGERS, "TE_PASSENGERS");
|
||||
SQGSCargo.DefSQConst(engine, ScriptCargo::TE_MAIL, "TE_MAIL");
|
||||
SQGSCargo.DefSQConst(engine, ScriptCargo::TE_GOODS, "TE_GOODS");
|
||||
SQGSCargo.DefSQConst(engine, ScriptCargo::TE_WATER, "TE_WATER");
|
||||
SQGSCargo.DefSQConst(engine, ScriptCargo::TE_FOOD, "TE_FOOD");
|
||||
SQGSCargo.DefSQConst(engine, ScriptCargo::CT_AUTO_REFIT, "CT_AUTO_REFIT");
|
||||
SQGSCargo.DefSQConst(engine, ScriptCargo::CT_NO_REFIT, "CT_NO_REFIT");
|
||||
SQGSCargo.DefSQConst(engine, ScriptCargo::DT_MANUAL, "DT_MANUAL");
|
||||
SQGSCargo.DefSQConst(engine, ScriptCargo::DT_ASYMMETRIC, "DT_ASYMMETRIC");
|
||||
SQGSCargo.DefSQConst(engine, ScriptCargo::DT_SYMMETRIC, "DT_SYMMETRIC");
|
||||
SQGSCargo.DefSQConst(engine, ScriptCargo::INVALID_DISTRIBUTION_TYPE, "INVALID_DISTRIBUTION_TYPE");
|
||||
|
||||
SQGSCargo.DefSQStaticMethod(engine, &ScriptCargo::IsValidCargo, "IsValidCargo", 2, ".i");
|
||||
SQGSCargo.DefSQStaticMethod(engine, &ScriptCargo::IsValidTownEffect, "IsValidTownEffect", 2, ".i");
|
||||
SQGSCargo.DefSQStaticMethod(engine, &ScriptCargo::GetCargoLabel, "GetCargoLabel", 2, ".i");
|
||||
SQGSCargo.DefSQStaticMethod(engine, &ScriptCargo::IsFreight, "IsFreight", 2, ".i");
|
||||
SQGSCargo.DefSQStaticMethod(engine, &ScriptCargo::HasCargoClass, "HasCargoClass", 3, ".ii");
|
||||
SQGSCargo.DefSQStaticMethod(engine, &ScriptCargo::GetTownEffect, "GetTownEffect", 2, ".i");
|
||||
SQGSCargo.DefSQStaticMethod(engine, &ScriptCargo::GetCargoIncome, "GetCargoIncome", 4, ".iii");
|
||||
SQGSCargo.DefSQStaticMethod(engine, &ScriptCargo::GetDistributionType, "GetDistributionType", 2, ".i");
|
||||
|
||||
SQGSCargo.PostRegister(engine);
|
||||
}
|
@ -1,59 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_cargolist.hpp"
|
||||
#include "../template/template_cargolist.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptCargoList, ST_GS>() { return "GSCargoList"; }
|
||||
|
||||
void SQGSCargoList_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptCargoList, ST_GS> SQGSCargoList("GSCargoList");
|
||||
SQGSCargoList.PreRegister(engine, "GSList");
|
||||
SQGSCargoList.AddConstructor<void (ScriptCargoList::*)(), 1>(engine, "x");
|
||||
|
||||
SQGSCargoList.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptCargoList_IndustryAccepting, ST_GS>() { return "GSCargoList_IndustryAccepting"; }
|
||||
|
||||
void SQGSCargoList_IndustryAccepting_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptCargoList_IndustryAccepting, ST_GS> SQGSCargoList_IndustryAccepting("GSCargoList_IndustryAccepting");
|
||||
SQGSCargoList_IndustryAccepting.PreRegister(engine, "GSList");
|
||||
SQGSCargoList_IndustryAccepting.AddConstructor<void (ScriptCargoList_IndustryAccepting::*)(IndustryID industry_id), 2>(engine, "xi");
|
||||
|
||||
SQGSCargoList_IndustryAccepting.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptCargoList_IndustryProducing, ST_GS>() { return "GSCargoList_IndustryProducing"; }
|
||||
|
||||
void SQGSCargoList_IndustryProducing_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptCargoList_IndustryProducing, ST_GS> SQGSCargoList_IndustryProducing("GSCargoList_IndustryProducing");
|
||||
SQGSCargoList_IndustryProducing.PreRegister(engine, "GSList");
|
||||
SQGSCargoList_IndustryProducing.AddConstructor<void (ScriptCargoList_IndustryProducing::*)(IndustryID industry_id), 2>(engine, "xi");
|
||||
|
||||
SQGSCargoList_IndustryProducing.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptCargoList_StationAccepting, ST_GS>() { return "GSCargoList_StationAccepting"; }
|
||||
|
||||
void SQGSCargoList_StationAccepting_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptCargoList_StationAccepting, ST_GS> SQGSCargoList_StationAccepting("GSCargoList_StationAccepting");
|
||||
SQGSCargoList_StationAccepting.PreRegister(engine, "GSList");
|
||||
SQGSCargoList_StationAccepting.AddConstructor<void (ScriptCargoList_StationAccepting::*)(StationID station_id), 2>(engine, "xi");
|
||||
|
||||
SQGSCargoList_StationAccepting.PostRegister(engine);
|
||||
}
|
@ -1,29 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_cargomonitor.hpp"
|
||||
#include "../template/template_cargomonitor.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptCargoMonitor, ST_GS>() { return "GSCargoMonitor"; }
|
||||
|
||||
void SQGSCargoMonitor_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptCargoMonitor, ST_GS> SQGSCargoMonitor("GSCargoMonitor");
|
||||
SQGSCargoMonitor.PreRegister(engine);
|
||||
SQGSCargoMonitor.AddConstructor<void (ScriptCargoMonitor::*)(), 1>(engine, "x");
|
||||
|
||||
SQGSCargoMonitor.DefSQStaticMethod(engine, &ScriptCargoMonitor::GetTownDeliveryAmount, "GetTownDeliveryAmount", 5, ".iiib");
|
||||
SQGSCargoMonitor.DefSQStaticMethod(engine, &ScriptCargoMonitor::GetIndustryDeliveryAmount, "GetIndustryDeliveryAmount", 5, ".iiib");
|
||||
SQGSCargoMonitor.DefSQStaticMethod(engine, &ScriptCargoMonitor::GetTownPickupAmount, "GetTownPickupAmount", 5, ".iiib");
|
||||
SQGSCargoMonitor.DefSQStaticMethod(engine, &ScriptCargoMonitor::GetIndustryPickupAmount, "GetIndustryPickupAmount", 5, ".iiib");
|
||||
SQGSCargoMonitor.DefSQStaticMethod(engine, &ScriptCargoMonitor::StopAllMonitoring, "StopAllMonitoring", 1, ".");
|
||||
|
||||
SQGSCargoMonitor.PostRegister(engine);
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_client.hpp"
|
||||
#include "../template/template_client.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptClient, ST_GS>() { return "GSClient"; }
|
||||
|
||||
void SQGSClient_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptClient, ST_GS> SQGSClient("GSClient");
|
||||
SQGSClient.PreRegister(engine);
|
||||
SQGSClient.AddConstructor<void (ScriptClient::*)(), 1>(engine, "x");
|
||||
|
||||
SQGSClient.DefSQConst(engine, ScriptClient::CLIENT_INVALID, "CLIENT_INVALID");
|
||||
SQGSClient.DefSQConst(engine, ScriptClient::CLIENT_SERVER, "CLIENT_SERVER");
|
||||
SQGSClient.DefSQConst(engine, ScriptClient::CLIENT_FIRST, "CLIENT_FIRST");
|
||||
|
||||
SQGSClient.DefSQStaticMethod(engine, &ScriptClient::ResolveClientID, "ResolveClientID", 2, ".i");
|
||||
SQGSClient.DefSQStaticMethod(engine, &ScriptClient::GetName, "GetName", 2, ".i");
|
||||
SQGSClient.DefSQStaticMethod(engine, &ScriptClient::GetCompany, "GetCompany", 2, ".i");
|
||||
SQGSClient.DefSQStaticMethod(engine, &ScriptClient::GetJoinDate, "GetJoinDate", 2, ".i");
|
||||
|
||||
SQGSClient.PostRegister(engine);
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_clientlist.hpp"
|
||||
#include "../template/template_clientlist.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptClientList, ST_GS>() { return "GSClientList"; }
|
||||
|
||||
void SQGSClientList_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptClientList, ST_GS> SQGSClientList("GSClientList");
|
||||
SQGSClientList.PreRegister(engine, "GSList");
|
||||
SQGSClientList.AddConstructor<void (ScriptClientList::*)(), 1>(engine, "x");
|
||||
|
||||
SQGSClientList.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptClientList_Company, ST_GS>() { return "GSClientList_Company"; }
|
||||
|
||||
void SQGSClientList_Company_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptClientList_Company, ST_GS> SQGSClientList_Company("GSClientList_Company");
|
||||
SQGSClientList_Company.PreRegister(engine, "GSList");
|
||||
SQGSClientList_Company.AddConstructor<void (ScriptClientList_Company::*)(ScriptCompany::CompanyID company), 2>(engine, "xi");
|
||||
|
||||
SQGSClientList_Company.PostRegister(engine);
|
||||
}
|
@ -1,117 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_company.hpp"
|
||||
#include "../template/template_company.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptCompany, ST_GS>() { return "GSCompany"; }
|
||||
|
||||
void SQGSCompany_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptCompany, ST_GS> SQGSCompany("GSCompany");
|
||||
SQGSCompany.PreRegister(engine);
|
||||
SQGSCompany.AddConstructor<void (ScriptCompany::*)(), 1>(engine, "x");
|
||||
|
||||
SQGSCompany.DefSQConst(engine, ScriptCompany::CURRENT_QUARTER, "CURRENT_QUARTER");
|
||||
SQGSCompany.DefSQConst(engine, ScriptCompany::EARLIEST_QUARTER, "EARLIEST_QUARTER");
|
||||
SQGSCompany.DefSQConst(engine, ScriptCompany::COMPANY_FIRST, "COMPANY_FIRST");
|
||||
SQGSCompany.DefSQConst(engine, ScriptCompany::COMPANY_LAST, "COMPANY_LAST");
|
||||
SQGSCompany.DefSQConst(engine, ScriptCompany::COMPANY_INVALID, "COMPANY_INVALID");
|
||||
SQGSCompany.DefSQConst(engine, ScriptCompany::COMPANY_SELF, "COMPANY_SELF");
|
||||
SQGSCompany.DefSQConst(engine, ScriptCompany::COMPANY_SPECTATOR, "COMPANY_SPECTATOR");
|
||||
SQGSCompany.DefSQConst(engine, ScriptCompany::GENDER_MALE, "GENDER_MALE");
|
||||
SQGSCompany.DefSQConst(engine, ScriptCompany::GENDER_FEMALE, "GENDER_FEMALE");
|
||||
SQGSCompany.DefSQConst(engine, ScriptCompany::GENDER_INVALID, "GENDER_INVALID");
|
||||
SQGSCompany.DefSQConst(engine, ScriptCompany::LS_DEFAULT, "LS_DEFAULT");
|
||||
SQGSCompany.DefSQConst(engine, ScriptCompany::LS_STEAM, "LS_STEAM");
|
||||
SQGSCompany.DefSQConst(engine, ScriptCompany::LS_DIESEL, "LS_DIESEL");
|
||||
SQGSCompany.DefSQConst(engine, ScriptCompany::LS_ELECTRIC, "LS_ELECTRIC");
|
||||
SQGSCompany.DefSQConst(engine, ScriptCompany::LS_MONORAIL, "LS_MONORAIL");
|
||||
SQGSCompany.DefSQConst(engine, ScriptCompany::LS_MAGLEV, "LS_MAGLEV");
|
||||
SQGSCompany.DefSQConst(engine, ScriptCompany::LS_DMU, "LS_DMU");
|
||||
SQGSCompany.DefSQConst(engine, ScriptCompany::LS_EMU, "LS_EMU");
|
||||
SQGSCompany.DefSQConst(engine, ScriptCompany::LS_PASSENGER_WAGON_STEAM, "LS_PASSENGER_WAGON_STEAM");
|
||||
SQGSCompany.DefSQConst(engine, ScriptCompany::LS_PASSENGER_WAGON_DIESEL, "LS_PASSENGER_WAGON_DIESEL");
|
||||
SQGSCompany.DefSQConst(engine, ScriptCompany::LS_PASSENGER_WAGON_ELECTRIC, "LS_PASSENGER_WAGON_ELECTRIC");
|
||||
SQGSCompany.DefSQConst(engine, ScriptCompany::LS_PASSENGER_WAGON_MONORAIL, "LS_PASSENGER_WAGON_MONORAIL");
|
||||
SQGSCompany.DefSQConst(engine, ScriptCompany::LS_PASSENGER_WAGON_MAGLEV, "LS_PASSENGER_WAGON_MAGLEV");
|
||||
SQGSCompany.DefSQConst(engine, ScriptCompany::LS_FREIGHT_WAGON, "LS_FREIGHT_WAGON");
|
||||
SQGSCompany.DefSQConst(engine, ScriptCompany::LS_BUS, "LS_BUS");
|
||||
SQGSCompany.DefSQConst(engine, ScriptCompany::LS_TRUCK, "LS_TRUCK");
|
||||
SQGSCompany.DefSQConst(engine, ScriptCompany::LS_PASSENGER_SHIP, "LS_PASSENGER_SHIP");
|
||||
SQGSCompany.DefSQConst(engine, ScriptCompany::LS_FREIGHT_SHIP, "LS_FREIGHT_SHIP");
|
||||
SQGSCompany.DefSQConst(engine, ScriptCompany::LS_HELICOPTER, "LS_HELICOPTER");
|
||||
SQGSCompany.DefSQConst(engine, ScriptCompany::LS_SMALL_PLANE, "LS_SMALL_PLANE");
|
||||
SQGSCompany.DefSQConst(engine, ScriptCompany::LS_LARGE_PLANE, "LS_LARGE_PLANE");
|
||||
SQGSCompany.DefSQConst(engine, ScriptCompany::LS_PASSENGER_TRAM, "LS_PASSENGER_TRAM");
|
||||
SQGSCompany.DefSQConst(engine, ScriptCompany::LS_FREIGHT_TRAM, "LS_FREIGHT_TRAM");
|
||||
SQGSCompany.DefSQConst(engine, ScriptCompany::LS_INVALID, "LS_INVALID");
|
||||
SQGSCompany.DefSQConst(engine, ScriptCompany::COLOUR_DARK_BLUE, "COLOUR_DARK_BLUE");
|
||||
SQGSCompany.DefSQConst(engine, ScriptCompany::COLOUR_PALE_GREEN, "COLOUR_PALE_GREEN");
|
||||
SQGSCompany.DefSQConst(engine, ScriptCompany::COLOUR_PINK, "COLOUR_PINK");
|
||||
SQGSCompany.DefSQConst(engine, ScriptCompany::COLOUR_YELLOW, "COLOUR_YELLOW");
|
||||
SQGSCompany.DefSQConst(engine, ScriptCompany::COLOUR_RED, "COLOUR_RED");
|
||||
SQGSCompany.DefSQConst(engine, ScriptCompany::COLOUR_LIGHT_BLUE, "COLOUR_LIGHT_BLUE");
|
||||
SQGSCompany.DefSQConst(engine, ScriptCompany::COLOUR_GREEN, "COLOUR_GREEN");
|
||||
SQGSCompany.DefSQConst(engine, ScriptCompany::COLOUR_DARK_GREEN, "COLOUR_DARK_GREEN");
|
||||
SQGSCompany.DefSQConst(engine, ScriptCompany::COLOUR_BLUE, "COLOUR_BLUE");
|
||||
SQGSCompany.DefSQConst(engine, ScriptCompany::COLOUR_CREAM, "COLOUR_CREAM");
|
||||
SQGSCompany.DefSQConst(engine, ScriptCompany::COLOUR_MAUVE, "COLOUR_MAUVE");
|
||||
SQGSCompany.DefSQConst(engine, ScriptCompany::COLOUR_PURPLE, "COLOUR_PURPLE");
|
||||
SQGSCompany.DefSQConst(engine, ScriptCompany::COLOUR_ORANGE, "COLOUR_ORANGE");
|
||||
SQGSCompany.DefSQConst(engine, ScriptCompany::COLOUR_BROWN, "COLOUR_BROWN");
|
||||
SQGSCompany.DefSQConst(engine, ScriptCompany::COLOUR_GREY, "COLOUR_GREY");
|
||||
SQGSCompany.DefSQConst(engine, ScriptCompany::COLOUR_WHITE, "COLOUR_WHITE");
|
||||
SQGSCompany.DefSQConst(engine, ScriptCompany::COLOUR_INVALID, "COLOUR_INVALID");
|
||||
SQGSCompany.DefSQConst(engine, ScriptCompany::EXPENSES_CONSTRUCTION, "EXPENSES_CONSTRUCTION");
|
||||
SQGSCompany.DefSQConst(engine, ScriptCompany::EXPENSES_NEW_VEHICLES, "EXPENSES_NEW_VEHICLES");
|
||||
SQGSCompany.DefSQConst(engine, ScriptCompany::EXPENSES_TRAIN_RUN, "EXPENSES_TRAIN_RUN");
|
||||
SQGSCompany.DefSQConst(engine, ScriptCompany::EXPENSES_ROADVEH_RUN, "EXPENSES_ROADVEH_RUN");
|
||||
SQGSCompany.DefSQConst(engine, ScriptCompany::EXPENSES_AIRCRAFT_RUN, "EXPENSES_AIRCRAFT_RUN");
|
||||
SQGSCompany.DefSQConst(engine, ScriptCompany::EXPENSES_SHIP_RUN, "EXPENSES_SHIP_RUN");
|
||||
SQGSCompany.DefSQConst(engine, ScriptCompany::EXPENSES_PROPERTY, "EXPENSES_PROPERTY");
|
||||
SQGSCompany.DefSQConst(engine, ScriptCompany::EXPENSES_TRAIN_INC, "EXPENSES_TRAIN_INC");
|
||||
SQGSCompany.DefSQConst(engine, ScriptCompany::EXPENSES_ROADVEH_INC, "EXPENSES_ROADVEH_INC");
|
||||
SQGSCompany.DefSQConst(engine, ScriptCompany::EXPENSES_AIRCRAFT_INC, "EXPENSES_AIRCRAFT_INC");
|
||||
SQGSCompany.DefSQConst(engine, ScriptCompany::EXPENSES_SHIP_INC, "EXPENSES_SHIP_INC");
|
||||
SQGSCompany.DefSQConst(engine, ScriptCompany::EXPENSES_LOAN_INT, "EXPENSES_LOAN_INT");
|
||||
SQGSCompany.DefSQConst(engine, ScriptCompany::EXPENSES_OTHER, "EXPENSES_OTHER");
|
||||
SQGSCompany.DefSQConst(engine, ScriptCompany::EXPENSES_INVALID, "EXPENSES_INVALID");
|
||||
|
||||
SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::ResolveCompanyID, "ResolveCompanyID", 2, ".i");
|
||||
SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::SetName, "SetName", 2, "..");
|
||||
SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::GetName, "GetName", 2, ".i");
|
||||
SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::SetPresidentName, "SetPresidentName", 2, "..");
|
||||
SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::GetPresidentName, "GetPresidentName", 2, ".i");
|
||||
SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::GetPresidentGender, "GetPresidentGender", 2, ".i");
|
||||
SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::SetLoanAmount, "SetLoanAmount", 2, ".i");
|
||||
SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::SetMinimumLoanAmount, "SetMinimumLoanAmount", 2, ".i");
|
||||
SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::GetLoanAmount, "GetLoanAmount", 1, ".");
|
||||
SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::GetMaxLoanAmount, "GetMaxLoanAmount", 1, ".");
|
||||
SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::GetLoanInterval, "GetLoanInterval", 1, ".");
|
||||
SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::GetBankBalance, "GetBankBalance", 2, ".i");
|
||||
SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::ChangeBankBalance, "ChangeBankBalance", 4, ".iii");
|
||||
SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::GetQuarterlyIncome, "GetQuarterlyIncome", 3, ".ii");
|
||||
SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::GetQuarterlyExpenses, "GetQuarterlyExpenses", 3, ".ii");
|
||||
SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::GetQuarterlyCargoDelivered, "GetQuarterlyCargoDelivered", 3, ".ii");
|
||||
SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::GetQuarterlyPerformanceRating, "GetQuarterlyPerformanceRating", 3, ".ii");
|
||||
SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::GetQuarterlyCompanyValue, "GetQuarterlyCompanyValue", 3, ".ii");
|
||||
SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::BuildCompanyHQ, "BuildCompanyHQ", 2, ".i");
|
||||
SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::GetCompanyHQ, "GetCompanyHQ", 2, ".i");
|
||||
SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::GetAutoRenewStatus, "GetAutoRenewStatus", 2, ".i");
|
||||
SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::GetAutoRenewMonths, "GetAutoRenewMonths", 2, ".i");
|
||||
SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::GetAutoRenewMoney, "GetAutoRenewMoney", 2, ".i");
|
||||
SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::SetPrimaryLiveryColour, "SetPrimaryLiveryColour", 3, ".ii");
|
||||
SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::SetSecondaryLiveryColour, "SetSecondaryLiveryColour", 3, ".ii");
|
||||
SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::GetPrimaryLiveryColour, "GetPrimaryLiveryColour", 2, ".i");
|
||||
SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::GetSecondaryLiveryColour, "GetSecondaryLiveryColour", 2, ".i");
|
||||
|
||||
SQGSCompany.PostRegister(engine);
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_companymode.hpp"
|
||||
#include "../template/template_companymode.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptCompanyMode, ST_GS>() { return "GSCompanyMode"; }
|
||||
|
||||
void SQGSCompanyMode_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptCompanyMode, ST_GS> SQGSCompanyMode("GSCompanyMode");
|
||||
SQGSCompanyMode.PreRegister(engine);
|
||||
SQGSCompanyMode.AddConstructor<void (ScriptCompanyMode::*)(int company), 2>(engine, "xi");
|
||||
|
||||
SQGSCompanyMode.PostRegister(engine);
|
||||
}
|
@ -1,33 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_date.hpp"
|
||||
#include "../template/template_date.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptDate, ST_GS>() { return "GSDate"; }
|
||||
|
||||
void SQGSDate_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptDate, ST_GS> SQGSDate("GSDate");
|
||||
SQGSDate.PreRegister(engine);
|
||||
SQGSDate.AddConstructor<void (ScriptDate::*)(), 1>(engine, "x");
|
||||
|
||||
SQGSDate.DefSQConst(engine, ScriptDate::DATE_INVALID, "DATE_INVALID");
|
||||
|
||||
SQGSDate.DefSQStaticMethod(engine, &ScriptDate::IsValidDate, "IsValidDate", 2, ".i");
|
||||
SQGSDate.DefSQStaticMethod(engine, &ScriptDate::GetCurrentDate, "GetCurrentDate", 1, ".");
|
||||
SQGSDate.DefSQStaticMethod(engine, &ScriptDate::GetYear, "GetYear", 2, ".i");
|
||||
SQGSDate.DefSQStaticMethod(engine, &ScriptDate::GetMonth, "GetMonth", 2, ".i");
|
||||
SQGSDate.DefSQStaticMethod(engine, &ScriptDate::GetDayOfMonth, "GetDayOfMonth", 2, ".i");
|
||||
SQGSDate.DefSQStaticMethod(engine, &ScriptDate::GetDate, "GetDate", 4, ".iii");
|
||||
SQGSDate.DefSQStaticMethod(engine, &ScriptDate::GetSystemTime, "GetSystemTime", 1, ".");
|
||||
|
||||
SQGSDate.PostRegister(engine);
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_depotlist.hpp"
|
||||
#include "../template/template_depotlist.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptDepotList, ST_GS>() { return "GSDepotList"; }
|
||||
|
||||
void SQGSDepotList_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptDepotList, ST_GS> SQGSDepotList("GSDepotList");
|
||||
SQGSDepotList.PreRegister(engine, "GSList");
|
||||
SQGSDepotList.AddConstructor<void (ScriptDepotList::*)(ScriptTile::TransportType transport_type), 2>(engine, "xi");
|
||||
|
||||
SQGSDepotList.PostRegister(engine);
|
||||
}
|
@ -1,53 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_engine.hpp"
|
||||
#include "../template/template_engine.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptEngine, ST_GS>() { return "GSEngine"; }
|
||||
|
||||
void SQGSEngine_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptEngine, ST_GS> SQGSEngine("GSEngine");
|
||||
SQGSEngine.PreRegister(engine);
|
||||
SQGSEngine.AddConstructor<void (ScriptEngine::*)(), 1>(engine, "x");
|
||||
|
||||
SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::IsValidEngine, "IsValidEngine", 2, ".i");
|
||||
SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::IsBuildable, "IsBuildable", 2, ".i");
|
||||
SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::GetName, "GetName", 2, ".i");
|
||||
SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::GetCargoType, "GetCargoType", 2, ".i");
|
||||
SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::CanRefitCargo, "CanRefitCargo", 3, ".ii");
|
||||
SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::CanPullCargo, "CanPullCargo", 3, ".ii");
|
||||
SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::GetCapacity, "GetCapacity", 2, ".i");
|
||||
SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::GetReliability, "GetReliability", 2, ".i");
|
||||
SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::GetMaxSpeed, "GetMaxSpeed", 2, ".i");
|
||||
SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::GetPrice, "GetPrice", 2, ".i");
|
||||
SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::GetMaxAge, "GetMaxAge", 2, ".i");
|
||||
SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::GetRunningCost, "GetRunningCost", 2, ".i");
|
||||
SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::GetPower, "GetPower", 2, ".i");
|
||||
SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::GetWeight, "GetWeight", 2, ".i");
|
||||
SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::GetMaxTractiveEffort, "GetMaxTractiveEffort", 2, ".i");
|
||||
SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::GetDesignDate, "GetDesignDate", 2, ".i");
|
||||
SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::GetVehicleType, "GetVehicleType", 2, ".i");
|
||||
SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::IsWagon, "IsWagon", 2, ".i");
|
||||
SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::CanRunOnRail, "CanRunOnRail", 3, ".ii");
|
||||
SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::HasPowerOnRail, "HasPowerOnRail", 3, ".ii");
|
||||
SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::CanRunOnRoad, "CanRunOnRoad", 3, ".ii");
|
||||
SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::HasPowerOnRoad, "HasPowerOnRoad", 3, ".ii");
|
||||
SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::GetRoadType, "GetRoadType", 2, ".i");
|
||||
SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::GetRailType, "GetRailType", 2, ".i");
|
||||
SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::IsArticulated, "IsArticulated", 2, ".i");
|
||||
SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::GetPlaneType, "GetPlaneType", 2, ".i");
|
||||
SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::GetMaximumOrderDistance, "GetMaximumOrderDistance", 2, ".i");
|
||||
SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::EnableForCompany, "EnableForCompany", 3, ".ii");
|
||||
SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::DisableForCompany, "DisableForCompany", 3, ".ii");
|
||||
|
||||
SQGSEngine.PostRegister(engine);
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_enginelist.hpp"
|
||||
#include "../template/template_enginelist.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptEngineList, ST_GS>() { return "GSEngineList"; }
|
||||
|
||||
void SQGSEngineList_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptEngineList, ST_GS> SQGSEngineList("GSEngineList");
|
||||
SQGSEngineList.PreRegister(engine, "GSList");
|
||||
SQGSEngineList.AddConstructor<void (ScriptEngineList::*)(ScriptVehicle::VehicleType vehicle_type), 2>(engine, "xi");
|
||||
|
||||
SQGSEngineList.PostRegister(engine);
|
||||
}
|
@ -1,120 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_error.hpp"
|
||||
#include "../template/template_error.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptError, ST_GS>() { return "GSError"; }
|
||||
|
||||
void SQGSError_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptError, ST_GS> SQGSError("GSError");
|
||||
SQGSError.PreRegister(engine);
|
||||
SQGSError.AddConstructor<void (ScriptError::*)(), 1>(engine, "x");
|
||||
|
||||
SQGSError.DefSQConst(engine, ScriptError::ERR_CAT_NONE, "ERR_CAT_NONE");
|
||||
SQGSError.DefSQConst(engine, ScriptError::ERR_CAT_GENERAL, "ERR_CAT_GENERAL");
|
||||
SQGSError.DefSQConst(engine, ScriptError::ERR_CAT_VEHICLE, "ERR_CAT_VEHICLE");
|
||||
SQGSError.DefSQConst(engine, ScriptError::ERR_CAT_STATION, "ERR_CAT_STATION");
|
||||
SQGSError.DefSQConst(engine, ScriptError::ERR_CAT_BRIDGE, "ERR_CAT_BRIDGE");
|
||||
SQGSError.DefSQConst(engine, ScriptError::ERR_CAT_TUNNEL, "ERR_CAT_TUNNEL");
|
||||
SQGSError.DefSQConst(engine, ScriptError::ERR_CAT_TILE, "ERR_CAT_TILE");
|
||||
SQGSError.DefSQConst(engine, ScriptError::ERR_CAT_SIGN, "ERR_CAT_SIGN");
|
||||
SQGSError.DefSQConst(engine, ScriptError::ERR_CAT_RAIL, "ERR_CAT_RAIL");
|
||||
SQGSError.DefSQConst(engine, ScriptError::ERR_CAT_ROAD, "ERR_CAT_ROAD");
|
||||
SQGSError.DefSQConst(engine, ScriptError::ERR_CAT_ORDER, "ERR_CAT_ORDER");
|
||||
SQGSError.DefSQConst(engine, ScriptError::ERR_CAT_MARINE, "ERR_CAT_MARINE");
|
||||
SQGSError.DefSQConst(engine, ScriptError::ERR_CAT_WAYPOINT, "ERR_CAT_WAYPOINT");
|
||||
SQGSError.DefSQConst(engine, ScriptError::ERR_CAT_BIT_SIZE, "ERR_CAT_BIT_SIZE");
|
||||
SQGSError.DefSQConst(engine, ScriptError::ERR_NONE, "ERR_NONE");
|
||||
SQGSError.DefSQConst(engine, ScriptError::ERR_UNKNOWN, "ERR_UNKNOWN");
|
||||
SQGSError.DefSQConst(engine, ScriptError::ERR_PRECONDITION_FAILED, "ERR_PRECONDITION_FAILED");
|
||||
SQGSError.DefSQConst(engine, ScriptError::ERR_PRECONDITION_STRING_TOO_LONG, "ERR_PRECONDITION_STRING_TOO_LONG");
|
||||
SQGSError.DefSQConst(engine, ScriptError::ERR_PRECONDITION_TOO_MANY_PARAMETERS, "ERR_PRECONDITION_TOO_MANY_PARAMETERS");
|
||||
SQGSError.DefSQConst(engine, ScriptError::ERR_PRECONDITION_INVALID_COMPANY, "ERR_PRECONDITION_INVALID_COMPANY");
|
||||
SQGSError.DefSQConst(engine, ScriptError::ERR_NEWGRF_SUPPLIED_ERROR, "ERR_NEWGRF_SUPPLIED_ERROR");
|
||||
SQGSError.DefSQConst(engine, ScriptError::ERR_GENERAL_BASE, "ERR_GENERAL_BASE");
|
||||
SQGSError.DefSQConst(engine, ScriptError::ERR_NOT_ENOUGH_CASH, "ERR_NOT_ENOUGH_CASH");
|
||||
SQGSError.DefSQConst(engine, ScriptError::ERR_LOCAL_AUTHORITY_REFUSES, "ERR_LOCAL_AUTHORITY_REFUSES");
|
||||
SQGSError.DefSQConst(engine, ScriptError::ERR_ALREADY_BUILT, "ERR_ALREADY_BUILT");
|
||||
SQGSError.DefSQConst(engine, ScriptError::ERR_AREA_NOT_CLEAR, "ERR_AREA_NOT_CLEAR");
|
||||
SQGSError.DefSQConst(engine, ScriptError::ERR_OWNED_BY_ANOTHER_COMPANY, "ERR_OWNED_BY_ANOTHER_COMPANY");
|
||||
SQGSError.DefSQConst(engine, ScriptError::ERR_NAME_IS_NOT_UNIQUE, "ERR_NAME_IS_NOT_UNIQUE");
|
||||
SQGSError.DefSQConst(engine, ScriptError::ERR_FLAT_LAND_REQUIRED, "ERR_FLAT_LAND_REQUIRED");
|
||||
SQGSError.DefSQConst(engine, ScriptError::ERR_LAND_SLOPED_WRONG, "ERR_LAND_SLOPED_WRONG");
|
||||
SQGSError.DefSQConst(engine, ScriptError::ERR_VEHICLE_IN_THE_WAY, "ERR_VEHICLE_IN_THE_WAY");
|
||||
SQGSError.DefSQConst(engine, ScriptError::ERR_SITE_UNSUITABLE, "ERR_SITE_UNSUITABLE");
|
||||
SQGSError.DefSQConst(engine, ScriptError::ERR_TOO_CLOSE_TO_EDGE, "ERR_TOO_CLOSE_TO_EDGE");
|
||||
SQGSError.DefSQConst(engine, ScriptError::ERR_STATION_TOO_SPREAD_OUT, "ERR_STATION_TOO_SPREAD_OUT");
|
||||
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_NOT_ENOUGH_CASH_REQUIRES_CURRENCY, ScriptError::ERR_NOT_ENOUGH_CASH);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_LOCAL_AUTHORITY_REFUSES_TO_ALLOW_THIS, ScriptError::ERR_LOCAL_AUTHORITY_REFUSES);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_LOCAL_AUTHORITY_REFUSES_NOISE, ScriptError::ERR_LOCAL_AUTHORITY_REFUSES);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_ALREADY_BUILT, ScriptError::ERR_ALREADY_BUILT);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST, ScriptError::ERR_ALREADY_BUILT);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_TREE_ALREADY_HERE, ScriptError::ERR_ALREADY_BUILT);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_BUILDING_MUST_BE_DEMOLISHED, ScriptError::ERR_AREA_NOT_CLEAR);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST, ScriptError::ERR_AREA_NOT_CLEAR);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_MUST_DEMOLISH_RAILROAD, ScriptError::ERR_AREA_NOT_CLEAR);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_MUST_DEMOLISH_AIRPORT_FIRST, ScriptError::ERR_AREA_NOT_CLEAR);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_MUST_DEMOLISH_CARGO_TRAM_STATION_FIRST, ScriptError::ERR_AREA_NOT_CLEAR);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_MUST_DEMOLISH_TRUCK_STATION_FIRST, ScriptError::ERR_AREA_NOT_CLEAR);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_MUST_DEMOLISH_PASSENGER_TRAM_STATION_FIRST, ScriptError::ERR_AREA_NOT_CLEAR);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_MUST_DEMOLISH_BUS_STATION_FIRST, ScriptError::ERR_AREA_NOT_CLEAR);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_BUOY_IN_THE_WAY, ScriptError::ERR_AREA_NOT_CLEAR);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_MUST_DEMOLISH_DOCK_FIRST, ScriptError::ERR_AREA_NOT_CLEAR);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_GENERIC_OBJECT_IN_THE_WAY, ScriptError::ERR_AREA_NOT_CLEAR);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_COMPANY_HEADQUARTERS_IN, ScriptError::ERR_AREA_NOT_CLEAR);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_OBJECT_IN_THE_WAY, ScriptError::ERR_AREA_NOT_CLEAR);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_MUST_REMOVE_ROAD_FIRST, ScriptError::ERR_AREA_NOT_CLEAR);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_MUST_REMOVE_RAILROAD_TRACK, ScriptError::ERR_AREA_NOT_CLEAR);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST, ScriptError::ERR_AREA_NOT_CLEAR);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_MUST_DEMOLISH_TUNNEL_FIRST, ScriptError::ERR_AREA_NOT_CLEAR);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_EXCAVATION_WOULD_DAMAGE, ScriptError::ERR_AREA_NOT_CLEAR);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_AREA_IS_OWNED_BY_ANOTHER, ScriptError::ERR_OWNED_BY_ANOTHER_COMPANY);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_OWNED_BY, ScriptError::ERR_OWNED_BY_ANOTHER_COMPANY);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_NAME_MUST_BE_UNIQUE, ScriptError::ERR_NAME_IS_NOT_UNIQUE);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_FLAT_LAND_REQUIRED, ScriptError::ERR_FLAT_LAND_REQUIRED);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_LAND_SLOPED_IN_WRONG_DIRECTION, ScriptError::ERR_LAND_SLOPED_WRONG);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_TRAIN_IN_THE_WAY, ScriptError::ERR_VEHICLE_IN_THE_WAY);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_ROAD_VEHICLE_IN_THE_WAY, ScriptError::ERR_VEHICLE_IN_THE_WAY);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_SHIP_IN_THE_WAY, ScriptError::ERR_VEHICLE_IN_THE_WAY);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_AIRCRAFT_IN_THE_WAY, ScriptError::ERR_VEHICLE_IN_THE_WAY);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_SITE_UNSUITABLE, ScriptError::ERR_SITE_UNSUITABLE);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_TREE_WRONG_TERRAIN_FOR_TREE_TYPE, ScriptError::ERR_SITE_UNSUITABLE);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_TOO_CLOSE_TO_EDGE_OF_MAP, ScriptError::ERR_TOO_CLOSE_TO_EDGE);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_STATION_TOO_SPREAD_OUT, ScriptError::ERR_STATION_TOO_SPREAD_OUT);
|
||||
|
||||
ScriptError::RegisterErrorMapString(ScriptError::ERR_NONE, "ERR_NONE");
|
||||
ScriptError::RegisterErrorMapString(ScriptError::ERR_UNKNOWN, "ERR_UNKNOWN");
|
||||
ScriptError::RegisterErrorMapString(ScriptError::ERR_PRECONDITION_FAILED, "ERR_PRECONDITION_FAILED");
|
||||
ScriptError::RegisterErrorMapString(ScriptError::ERR_PRECONDITION_STRING_TOO_LONG, "ERR_PRECONDITION_STRING_TOO_LONG");
|
||||
ScriptError::RegisterErrorMapString(ScriptError::ERR_PRECONDITION_TOO_MANY_PARAMETERS, "ERR_PRECONDITION_TOO_MANY_PARAMETERS");
|
||||
ScriptError::RegisterErrorMapString(ScriptError::ERR_PRECONDITION_INVALID_COMPANY, "ERR_PRECONDITION_INVALID_COMPANY");
|
||||
ScriptError::RegisterErrorMapString(ScriptError::ERR_NEWGRF_SUPPLIED_ERROR, "ERR_NEWGRF_SUPPLIED_ERROR");
|
||||
ScriptError::RegisterErrorMapString(ScriptError::ERR_NOT_ENOUGH_CASH, "ERR_NOT_ENOUGH_CASH");
|
||||
ScriptError::RegisterErrorMapString(ScriptError::ERR_LOCAL_AUTHORITY_REFUSES, "ERR_LOCAL_AUTHORITY_REFUSES");
|
||||
ScriptError::RegisterErrorMapString(ScriptError::ERR_ALREADY_BUILT, "ERR_ALREADY_BUILT");
|
||||
ScriptError::RegisterErrorMapString(ScriptError::ERR_AREA_NOT_CLEAR, "ERR_AREA_NOT_CLEAR");
|
||||
ScriptError::RegisterErrorMapString(ScriptError::ERR_OWNED_BY_ANOTHER_COMPANY, "ERR_OWNED_BY_ANOTHER_COMPANY");
|
||||
ScriptError::RegisterErrorMapString(ScriptError::ERR_NAME_IS_NOT_UNIQUE, "ERR_NAME_IS_NOT_UNIQUE");
|
||||
ScriptError::RegisterErrorMapString(ScriptError::ERR_FLAT_LAND_REQUIRED, "ERR_FLAT_LAND_REQUIRED");
|
||||
ScriptError::RegisterErrorMapString(ScriptError::ERR_LAND_SLOPED_WRONG, "ERR_LAND_SLOPED_WRONG");
|
||||
ScriptError::RegisterErrorMapString(ScriptError::ERR_VEHICLE_IN_THE_WAY, "ERR_VEHICLE_IN_THE_WAY");
|
||||
ScriptError::RegisterErrorMapString(ScriptError::ERR_SITE_UNSUITABLE, "ERR_SITE_UNSUITABLE");
|
||||
ScriptError::RegisterErrorMapString(ScriptError::ERR_TOO_CLOSE_TO_EDGE, "ERR_TOO_CLOSE_TO_EDGE");
|
||||
ScriptError::RegisterErrorMapString(ScriptError::ERR_STATION_TOO_SPREAD_OUT, "ERR_STATION_TOO_SPREAD_OUT");
|
||||
|
||||
SQGSError.DefSQStaticMethod(engine, &ScriptError::GetErrorCategory, "GetErrorCategory", 1, ".");
|
||||
SQGSError.DefSQStaticMethod(engine, &ScriptError::GetLastError, "GetLastError", 1, ".");
|
||||
SQGSError.DefSQStaticMethod(engine, &ScriptError::GetLastErrorString, "GetLastErrorString", 1, ".");
|
||||
|
||||
SQGSError.PostRegister(engine);
|
||||
}
|
@ -1,74 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_event.hpp"
|
||||
#include "../template/template_event.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptEvent, ST_GS>() { return "GSEvent"; }
|
||||
|
||||
void SQGSEvent_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptEvent, ST_GS> SQGSEvent("GSEvent");
|
||||
SQGSEvent.PreRegister(engine);
|
||||
SQGSEvent.AddConstructor<void (ScriptEvent::*)(ScriptEvent::ScriptEventType type), 2>(engine, "xi");
|
||||
|
||||
SQGSEvent.DefSQConst(engine, ScriptEvent::ET_INVALID, "ET_INVALID");
|
||||
SQGSEvent.DefSQConst(engine, ScriptEvent::ET_TEST, "ET_TEST");
|
||||
SQGSEvent.DefSQConst(engine, ScriptEvent::ET_SUBSIDY_OFFER, "ET_SUBSIDY_OFFER");
|
||||
SQGSEvent.DefSQConst(engine, ScriptEvent::ET_SUBSIDY_OFFER_EXPIRED, "ET_SUBSIDY_OFFER_EXPIRED");
|
||||
SQGSEvent.DefSQConst(engine, ScriptEvent::ET_SUBSIDY_AWARDED, "ET_SUBSIDY_AWARDED");
|
||||
SQGSEvent.DefSQConst(engine, ScriptEvent::ET_SUBSIDY_EXPIRED, "ET_SUBSIDY_EXPIRED");
|
||||
SQGSEvent.DefSQConst(engine, ScriptEvent::ET_ENGINE_PREVIEW, "ET_ENGINE_PREVIEW");
|
||||
SQGSEvent.DefSQConst(engine, ScriptEvent::ET_COMPANY_NEW, "ET_COMPANY_NEW");
|
||||
SQGSEvent.DefSQConst(engine, ScriptEvent::ET_COMPANY_IN_TROUBLE, "ET_COMPANY_IN_TROUBLE");
|
||||
SQGSEvent.DefSQConst(engine, ScriptEvent::ET_COMPANY_ASK_MERGER, "ET_COMPANY_ASK_MERGER");
|
||||
SQGSEvent.DefSQConst(engine, ScriptEvent::ET_COMPANY_MERGER, "ET_COMPANY_MERGER");
|
||||
SQGSEvent.DefSQConst(engine, ScriptEvent::ET_COMPANY_BANKRUPT, "ET_COMPANY_BANKRUPT");
|
||||
SQGSEvent.DefSQConst(engine, ScriptEvent::ET_VEHICLE_CRASHED, "ET_VEHICLE_CRASHED");
|
||||
SQGSEvent.DefSQConst(engine, ScriptEvent::ET_VEHICLE_LOST, "ET_VEHICLE_LOST");
|
||||
SQGSEvent.DefSQConst(engine, ScriptEvent::ET_VEHICLE_WAITING_IN_DEPOT, "ET_VEHICLE_WAITING_IN_DEPOT");
|
||||
SQGSEvent.DefSQConst(engine, ScriptEvent::ET_VEHICLE_UNPROFITABLE, "ET_VEHICLE_UNPROFITABLE");
|
||||
SQGSEvent.DefSQConst(engine, ScriptEvent::ET_INDUSTRY_OPEN, "ET_INDUSTRY_OPEN");
|
||||
SQGSEvent.DefSQConst(engine, ScriptEvent::ET_INDUSTRY_CLOSE, "ET_INDUSTRY_CLOSE");
|
||||
SQGSEvent.DefSQConst(engine, ScriptEvent::ET_ENGINE_AVAILABLE, "ET_ENGINE_AVAILABLE");
|
||||
SQGSEvent.DefSQConst(engine, ScriptEvent::ET_STATION_FIRST_VEHICLE, "ET_STATION_FIRST_VEHICLE");
|
||||
SQGSEvent.DefSQConst(engine, ScriptEvent::ET_DISASTER_ZEPPELINER_CRASHED, "ET_DISASTER_ZEPPELINER_CRASHED");
|
||||
SQGSEvent.DefSQConst(engine, ScriptEvent::ET_DISASTER_ZEPPELINER_CLEARED, "ET_DISASTER_ZEPPELINER_CLEARED");
|
||||
SQGSEvent.DefSQConst(engine, ScriptEvent::ET_TOWN_FOUNDED, "ET_TOWN_FOUNDED");
|
||||
SQGSEvent.DefSQConst(engine, ScriptEvent::ET_AIRCRAFT_DEST_TOO_FAR, "ET_AIRCRAFT_DEST_TOO_FAR");
|
||||
SQGSEvent.DefSQConst(engine, ScriptEvent::ET_ADMIN_PORT, "ET_ADMIN_PORT");
|
||||
SQGSEvent.DefSQConst(engine, ScriptEvent::ET_WINDOW_WIDGET_CLICK, "ET_WINDOW_WIDGET_CLICK");
|
||||
SQGSEvent.DefSQConst(engine, ScriptEvent::ET_GOAL_QUESTION_ANSWER, "ET_GOAL_QUESTION_ANSWER");
|
||||
SQGSEvent.DefSQConst(engine, ScriptEvent::ET_EXCLUSIVE_TRANSPORT_RIGHTS, "ET_EXCLUSIVE_TRANSPORT_RIGHTS");
|
||||
SQGSEvent.DefSQConst(engine, ScriptEvent::ET_ROAD_RECONSTRUCTION, "ET_ROAD_RECONSTRUCTION");
|
||||
SQGSEvent.DefSQConst(engine, ScriptEvent::ET_VEHICLE_AUTOREPLACED, "ET_VEHICLE_AUTOREPLACED");
|
||||
SQGSEvent.DefSQConst(engine, ScriptEvent::ET_STORYPAGE_BUTTON_CLICK, "ET_STORYPAGE_BUTTON_CLICK");
|
||||
SQGSEvent.DefSQConst(engine, ScriptEvent::ET_STORYPAGE_TILE_SELECT, "ET_STORYPAGE_TILE_SELECT");
|
||||
SQGSEvent.DefSQConst(engine, ScriptEvent::ET_STORYPAGE_VEHICLE_SELECT, "ET_STORYPAGE_VEHICLE_SELECT");
|
||||
|
||||
SQGSEvent.DefSQMethod(engine, &ScriptEvent::GetEventType, "GetEventType", 1, "x");
|
||||
|
||||
SQGSEvent.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptEventController, ST_GS>() { return "GSEventController"; }
|
||||
|
||||
void SQGSEventController_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptEventController, ST_GS> SQGSEventController("GSEventController");
|
||||
SQGSEventController.PreRegister(engine);
|
||||
SQGSEventController.AddConstructor<void (ScriptEventController::*)(), 1>(engine, "x");
|
||||
|
||||
SQGSEventController.DefSQStaticMethod(engine, &ScriptEventController::IsEventWaiting, "IsEventWaiting", 1, ".");
|
||||
SQGSEventController.DefSQStaticMethod(engine, &ScriptEventController::GetNextEvent, "GetNextEvent", 1, ".");
|
||||
|
||||
SQGSEventController.PostRegister(engine);
|
||||
}
|
@ -1,363 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_event_types.hpp"
|
||||
#include "../template/template_event_types.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptEventVehicleCrashed, ST_GS>() { return "GSEventVehicleCrashed"; }
|
||||
|
||||
void SQGSEventVehicleCrashed_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptEventVehicleCrashed, ST_GS> SQGSEventVehicleCrashed("GSEventVehicleCrashed");
|
||||
SQGSEventVehicleCrashed.PreRegister(engine, "GSEvent");
|
||||
|
||||
SQGSEventVehicleCrashed.DefSQConst(engine, ScriptEventVehicleCrashed::CRASH_TRAIN, "CRASH_TRAIN");
|
||||
SQGSEventVehicleCrashed.DefSQConst(engine, ScriptEventVehicleCrashed::CRASH_RV_LEVEL_CROSSING, "CRASH_RV_LEVEL_CROSSING");
|
||||
SQGSEventVehicleCrashed.DefSQConst(engine, ScriptEventVehicleCrashed::CRASH_RV_UFO, "CRASH_RV_UFO");
|
||||
SQGSEventVehicleCrashed.DefSQConst(engine, ScriptEventVehicleCrashed::CRASH_PLANE_LANDING, "CRASH_PLANE_LANDING");
|
||||
SQGSEventVehicleCrashed.DefSQConst(engine, ScriptEventVehicleCrashed::CRASH_AIRCRAFT_NO_AIRPORT, "CRASH_AIRCRAFT_NO_AIRPORT");
|
||||
SQGSEventVehicleCrashed.DefSQConst(engine, ScriptEventVehicleCrashed::CRASH_FLOODED, "CRASH_FLOODED");
|
||||
|
||||
SQGSEventVehicleCrashed.DefSQStaticMethod(engine, &ScriptEventVehicleCrashed::Convert, "Convert", 2, ".x");
|
||||
|
||||
SQGSEventVehicleCrashed.DefSQMethod(engine, &ScriptEventVehicleCrashed::GetVehicleID, "GetVehicleID", 1, "x");
|
||||
SQGSEventVehicleCrashed.DefSQMethod(engine, &ScriptEventVehicleCrashed::GetCrashSite, "GetCrashSite", 1, "x");
|
||||
SQGSEventVehicleCrashed.DefSQMethod(engine, &ScriptEventVehicleCrashed::GetCrashReason, "GetCrashReason", 1, "x");
|
||||
|
||||
SQGSEventVehicleCrashed.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptEventSubsidyOffer, ST_GS>() { return "GSEventSubsidyOffer"; }
|
||||
|
||||
void SQGSEventSubsidyOffer_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptEventSubsidyOffer, ST_GS> SQGSEventSubsidyOffer("GSEventSubsidyOffer");
|
||||
SQGSEventSubsidyOffer.PreRegister(engine, "GSEvent");
|
||||
|
||||
SQGSEventSubsidyOffer.DefSQStaticMethod(engine, &ScriptEventSubsidyOffer::Convert, "Convert", 2, ".x");
|
||||
|
||||
SQGSEventSubsidyOffer.DefSQMethod(engine, &ScriptEventSubsidyOffer::GetSubsidyID, "GetSubsidyID", 1, "x");
|
||||
|
||||
SQGSEventSubsidyOffer.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptEventSubsidyOfferExpired, ST_GS>() { return "GSEventSubsidyOfferExpired"; }
|
||||
|
||||
void SQGSEventSubsidyOfferExpired_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptEventSubsidyOfferExpired, ST_GS> SQGSEventSubsidyOfferExpired("GSEventSubsidyOfferExpired");
|
||||
SQGSEventSubsidyOfferExpired.PreRegister(engine, "GSEvent");
|
||||
|
||||
SQGSEventSubsidyOfferExpired.DefSQStaticMethod(engine, &ScriptEventSubsidyOfferExpired::Convert, "Convert", 2, ".x");
|
||||
|
||||
SQGSEventSubsidyOfferExpired.DefSQMethod(engine, &ScriptEventSubsidyOfferExpired::GetSubsidyID, "GetSubsidyID", 1, "x");
|
||||
|
||||
SQGSEventSubsidyOfferExpired.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptEventSubsidyAwarded, ST_GS>() { return "GSEventSubsidyAwarded"; }
|
||||
|
||||
void SQGSEventSubsidyAwarded_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptEventSubsidyAwarded, ST_GS> SQGSEventSubsidyAwarded("GSEventSubsidyAwarded");
|
||||
SQGSEventSubsidyAwarded.PreRegister(engine, "GSEvent");
|
||||
|
||||
SQGSEventSubsidyAwarded.DefSQStaticMethod(engine, &ScriptEventSubsidyAwarded::Convert, "Convert", 2, ".x");
|
||||
|
||||
SQGSEventSubsidyAwarded.DefSQMethod(engine, &ScriptEventSubsidyAwarded::GetSubsidyID, "GetSubsidyID", 1, "x");
|
||||
|
||||
SQGSEventSubsidyAwarded.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptEventSubsidyExpired, ST_GS>() { return "GSEventSubsidyExpired"; }
|
||||
|
||||
void SQGSEventSubsidyExpired_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptEventSubsidyExpired, ST_GS> SQGSEventSubsidyExpired("GSEventSubsidyExpired");
|
||||
SQGSEventSubsidyExpired.PreRegister(engine, "GSEvent");
|
||||
|
||||
SQGSEventSubsidyExpired.DefSQStaticMethod(engine, &ScriptEventSubsidyExpired::Convert, "Convert", 2, ".x");
|
||||
|
||||
SQGSEventSubsidyExpired.DefSQMethod(engine, &ScriptEventSubsidyExpired::GetSubsidyID, "GetSubsidyID", 1, "x");
|
||||
|
||||
SQGSEventSubsidyExpired.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptEventCompanyNew, ST_GS>() { return "GSEventCompanyNew"; }
|
||||
|
||||
void SQGSEventCompanyNew_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptEventCompanyNew, ST_GS> SQGSEventCompanyNew("GSEventCompanyNew");
|
||||
SQGSEventCompanyNew.PreRegister(engine, "GSEvent");
|
||||
|
||||
SQGSEventCompanyNew.DefSQStaticMethod(engine, &ScriptEventCompanyNew::Convert, "Convert", 2, ".x");
|
||||
|
||||
SQGSEventCompanyNew.DefSQMethod(engine, &ScriptEventCompanyNew::GetCompanyID, "GetCompanyID", 1, "x");
|
||||
|
||||
SQGSEventCompanyNew.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptEventCompanyInTrouble, ST_GS>() { return "GSEventCompanyInTrouble"; }
|
||||
|
||||
void SQGSEventCompanyInTrouble_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptEventCompanyInTrouble, ST_GS> SQGSEventCompanyInTrouble("GSEventCompanyInTrouble");
|
||||
SQGSEventCompanyInTrouble.PreRegister(engine, "GSEvent");
|
||||
|
||||
SQGSEventCompanyInTrouble.DefSQStaticMethod(engine, &ScriptEventCompanyInTrouble::Convert, "Convert", 2, ".x");
|
||||
|
||||
SQGSEventCompanyInTrouble.DefSQMethod(engine, &ScriptEventCompanyInTrouble::GetCompanyID, "GetCompanyID", 1, "x");
|
||||
|
||||
SQGSEventCompanyInTrouble.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptEventCompanyMerger, ST_GS>() { return "GSEventCompanyMerger"; }
|
||||
|
||||
void SQGSEventCompanyMerger_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptEventCompanyMerger, ST_GS> SQGSEventCompanyMerger("GSEventCompanyMerger");
|
||||
SQGSEventCompanyMerger.PreRegister(engine, "GSEvent");
|
||||
|
||||
SQGSEventCompanyMerger.DefSQStaticMethod(engine, &ScriptEventCompanyMerger::Convert, "Convert", 2, ".x");
|
||||
|
||||
SQGSEventCompanyMerger.DefSQMethod(engine, &ScriptEventCompanyMerger::GetOldCompanyID, "GetOldCompanyID", 1, "x");
|
||||
SQGSEventCompanyMerger.DefSQMethod(engine, &ScriptEventCompanyMerger::GetNewCompanyID, "GetNewCompanyID", 1, "x");
|
||||
|
||||
SQGSEventCompanyMerger.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptEventCompanyBankrupt, ST_GS>() { return "GSEventCompanyBankrupt"; }
|
||||
|
||||
void SQGSEventCompanyBankrupt_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptEventCompanyBankrupt, ST_GS> SQGSEventCompanyBankrupt("GSEventCompanyBankrupt");
|
||||
SQGSEventCompanyBankrupt.PreRegister(engine, "GSEvent");
|
||||
|
||||
SQGSEventCompanyBankrupt.DefSQStaticMethod(engine, &ScriptEventCompanyBankrupt::Convert, "Convert", 2, ".x");
|
||||
|
||||
SQGSEventCompanyBankrupt.DefSQMethod(engine, &ScriptEventCompanyBankrupt::GetCompanyID, "GetCompanyID", 1, "x");
|
||||
|
||||
SQGSEventCompanyBankrupt.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptEventIndustryOpen, ST_GS>() { return "GSEventIndustryOpen"; }
|
||||
|
||||
void SQGSEventIndustryOpen_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptEventIndustryOpen, ST_GS> SQGSEventIndustryOpen("GSEventIndustryOpen");
|
||||
SQGSEventIndustryOpen.PreRegister(engine, "GSEvent");
|
||||
|
||||
SQGSEventIndustryOpen.DefSQStaticMethod(engine, &ScriptEventIndustryOpen::Convert, "Convert", 2, ".x");
|
||||
|
||||
SQGSEventIndustryOpen.DefSQMethod(engine, &ScriptEventIndustryOpen::GetIndustryID, "GetIndustryID", 1, "x");
|
||||
|
||||
SQGSEventIndustryOpen.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptEventIndustryClose, ST_GS>() { return "GSEventIndustryClose"; }
|
||||
|
||||
void SQGSEventIndustryClose_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptEventIndustryClose, ST_GS> SQGSEventIndustryClose("GSEventIndustryClose");
|
||||
SQGSEventIndustryClose.PreRegister(engine, "GSEvent");
|
||||
|
||||
SQGSEventIndustryClose.DefSQStaticMethod(engine, &ScriptEventIndustryClose::Convert, "Convert", 2, ".x");
|
||||
|
||||
SQGSEventIndustryClose.DefSQMethod(engine, &ScriptEventIndustryClose::GetIndustryID, "GetIndustryID", 1, "x");
|
||||
|
||||
SQGSEventIndustryClose.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptEventStationFirstVehicle, ST_GS>() { return "GSEventStationFirstVehicle"; }
|
||||
|
||||
void SQGSEventStationFirstVehicle_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptEventStationFirstVehicle, ST_GS> SQGSEventStationFirstVehicle("GSEventStationFirstVehicle");
|
||||
SQGSEventStationFirstVehicle.PreRegister(engine, "GSEvent");
|
||||
|
||||
SQGSEventStationFirstVehicle.DefSQStaticMethod(engine, &ScriptEventStationFirstVehicle::Convert, "Convert", 2, ".x");
|
||||
|
||||
SQGSEventStationFirstVehicle.DefSQMethod(engine, &ScriptEventStationFirstVehicle::GetStationID, "GetStationID", 1, "x");
|
||||
SQGSEventStationFirstVehicle.DefSQMethod(engine, &ScriptEventStationFirstVehicle::GetVehicleID, "GetVehicleID", 1, "x");
|
||||
|
||||
SQGSEventStationFirstVehicle.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptEventTownFounded, ST_GS>() { return "GSEventTownFounded"; }
|
||||
|
||||
void SQGSEventTownFounded_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptEventTownFounded, ST_GS> SQGSEventTownFounded("GSEventTownFounded");
|
||||
SQGSEventTownFounded.PreRegister(engine, "GSEvent");
|
||||
|
||||
SQGSEventTownFounded.DefSQStaticMethod(engine, &ScriptEventTownFounded::Convert, "Convert", 2, ".x");
|
||||
|
||||
SQGSEventTownFounded.DefSQMethod(engine, &ScriptEventTownFounded::GetTownID, "GetTownID", 1, "x");
|
||||
|
||||
SQGSEventTownFounded.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptEventAdminPort, ST_GS>() { return "GSEventAdminPort"; }
|
||||
|
||||
void SQGSEventAdminPort_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptEventAdminPort, ST_GS> SQGSEventAdminPort("GSEventAdminPort");
|
||||
SQGSEventAdminPort.PreRegister(engine, "GSEvent");
|
||||
|
||||
SQGSEventAdminPort.DefSQStaticMethod(engine, &ScriptEventAdminPort::Convert, "Convert", 2, ".x");
|
||||
|
||||
SQGSEventAdminPort.DefSQAdvancedMethod(engine, &ScriptEventAdminPort::GetObject, "GetObject");
|
||||
|
||||
SQGSEventAdminPort.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptEventWindowWidgetClick, ST_GS>() { return "GSEventWindowWidgetClick"; }
|
||||
|
||||
void SQGSEventWindowWidgetClick_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptEventWindowWidgetClick, ST_GS> SQGSEventWindowWidgetClick("GSEventWindowWidgetClick");
|
||||
SQGSEventWindowWidgetClick.PreRegister(engine, "GSEvent");
|
||||
|
||||
SQGSEventWindowWidgetClick.DefSQStaticMethod(engine, &ScriptEventWindowWidgetClick::Convert, "Convert", 2, ".x");
|
||||
|
||||
SQGSEventWindowWidgetClick.DefSQMethod(engine, &ScriptEventWindowWidgetClick::GetWindowClass, "GetWindowClass", 1, "x");
|
||||
SQGSEventWindowWidgetClick.DefSQMethod(engine, &ScriptEventWindowWidgetClick::GetWindowNumber, "GetWindowNumber", 1, "x");
|
||||
SQGSEventWindowWidgetClick.DefSQMethod(engine, &ScriptEventWindowWidgetClick::GetWidgetNumber, "GetWidgetNumber", 1, "x");
|
||||
|
||||
SQGSEventWindowWidgetClick.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptEventGoalQuestionAnswer, ST_GS>() { return "GSEventGoalQuestionAnswer"; }
|
||||
|
||||
void SQGSEventGoalQuestionAnswer_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptEventGoalQuestionAnswer, ST_GS> SQGSEventGoalQuestionAnswer("GSEventGoalQuestionAnswer");
|
||||
SQGSEventGoalQuestionAnswer.PreRegister(engine, "GSEvent");
|
||||
|
||||
SQGSEventGoalQuestionAnswer.DefSQStaticMethod(engine, &ScriptEventGoalQuestionAnswer::Convert, "Convert", 2, ".x");
|
||||
|
||||
SQGSEventGoalQuestionAnswer.DefSQMethod(engine, &ScriptEventGoalQuestionAnswer::GetUniqueID, "GetUniqueID", 1, "x");
|
||||
SQGSEventGoalQuestionAnswer.DefSQMethod(engine, &ScriptEventGoalQuestionAnswer::GetCompany, "GetCompany", 1, "x");
|
||||
SQGSEventGoalQuestionAnswer.DefSQMethod(engine, &ScriptEventGoalQuestionAnswer::GetButton, "GetButton", 1, "x");
|
||||
|
||||
SQGSEventGoalQuestionAnswer.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptEventCompanyTown, ST_GS>() { return "GSEventCompanyTown"; }
|
||||
|
||||
void SQGSEventCompanyTown_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptEventCompanyTown, ST_GS> SQGSEventCompanyTown("GSEventCompanyTown");
|
||||
SQGSEventCompanyTown.PreRegister(engine, "GSEvent");
|
||||
|
||||
SQGSEventCompanyTown.DefSQStaticMethod(engine, &ScriptEventCompanyTown::Convert, "Convert", 2, ".x");
|
||||
|
||||
SQGSEventCompanyTown.DefSQMethod(engine, &ScriptEventCompanyTown::GetCompanyID, "GetCompanyID", 1, "x");
|
||||
SQGSEventCompanyTown.DefSQMethod(engine, &ScriptEventCompanyTown::GetTownID, "GetTownID", 1, "x");
|
||||
|
||||
SQGSEventCompanyTown.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptEventExclusiveTransportRights, ST_GS>() { return "GSEventExclusiveTransportRights"; }
|
||||
|
||||
void SQGSEventExclusiveTransportRights_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptEventExclusiveTransportRights, ST_GS> SQGSEventExclusiveTransportRights("GSEventExclusiveTransportRights");
|
||||
SQGSEventExclusiveTransportRights.PreRegister(engine, "GSEventCompanyTown");
|
||||
SQGSEventExclusiveTransportRights.AddConstructor<void (ScriptEventExclusiveTransportRights::*)(ScriptCompany::CompanyID company, TownID town), 3>(engine, "xii");
|
||||
|
||||
SQGSEventExclusiveTransportRights.DefSQStaticMethod(engine, &ScriptEventExclusiveTransportRights::Convert, "Convert", 2, ".x");
|
||||
|
||||
SQGSEventExclusiveTransportRights.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptEventRoadReconstruction, ST_GS>() { return "GSEventRoadReconstruction"; }
|
||||
|
||||
void SQGSEventRoadReconstruction_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptEventRoadReconstruction, ST_GS> SQGSEventRoadReconstruction("GSEventRoadReconstruction");
|
||||
SQGSEventRoadReconstruction.PreRegister(engine, "GSEventCompanyTown");
|
||||
SQGSEventRoadReconstruction.AddConstructor<void (ScriptEventRoadReconstruction::*)(ScriptCompany::CompanyID company, TownID town), 3>(engine, "xii");
|
||||
|
||||
SQGSEventRoadReconstruction.DefSQStaticMethod(engine, &ScriptEventRoadReconstruction::Convert, "Convert", 2, ".x");
|
||||
|
||||
SQGSEventRoadReconstruction.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptEventStoryPageButtonClick, ST_GS>() { return "GSEventStoryPageButtonClick"; }
|
||||
|
||||
void SQGSEventStoryPageButtonClick_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptEventStoryPageButtonClick, ST_GS> SQGSEventStoryPageButtonClick("GSEventStoryPageButtonClick");
|
||||
SQGSEventStoryPageButtonClick.PreRegister(engine, "GSEvent");
|
||||
|
||||
SQGSEventStoryPageButtonClick.DefSQStaticMethod(engine, &ScriptEventStoryPageButtonClick::Convert, "Convert", 2, ".x");
|
||||
|
||||
SQGSEventStoryPageButtonClick.DefSQMethod(engine, &ScriptEventStoryPageButtonClick::GetCompanyID, "GetCompanyID", 1, "x");
|
||||
SQGSEventStoryPageButtonClick.DefSQMethod(engine, &ScriptEventStoryPageButtonClick::GetStoryPageID, "GetStoryPageID", 1, "x");
|
||||
SQGSEventStoryPageButtonClick.DefSQMethod(engine, &ScriptEventStoryPageButtonClick::GetElementID, "GetElementID", 1, "x");
|
||||
|
||||
SQGSEventStoryPageButtonClick.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptEventStoryPageTileSelect, ST_GS>() { return "GSEventStoryPageTileSelect"; }
|
||||
|
||||
void SQGSEventStoryPageTileSelect_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptEventStoryPageTileSelect, ST_GS> SQGSEventStoryPageTileSelect("GSEventStoryPageTileSelect");
|
||||
SQGSEventStoryPageTileSelect.PreRegister(engine, "GSEvent");
|
||||
|
||||
SQGSEventStoryPageTileSelect.DefSQStaticMethod(engine, &ScriptEventStoryPageTileSelect::Convert, "Convert", 2, ".x");
|
||||
|
||||
SQGSEventStoryPageTileSelect.DefSQMethod(engine, &ScriptEventStoryPageTileSelect::GetCompanyID, "GetCompanyID", 1, "x");
|
||||
SQGSEventStoryPageTileSelect.DefSQMethod(engine, &ScriptEventStoryPageTileSelect::GetStoryPageID, "GetStoryPageID", 1, "x");
|
||||
SQGSEventStoryPageTileSelect.DefSQMethod(engine, &ScriptEventStoryPageTileSelect::GetElementID, "GetElementID", 1, "x");
|
||||
SQGSEventStoryPageTileSelect.DefSQMethod(engine, &ScriptEventStoryPageTileSelect::GetTile, "GetTile", 1, "x");
|
||||
|
||||
SQGSEventStoryPageTileSelect.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptEventStoryPageVehicleSelect, ST_GS>() { return "GSEventStoryPageVehicleSelect"; }
|
||||
|
||||
void SQGSEventStoryPageVehicleSelect_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptEventStoryPageVehicleSelect, ST_GS> SQGSEventStoryPageVehicleSelect("GSEventStoryPageVehicleSelect");
|
||||
SQGSEventStoryPageVehicleSelect.PreRegister(engine, "GSEvent");
|
||||
|
||||
SQGSEventStoryPageVehicleSelect.DefSQStaticMethod(engine, &ScriptEventStoryPageVehicleSelect::Convert, "Convert", 2, ".x");
|
||||
|
||||
SQGSEventStoryPageVehicleSelect.DefSQMethod(engine, &ScriptEventStoryPageVehicleSelect::GetCompanyID, "GetCompanyID", 1, "x");
|
||||
SQGSEventStoryPageVehicleSelect.DefSQMethod(engine, &ScriptEventStoryPageVehicleSelect::GetStoryPageID, "GetStoryPageID", 1, "x");
|
||||
SQGSEventStoryPageVehicleSelect.DefSQMethod(engine, &ScriptEventStoryPageVehicleSelect::GetElementID, "GetElementID", 1, "x");
|
||||
SQGSEventStoryPageVehicleSelect.DefSQMethod(engine, &ScriptEventStoryPageVehicleSelect::GetVehicleID, "GetVehicleID", 1, "x");
|
||||
|
||||
SQGSEventStoryPageVehicleSelect.PostRegister(engine);
|
||||
}
|
@ -1,34 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_game.hpp"
|
||||
#include "../template/template_game.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptGame, ST_GS>() { return "GSGame"; }
|
||||
|
||||
void SQGSGame_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptGame, ST_GS> SQGSGame("GSGame");
|
||||
SQGSGame.PreRegister(engine);
|
||||
SQGSGame.AddConstructor<void (ScriptGame::*)(), 1>(engine, "x");
|
||||
|
||||
SQGSGame.DefSQConst(engine, ScriptGame::LT_TEMPERATE, "LT_TEMPERATE");
|
||||
SQGSGame.DefSQConst(engine, ScriptGame::LT_ARCTIC, "LT_ARCTIC");
|
||||
SQGSGame.DefSQConst(engine, ScriptGame::LT_TROPIC, "LT_TROPIC");
|
||||
SQGSGame.DefSQConst(engine, ScriptGame::LT_TOYLAND, "LT_TOYLAND");
|
||||
|
||||
SQGSGame.DefSQStaticMethod(engine, &ScriptGame::Pause, "Pause", 1, ".");
|
||||
SQGSGame.DefSQStaticMethod(engine, &ScriptGame::Unpause, "Unpause", 1, ".");
|
||||
SQGSGame.DefSQStaticMethod(engine, &ScriptGame::IsPaused, "IsPaused", 1, ".");
|
||||
SQGSGame.DefSQStaticMethod(engine, &ScriptGame::GetLandscape, "GetLandscape", 1, ".");
|
||||
SQGSGame.DefSQStaticMethod(engine, &ScriptGame::IsMultiplayer, "IsMultiplayer", 1, ".");
|
||||
|
||||
SQGSGame.PostRegister(engine);
|
||||
}
|
@ -1,27 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_gamesettings.hpp"
|
||||
#include "../template/template_gamesettings.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptGameSettings, ST_GS>() { return "GSGameSettings"; }
|
||||
|
||||
void SQGSGameSettings_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptGameSettings, ST_GS> SQGSGameSettings("GSGameSettings");
|
||||
SQGSGameSettings.PreRegister(engine);
|
||||
SQGSGameSettings.AddConstructor<void (ScriptGameSettings::*)(), 1>(engine, "x");
|
||||
|
||||
SQGSGameSettings.DefSQStaticMethod(engine, &ScriptGameSettings::IsValid, "IsValid", 2, "..");
|
||||
SQGSGameSettings.DefSQStaticMethod(engine, &ScriptGameSettings::GetValue, "GetValue", 2, "..");
|
||||
SQGSGameSettings.DefSQStaticMethod(engine, &ScriptGameSettings::SetValue, "SetValue", 3, "..i");
|
||||
|
||||
SQGSGameSettings.PostRegister(engine);
|
||||
}
|
@ -1,64 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_goal.hpp"
|
||||
#include "../template/template_goal.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptGoal, ST_GS>() { return "GSGoal"; }
|
||||
|
||||
void SQGSGoal_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptGoal, ST_GS> SQGSGoal("GSGoal");
|
||||
SQGSGoal.PreRegister(engine);
|
||||
SQGSGoal.AddConstructor<void (ScriptGoal::*)(), 1>(engine, "x");
|
||||
|
||||
SQGSGoal.DefSQConst(engine, ScriptGoal::GOAL_INVALID, "GOAL_INVALID");
|
||||
SQGSGoal.DefSQConst(engine, ScriptGoal::GT_NONE, "GT_NONE");
|
||||
SQGSGoal.DefSQConst(engine, ScriptGoal::GT_TILE, "GT_TILE");
|
||||
SQGSGoal.DefSQConst(engine, ScriptGoal::GT_INDUSTRY, "GT_INDUSTRY");
|
||||
SQGSGoal.DefSQConst(engine, ScriptGoal::GT_TOWN, "GT_TOWN");
|
||||
SQGSGoal.DefSQConst(engine, ScriptGoal::GT_COMPANY, "GT_COMPANY");
|
||||
SQGSGoal.DefSQConst(engine, ScriptGoal::GT_STORY_PAGE, "GT_STORY_PAGE");
|
||||
SQGSGoal.DefSQConst(engine, ScriptGoal::QT_QUESTION, "QT_QUESTION");
|
||||
SQGSGoal.DefSQConst(engine, ScriptGoal::QT_INFORMATION, "QT_INFORMATION");
|
||||
SQGSGoal.DefSQConst(engine, ScriptGoal::QT_WARNING, "QT_WARNING");
|
||||
SQGSGoal.DefSQConst(engine, ScriptGoal::QT_ERROR, "QT_ERROR");
|
||||
SQGSGoal.DefSQConst(engine, ScriptGoal::BUTTON_CANCEL, "BUTTON_CANCEL");
|
||||
SQGSGoal.DefSQConst(engine, ScriptGoal::BUTTON_OK, "BUTTON_OK");
|
||||
SQGSGoal.DefSQConst(engine, ScriptGoal::BUTTON_NO, "BUTTON_NO");
|
||||
SQGSGoal.DefSQConst(engine, ScriptGoal::BUTTON_YES, "BUTTON_YES");
|
||||
SQGSGoal.DefSQConst(engine, ScriptGoal::BUTTON_DECLINE, "BUTTON_DECLINE");
|
||||
SQGSGoal.DefSQConst(engine, ScriptGoal::BUTTON_ACCEPT, "BUTTON_ACCEPT");
|
||||
SQGSGoal.DefSQConst(engine, ScriptGoal::BUTTON_IGNORE, "BUTTON_IGNORE");
|
||||
SQGSGoal.DefSQConst(engine, ScriptGoal::BUTTON_RETRY, "BUTTON_RETRY");
|
||||
SQGSGoal.DefSQConst(engine, ScriptGoal::BUTTON_PREVIOUS, "BUTTON_PREVIOUS");
|
||||
SQGSGoal.DefSQConst(engine, ScriptGoal::BUTTON_NEXT, "BUTTON_NEXT");
|
||||
SQGSGoal.DefSQConst(engine, ScriptGoal::BUTTON_STOP, "BUTTON_STOP");
|
||||
SQGSGoal.DefSQConst(engine, ScriptGoal::BUTTON_START, "BUTTON_START");
|
||||
SQGSGoal.DefSQConst(engine, ScriptGoal::BUTTON_GO, "BUTTON_GO");
|
||||
SQGSGoal.DefSQConst(engine, ScriptGoal::BUTTON_CONTINUE, "BUTTON_CONTINUE");
|
||||
SQGSGoal.DefSQConst(engine, ScriptGoal::BUTTON_RESTART, "BUTTON_RESTART");
|
||||
SQGSGoal.DefSQConst(engine, ScriptGoal::BUTTON_POSTPONE, "BUTTON_POSTPONE");
|
||||
SQGSGoal.DefSQConst(engine, ScriptGoal::BUTTON_SURRENDER, "BUTTON_SURRENDER");
|
||||
SQGSGoal.DefSQConst(engine, ScriptGoal::BUTTON_CLOSE, "BUTTON_CLOSE");
|
||||
|
||||
SQGSGoal.DefSQStaticMethod(engine, &ScriptGoal::IsValidGoal, "IsValidGoal", 2, ".i");
|
||||
SQGSGoal.DefSQStaticMethod(engine, &ScriptGoal::New, "New", 5, ".i.ii");
|
||||
SQGSGoal.DefSQStaticMethod(engine, &ScriptGoal::Remove, "Remove", 2, ".i");
|
||||
SQGSGoal.DefSQStaticMethod(engine, &ScriptGoal::SetText, "SetText", 3, ".i.");
|
||||
SQGSGoal.DefSQStaticMethod(engine, &ScriptGoal::SetProgress, "SetProgress", 3, ".i.");
|
||||
SQGSGoal.DefSQStaticMethod(engine, &ScriptGoal::SetCompleted, "SetCompleted", 3, ".ib");
|
||||
SQGSGoal.DefSQStaticMethod(engine, &ScriptGoal::IsCompleted, "IsCompleted", 2, ".i");
|
||||
SQGSGoal.DefSQStaticMethod(engine, &ScriptGoal::Question, "Question", 6, ".ii.ii");
|
||||
SQGSGoal.DefSQStaticMethod(engine, &ScriptGoal::QuestionClient, "QuestionClient", 6, ".ii.ii");
|
||||
SQGSGoal.DefSQStaticMethod(engine, &ScriptGoal::CloseQuestion, "CloseQuestion", 2, ".i");
|
||||
|
||||
SQGSGoal.PostRegister(engine);
|
||||
}
|
@ -1,47 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_industry.hpp"
|
||||
#include "../template/template_industry.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptIndustry, ST_GS>() { return "GSIndustry"; }
|
||||
|
||||
void SQGSIndustry_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptIndustry, ST_GS> SQGSIndustry("GSIndustry");
|
||||
SQGSIndustry.PreRegister(engine);
|
||||
SQGSIndustry.AddConstructor<void (ScriptIndustry::*)(), 1>(engine, "x");
|
||||
|
||||
SQGSIndustry.DefSQConst(engine, ScriptIndustry::CAS_NOT_ACCEPTED, "CAS_NOT_ACCEPTED");
|
||||
SQGSIndustry.DefSQConst(engine, ScriptIndustry::CAS_ACCEPTED, "CAS_ACCEPTED");
|
||||
SQGSIndustry.DefSQConst(engine, ScriptIndustry::CAS_TEMP_REFUSED, "CAS_TEMP_REFUSED");
|
||||
|
||||
SQGSIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetIndustryCount, "GetIndustryCount", 1, ".");
|
||||
SQGSIndustry.DefSQStaticMethod(engine, &ScriptIndustry::IsValidIndustry, "IsValidIndustry", 2, ".i");
|
||||
SQGSIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetIndustryID, "GetIndustryID", 2, ".i");
|
||||
SQGSIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetName, "GetName", 2, ".i");
|
||||
SQGSIndustry.DefSQStaticMethod(engine, &ScriptIndustry::IsCargoAccepted, "IsCargoAccepted", 3, ".ii");
|
||||
SQGSIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetStockpiledCargo, "GetStockpiledCargo", 3, ".ii");
|
||||
SQGSIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetLastMonthProduction, "GetLastMonthProduction", 3, ".ii");
|
||||
SQGSIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetLastMonthTransported, "GetLastMonthTransported", 3, ".ii");
|
||||
SQGSIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetLastMonthTransportedPercentage, "GetLastMonthTransportedPercentage", 3, ".ii");
|
||||
SQGSIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetLocation, "GetLocation", 2, ".i");
|
||||
SQGSIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetAmountOfStationsAround, "GetAmountOfStationsAround", 2, ".i");
|
||||
SQGSIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetDistanceManhattanToTile, "GetDistanceManhattanToTile", 3, ".ii");
|
||||
SQGSIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetDistanceSquareToTile, "GetDistanceSquareToTile", 3, ".ii");
|
||||
SQGSIndustry.DefSQStaticMethod(engine, &ScriptIndustry::IsBuiltOnWater, "IsBuiltOnWater", 2, ".i");
|
||||
SQGSIndustry.DefSQStaticMethod(engine, &ScriptIndustry::HasHeliport, "HasHeliport", 2, ".i");
|
||||
SQGSIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetHeliportLocation, "GetHeliportLocation", 2, ".i");
|
||||
SQGSIndustry.DefSQStaticMethod(engine, &ScriptIndustry::HasDock, "HasDock", 2, ".i");
|
||||
SQGSIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetDockLocation, "GetDockLocation", 2, ".i");
|
||||
SQGSIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetIndustryType, "GetIndustryType", 2, ".i");
|
||||
|
||||
SQGSIndustry.PostRegister(engine);
|
||||
}
|
@ -1,47 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_industrylist.hpp"
|
||||
#include "../template/template_industrylist.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptIndustryList, ST_GS>() { return "GSIndustryList"; }
|
||||
|
||||
void SQGSIndustryList_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptIndustryList, ST_GS> SQGSIndustryList("GSIndustryList");
|
||||
SQGSIndustryList.PreRegister(engine, "GSList");
|
||||
SQGSIndustryList.AddConstructor<void (ScriptIndustryList::*)(), 1>(engine, "x");
|
||||
|
||||
SQGSIndustryList.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptIndustryList_CargoAccepting, ST_GS>() { return "GSIndustryList_CargoAccepting"; }
|
||||
|
||||
void SQGSIndustryList_CargoAccepting_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptIndustryList_CargoAccepting, ST_GS> SQGSIndustryList_CargoAccepting("GSIndustryList_CargoAccepting");
|
||||
SQGSIndustryList_CargoAccepting.PreRegister(engine, "GSList");
|
||||
SQGSIndustryList_CargoAccepting.AddConstructor<void (ScriptIndustryList_CargoAccepting::*)(CargoID cargo_id), 2>(engine, "xi");
|
||||
|
||||
SQGSIndustryList_CargoAccepting.PostRegister(engine);
|
||||
}
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptIndustryList_CargoProducing, ST_GS>() { return "GSIndustryList_CargoProducing"; }
|
||||
|
||||
void SQGSIndustryList_CargoProducing_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptIndustryList_CargoProducing, ST_GS> SQGSIndustryList_CargoProducing("GSIndustryList_CargoProducing");
|
||||
SQGSIndustryList_CargoProducing.PreRegister(engine, "GSList");
|
||||
SQGSIndustryList_CargoProducing.AddConstructor<void (ScriptIndustryList_CargoProducing::*)(CargoID cargo_id), 2>(engine, "xi");
|
||||
|
||||
SQGSIndustryList_CargoProducing.PostRegister(engine);
|
||||
}
|
@ -1,42 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_industrytype.hpp"
|
||||
#include "../template/template_industrytype.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptIndustryType, ST_GS>() { return "GSIndustryType"; }
|
||||
|
||||
void SQGSIndustryType_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptIndustryType, ST_GS> SQGSIndustryType("GSIndustryType");
|
||||
SQGSIndustryType.PreRegister(engine);
|
||||
SQGSIndustryType.AddConstructor<void (ScriptIndustryType::*)(), 1>(engine, "x");
|
||||
|
||||
SQGSIndustryType.DefSQConst(engine, ScriptIndustryType::INDUSTRYTYPE_UNKNOWN, "INDUSTRYTYPE_UNKNOWN");
|
||||
SQGSIndustryType.DefSQConst(engine, ScriptIndustryType::INDUSTRYTYPE_TOWN, "INDUSTRYTYPE_TOWN");
|
||||
|
||||
SQGSIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::IsValidIndustryType, "IsValidIndustryType", 2, ".i");
|
||||
SQGSIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::GetName, "GetName", 2, ".i");
|
||||
SQGSIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::GetProducedCargo, "GetProducedCargo", 2, ".i");
|
||||
SQGSIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::GetAcceptedCargo, "GetAcceptedCargo", 2, ".i");
|
||||
SQGSIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::IsRawIndustry, "IsRawIndustry", 2, ".i");
|
||||
SQGSIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::IsProcessingIndustry, "IsProcessingIndustry", 2, ".i");
|
||||
SQGSIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::ProductionCanIncrease, "ProductionCanIncrease", 2, ".i");
|
||||
SQGSIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::GetConstructionCost, "GetConstructionCost", 2, ".i");
|
||||
SQGSIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::CanBuildIndustry, "CanBuildIndustry", 2, ".i");
|
||||
SQGSIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::CanProspectIndustry, "CanProspectIndustry", 2, ".i");
|
||||
SQGSIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::BuildIndustry, "BuildIndustry", 3, ".ii");
|
||||
SQGSIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::ProspectIndustry, "ProspectIndustry", 2, ".i");
|
||||
SQGSIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::IsBuiltOnWater, "IsBuiltOnWater", 2, ".i");
|
||||
SQGSIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::HasHeliport, "HasHeliport", 2, ".i");
|
||||
SQGSIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::HasDock, "HasDock", 2, ".i");
|
||||
|
||||
SQGSIndustryType.PostRegister(engine);
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_industrytypelist.hpp"
|
||||
#include "../template/template_industrytypelist.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptIndustryTypeList, ST_GS>() { return "GSIndustryTypeList"; }
|
||||
|
||||
void SQGSIndustryTypeList_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptIndustryTypeList, ST_GS> SQGSIndustryTypeList("GSIndustryTypeList");
|
||||
SQGSIndustryTypeList.PreRegister(engine, "GSList");
|
||||
SQGSIndustryTypeList.AddConstructor<void (ScriptIndustryTypeList::*)(), 1>(engine, "x");
|
||||
|
||||
SQGSIndustryTypeList.PostRegister(engine);
|
||||
}
|
@ -1,37 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_infrastructure.hpp"
|
||||
#include "../template/template_infrastructure.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptInfrastructure, ST_GS>() { return "GSInfrastructure"; }
|
||||
|
||||
void SQGSInfrastructure_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptInfrastructure, ST_GS> SQGSInfrastructure("GSInfrastructure");
|
||||
SQGSInfrastructure.PreRegister(engine);
|
||||
SQGSInfrastructure.AddConstructor<void (ScriptInfrastructure::*)(), 1>(engine, "x");
|
||||
|
||||
SQGSInfrastructure.DefSQConst(engine, ScriptInfrastructure::INFRASTRUCTURE_RAIL, "INFRASTRUCTURE_RAIL");
|
||||
SQGSInfrastructure.DefSQConst(engine, ScriptInfrastructure::INFRASTRUCTURE_SIGNALS, "INFRASTRUCTURE_SIGNALS");
|
||||
SQGSInfrastructure.DefSQConst(engine, ScriptInfrastructure::INFRASTRUCTURE_ROAD, "INFRASTRUCTURE_ROAD");
|
||||
SQGSInfrastructure.DefSQConst(engine, ScriptInfrastructure::INFRASTRUCTURE_CANAL, "INFRASTRUCTURE_CANAL");
|
||||
SQGSInfrastructure.DefSQConst(engine, ScriptInfrastructure::INFRASTRUCTURE_STATION, "INFRASTRUCTURE_STATION");
|
||||
SQGSInfrastructure.DefSQConst(engine, ScriptInfrastructure::INFRASTRUCTURE_AIRPORT, "INFRASTRUCTURE_AIRPORT");
|
||||
|
||||
SQGSInfrastructure.DefSQStaticMethod(engine, &ScriptInfrastructure::GetRailPieceCount, "GetRailPieceCount", 3, ".ii");
|
||||
SQGSInfrastructure.DefSQStaticMethod(engine, &ScriptInfrastructure::GetRoadPieceCount, "GetRoadPieceCount", 3, ".ii");
|
||||
SQGSInfrastructure.DefSQStaticMethod(engine, &ScriptInfrastructure::GetInfrastructurePieceCount, "GetInfrastructurePieceCount", 3, ".ii");
|
||||
SQGSInfrastructure.DefSQStaticMethod(engine, &ScriptInfrastructure::GetMonthlyRailCosts, "GetMonthlyRailCosts", 3, ".ii");
|
||||
SQGSInfrastructure.DefSQStaticMethod(engine, &ScriptInfrastructure::GetMonthlyRoadCosts, "GetMonthlyRoadCosts", 3, ".ii");
|
||||
SQGSInfrastructure.DefSQStaticMethod(engine, &ScriptInfrastructure::GetMonthlyInfrastructureCosts, "GetMonthlyInfrastructureCosts", 3, ".ii");
|
||||
|
||||
SQGSInfrastructure.PostRegister(engine);
|
||||
}
|
@ -1,62 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_list.hpp"
|
||||
#include "../template/template_list.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptList, ST_GS>() { return "GSList"; }
|
||||
|
||||
void SQGSList_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptList, ST_GS> SQGSList("GSList");
|
||||
SQGSList.PreRegister(engine);
|
||||
SQGSList.AddConstructor<void (ScriptList::*)(), 1>(engine, "x");
|
||||
|
||||
SQGSList.DefSQConst(engine, ScriptList::SORT_BY_VALUE, "SORT_BY_VALUE");
|
||||
SQGSList.DefSQConst(engine, ScriptList::SORT_BY_ITEM, "SORT_BY_ITEM");
|
||||
|
||||
SQGSList.DefSQConst(engine, ScriptList::SORT_ASCENDING, "SORT_ASCENDING");
|
||||
SQGSList.DefSQConst(engine, ScriptList::SORT_DESCENDING, "SORT_DESCENDING");
|
||||
|
||||
SQGSList.DefSQMethod(engine, &ScriptList::AddItem, "AddItem", 3, "xii");
|
||||
SQGSList.DefSQMethod(engine, &ScriptList::RemoveItem, "RemoveItem", 2, "xi");
|
||||
SQGSList.DefSQMethod(engine, &ScriptList::Clear, "Clear", 1, "x");
|
||||
SQGSList.DefSQMethod(engine, &ScriptList::HasItem, "HasItem", 2, "xi");
|
||||
SQGSList.DefSQMethod(engine, &ScriptList::Begin, "Begin", 1, "x");
|
||||
SQGSList.DefSQMethod(engine, &ScriptList::Next, "Next", 1, "x");
|
||||
SQGSList.DefSQMethod(engine, &ScriptList::IsEmpty, "IsEmpty", 1, "x");
|
||||
SQGSList.DefSQMethod(engine, &ScriptList::IsEnd, "IsEnd", 1, "x");
|
||||
SQGSList.DefSQMethod(engine, &ScriptList::Count, "Count", 1, "x");
|
||||
SQGSList.DefSQMethod(engine, &ScriptList::GetValue, "GetValue", 2, "xi");
|
||||
SQGSList.DefSQMethod(engine, &ScriptList::SetValue, "SetValue", 3, "xii");
|
||||
SQGSList.DefSQMethod(engine, &ScriptList::Sort, "Sort", 3, "xib");
|
||||
SQGSList.DefSQMethod(engine, &ScriptList::AddList, "AddList", 2, "xx");
|
||||
SQGSList.DefSQMethod(engine, &ScriptList::SwapList, "SwapList", 2, "xx");
|
||||
SQGSList.DefSQMethod(engine, &ScriptList::RemoveAboveValue, "RemoveAboveValue", 2, "xi");
|
||||
SQGSList.DefSQMethod(engine, &ScriptList::RemoveBelowValue, "RemoveBelowValue", 2, "xi");
|
||||
SQGSList.DefSQMethod(engine, &ScriptList::RemoveBetweenValue, "RemoveBetweenValue", 3, "xii");
|
||||
SQGSList.DefSQMethod(engine, &ScriptList::RemoveValue, "RemoveValue", 2, "xi");
|
||||
SQGSList.DefSQMethod(engine, &ScriptList::RemoveTop, "RemoveTop", 2, "xi");
|
||||
SQGSList.DefSQMethod(engine, &ScriptList::RemoveBottom, "RemoveBottom", 2, "xi");
|
||||
SQGSList.DefSQMethod(engine, &ScriptList::RemoveList, "RemoveList", 2, "xx");
|
||||
SQGSList.DefSQMethod(engine, &ScriptList::KeepAboveValue, "KeepAboveValue", 2, "xi");
|
||||
SQGSList.DefSQMethod(engine, &ScriptList::KeepBelowValue, "KeepBelowValue", 2, "xi");
|
||||
SQGSList.DefSQMethod(engine, &ScriptList::KeepBetweenValue, "KeepBetweenValue", 3, "xii");
|
||||
SQGSList.DefSQMethod(engine, &ScriptList::KeepValue, "KeepValue", 2, "xi");
|
||||
SQGSList.DefSQMethod(engine, &ScriptList::KeepTop, "KeepTop", 2, "xi");
|
||||
SQGSList.DefSQMethod(engine, &ScriptList::KeepBottom, "KeepBottom", 2, "xi");
|
||||
SQGSList.DefSQMethod(engine, &ScriptList::KeepList, "KeepList", 2, "xx");
|
||||
SQGSList.DefSQAdvancedMethod(engine, &ScriptList::_get, "_get");
|
||||
SQGSList.DefSQAdvancedMethod(engine, &ScriptList::_set, "_set");
|
||||
SQGSList.DefSQAdvancedMethod(engine, &ScriptList::_nexti, "_nexti");
|
||||
SQGSList.DefSQAdvancedMethod(engine, &ScriptList::Valuate, "Valuate");
|
||||
|
||||
SQGSList.PostRegister(engine);
|
||||
}
|
@ -1,27 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_log.hpp"
|
||||
#include "../template/template_log.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptLog, ST_GS>() { return "GSLog"; }
|
||||
|
||||
void SQGSLog_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptLog, ST_GS> SQGSLog("GSLog");
|
||||
SQGSLog.PreRegister(engine);
|
||||
SQGSLog.AddConstructor<void (ScriptLog::*)(), 1>(engine, "x");
|
||||
|
||||
SQGSLog.DefSQStaticMethod(engine, &ScriptLog::Info, "Info", 2, "..");
|
||||
SQGSLog.DefSQStaticMethod(engine, &ScriptLog::Warning, "Warning", 2, "..");
|
||||
SQGSLog.DefSQStaticMethod(engine, &ScriptLog::Error, "Error", 2, "..");
|
||||
|
||||
SQGSLog.PostRegister(engine);
|
||||
}
|
@ -1,37 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_map.hpp"
|
||||
#include "../template/template_map.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptMap, ST_GS>() { return "GSMap"; }
|
||||
|
||||
void SQGSMap_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptMap, ST_GS> SQGSMap("GSMap");
|
||||
SQGSMap.PreRegister(engine);
|
||||
SQGSMap.AddConstructor<void (ScriptMap::*)(), 1>(engine, "x");
|
||||
|
||||
SQGSMap.DefSQConst(engine, ScriptMap::TILE_INVALID, "TILE_INVALID");
|
||||
|
||||
SQGSMap.DefSQStaticMethod(engine, &ScriptMap::IsValidTile, "IsValidTile", 2, ".i");
|
||||
SQGSMap.DefSQStaticMethod(engine, &ScriptMap::GetMapSize, "GetMapSize", 1, ".");
|
||||
SQGSMap.DefSQStaticMethod(engine, &ScriptMap::GetMapSizeX, "GetMapSizeX", 1, ".");
|
||||
SQGSMap.DefSQStaticMethod(engine, &ScriptMap::GetMapSizeY, "GetMapSizeY", 1, ".");
|
||||
SQGSMap.DefSQStaticMethod(engine, &ScriptMap::GetTileX, "GetTileX", 2, ".i");
|
||||
SQGSMap.DefSQStaticMethod(engine, &ScriptMap::GetTileY, "GetTileY", 2, ".i");
|
||||
SQGSMap.DefSQStaticMethod(engine, &ScriptMap::GetTileIndex, "GetTileIndex", 3, ".ii");
|
||||
SQGSMap.DefSQStaticMethod(engine, &ScriptMap::DistanceManhattan, "DistanceManhattan", 3, ".ii");
|
||||
SQGSMap.DefSQStaticMethod(engine, &ScriptMap::DistanceMax, "DistanceMax", 3, ".ii");
|
||||
SQGSMap.DefSQStaticMethod(engine, &ScriptMap::DistanceSquare, "DistanceSquare", 3, ".ii");
|
||||
SQGSMap.DefSQStaticMethod(engine, &ScriptMap::DistanceFromEdge, "DistanceFromEdge", 2, ".i");
|
||||
|
||||
SQGSMap.PostRegister(engine);
|
||||
}
|
@ -1,51 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_marine.hpp"
|
||||
#include "../template/template_marine.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptMarine, ST_GS>() { return "GSMarine"; }
|
||||
|
||||
void SQGSMarine_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptMarine, ST_GS> SQGSMarine("GSMarine");
|
||||
SQGSMarine.PreRegister(engine);
|
||||
SQGSMarine.AddConstructor<void (ScriptMarine::*)(), 1>(engine, "x");
|
||||
|
||||
SQGSMarine.DefSQConst(engine, ScriptMarine::ERR_MARINE_BASE, "ERR_MARINE_BASE");
|
||||
SQGSMarine.DefSQConst(engine, ScriptMarine::ERR_MARINE_MUST_BE_BUILT_ON_WATER, "ERR_MARINE_MUST_BE_BUILT_ON_WATER");
|
||||
SQGSMarine.DefSQConst(engine, ScriptMarine::BT_DOCK, "BT_DOCK");
|
||||
SQGSMarine.DefSQConst(engine, ScriptMarine::BT_DEPOT, "BT_DEPOT");
|
||||
SQGSMarine.DefSQConst(engine, ScriptMarine::BT_BUOY, "BT_BUOY");
|
||||
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_MUST_BE_BUILT_ON_WATER, ScriptMarine::ERR_MARINE_MUST_BE_BUILT_ON_WATER);
|
||||
|
||||
ScriptError::RegisterErrorMapString(ScriptMarine::ERR_MARINE_MUST_BE_BUILT_ON_WATER, "ERR_MARINE_MUST_BE_BUILT_ON_WATER");
|
||||
|
||||
SQGSMarine.DefSQStaticMethod(engine, &ScriptMarine::IsWaterDepotTile, "IsWaterDepotTile", 2, ".i");
|
||||
SQGSMarine.DefSQStaticMethod(engine, &ScriptMarine::IsDockTile, "IsDockTile", 2, ".i");
|
||||
SQGSMarine.DefSQStaticMethod(engine, &ScriptMarine::IsBuoyTile, "IsBuoyTile", 2, ".i");
|
||||
SQGSMarine.DefSQStaticMethod(engine, &ScriptMarine::IsLockTile, "IsLockTile", 2, ".i");
|
||||
SQGSMarine.DefSQStaticMethod(engine, &ScriptMarine::IsCanalTile, "IsCanalTile", 2, ".i");
|
||||
SQGSMarine.DefSQStaticMethod(engine, &ScriptMarine::AreWaterTilesConnected, "AreWaterTilesConnected", 3, ".ii");
|
||||
SQGSMarine.DefSQStaticMethod(engine, &ScriptMarine::BuildWaterDepot, "BuildWaterDepot", 3, ".ii");
|
||||
SQGSMarine.DefSQStaticMethod(engine, &ScriptMarine::BuildDock, "BuildDock", 3, ".ii");
|
||||
SQGSMarine.DefSQStaticMethod(engine, &ScriptMarine::BuildBuoy, "BuildBuoy", 2, ".i");
|
||||
SQGSMarine.DefSQStaticMethod(engine, &ScriptMarine::BuildLock, "BuildLock", 2, ".i");
|
||||
SQGSMarine.DefSQStaticMethod(engine, &ScriptMarine::BuildCanal, "BuildCanal", 2, ".i");
|
||||
SQGSMarine.DefSQStaticMethod(engine, &ScriptMarine::RemoveWaterDepot, "RemoveWaterDepot", 2, ".i");
|
||||
SQGSMarine.DefSQStaticMethod(engine, &ScriptMarine::RemoveDock, "RemoveDock", 2, ".i");
|
||||
SQGSMarine.DefSQStaticMethod(engine, &ScriptMarine::RemoveBuoy, "RemoveBuoy", 2, ".i");
|
||||
SQGSMarine.DefSQStaticMethod(engine, &ScriptMarine::RemoveLock, "RemoveLock", 2, ".i");
|
||||
SQGSMarine.DefSQStaticMethod(engine, &ScriptMarine::RemoveCanal, "RemoveCanal", 2, ".i");
|
||||
SQGSMarine.DefSQStaticMethod(engine, &ScriptMarine::GetBuildCost, "GetBuildCost", 2, ".i");
|
||||
|
||||
SQGSMarine.PostRegister(engine);
|
||||
}
|
@ -1,38 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_news.hpp"
|
||||
#include "../template/template_news.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptNews, ST_GS>() { return "GSNews"; }
|
||||
|
||||
void SQGSNews_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptNews, ST_GS> SQGSNews("GSNews");
|
||||
SQGSNews.PreRegister(engine);
|
||||
SQGSNews.AddConstructor<void (ScriptNews::*)(), 1>(engine, "x");
|
||||
|
||||
SQGSNews.DefSQConst(engine, ScriptNews::NT_ACCIDENT, "NT_ACCIDENT");
|
||||
SQGSNews.DefSQConst(engine, ScriptNews::NT_COMPANY_INFO, "NT_COMPANY_INFO");
|
||||
SQGSNews.DefSQConst(engine, ScriptNews::NT_ECONOMY, "NT_ECONOMY");
|
||||
SQGSNews.DefSQConst(engine, ScriptNews::NT_ADVICE, "NT_ADVICE");
|
||||
SQGSNews.DefSQConst(engine, ScriptNews::NT_ACCEPTANCE, "NT_ACCEPTANCE");
|
||||
SQGSNews.DefSQConst(engine, ScriptNews::NT_SUBSIDIES, "NT_SUBSIDIES");
|
||||
SQGSNews.DefSQConst(engine, ScriptNews::NT_GENERAL, "NT_GENERAL");
|
||||
SQGSNews.DefSQConst(engine, ScriptNews::NR_NONE, "NR_NONE");
|
||||
SQGSNews.DefSQConst(engine, ScriptNews::NR_TILE, "NR_TILE");
|
||||
SQGSNews.DefSQConst(engine, ScriptNews::NR_STATION, "NR_STATION");
|
||||
SQGSNews.DefSQConst(engine, ScriptNews::NR_INDUSTRY, "NR_INDUSTRY");
|
||||
SQGSNews.DefSQConst(engine, ScriptNews::NR_TOWN, "NR_TOWN");
|
||||
|
||||
SQGSNews.DefSQStaticMethod(engine, &ScriptNews::Create, "Create", 6, ".i.iii");
|
||||
|
||||
SQGSNews.PostRegister(engine);
|
||||
}
|
@ -1,99 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_order.hpp"
|
||||
#include "../template/template_order.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptOrder, ST_GS>() { return "GSOrder"; }
|
||||
|
||||
void SQGSOrder_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptOrder, ST_GS> SQGSOrder("GSOrder");
|
||||
SQGSOrder.PreRegister(engine);
|
||||
SQGSOrder.AddConstructor<void (ScriptOrder::*)(), 1>(engine, "x");
|
||||
|
||||
SQGSOrder.DefSQConst(engine, ScriptOrder::ERR_ORDER_BASE, "ERR_ORDER_BASE");
|
||||
SQGSOrder.DefSQConst(engine, ScriptOrder::ERR_ORDER_TOO_MANY, "ERR_ORDER_TOO_MANY");
|
||||
SQGSOrder.DefSQConst(engine, ScriptOrder::ERR_ORDER_TOO_FAR_AWAY_FROM_PREVIOUS_DESTINATION, "ERR_ORDER_TOO_FAR_AWAY_FROM_PREVIOUS_DESTINATION");
|
||||
SQGSOrder.DefSQConst(engine, ScriptOrder::ERR_ORDER_AIRCRAFT_NOT_ENOUGH_RANGE, "ERR_ORDER_AIRCRAFT_NOT_ENOUGH_RANGE");
|
||||
SQGSOrder.DefSQConst(engine, ScriptOrder::OF_NONE, "OF_NONE");
|
||||
SQGSOrder.DefSQConst(engine, ScriptOrder::OF_NON_STOP_INTERMEDIATE, "OF_NON_STOP_INTERMEDIATE");
|
||||
SQGSOrder.DefSQConst(engine, ScriptOrder::OF_NON_STOP_DESTINATION, "OF_NON_STOP_DESTINATION");
|
||||
SQGSOrder.DefSQConst(engine, ScriptOrder::OF_UNLOAD, "OF_UNLOAD");
|
||||
SQGSOrder.DefSQConst(engine, ScriptOrder::OF_TRANSFER, "OF_TRANSFER");
|
||||
SQGSOrder.DefSQConst(engine, ScriptOrder::OF_NO_UNLOAD, "OF_NO_UNLOAD");
|
||||
SQGSOrder.DefSQConst(engine, ScriptOrder::OF_FULL_LOAD, "OF_FULL_LOAD");
|
||||
SQGSOrder.DefSQConst(engine, ScriptOrder::OF_FULL_LOAD_ANY, "OF_FULL_LOAD_ANY");
|
||||
SQGSOrder.DefSQConst(engine, ScriptOrder::OF_NO_LOAD, "OF_NO_LOAD");
|
||||
SQGSOrder.DefSQConst(engine, ScriptOrder::OF_SERVICE_IF_NEEDED, "OF_SERVICE_IF_NEEDED");
|
||||
SQGSOrder.DefSQConst(engine, ScriptOrder::OF_STOP_IN_DEPOT, "OF_STOP_IN_DEPOT");
|
||||
SQGSOrder.DefSQConst(engine, ScriptOrder::OF_GOTO_NEAREST_DEPOT, "OF_GOTO_NEAREST_DEPOT");
|
||||
SQGSOrder.DefSQConst(engine, ScriptOrder::OF_NON_STOP_FLAGS, "OF_NON_STOP_FLAGS");
|
||||
SQGSOrder.DefSQConst(engine, ScriptOrder::OF_UNLOAD_FLAGS, "OF_UNLOAD_FLAGS");
|
||||
SQGSOrder.DefSQConst(engine, ScriptOrder::OF_LOAD_FLAGS, "OF_LOAD_FLAGS");
|
||||
SQGSOrder.DefSQConst(engine, ScriptOrder::OF_DEPOT_FLAGS, "OF_DEPOT_FLAGS");
|
||||
SQGSOrder.DefSQConst(engine, ScriptOrder::OF_INVALID, "OF_INVALID");
|
||||
SQGSOrder.DefSQConst(engine, ScriptOrder::OC_LOAD_PERCENTAGE, "OC_LOAD_PERCENTAGE");
|
||||
SQGSOrder.DefSQConst(engine, ScriptOrder::OC_RELIABILITY, "OC_RELIABILITY");
|
||||
SQGSOrder.DefSQConst(engine, ScriptOrder::OC_MAX_RELIABILITY, "OC_MAX_RELIABILITY");
|
||||
SQGSOrder.DefSQConst(engine, ScriptOrder::OC_MAX_SPEED, "OC_MAX_SPEED");
|
||||
SQGSOrder.DefSQConst(engine, ScriptOrder::OC_AGE, "OC_AGE");
|
||||
SQGSOrder.DefSQConst(engine, ScriptOrder::OC_REQUIRES_SERVICE, "OC_REQUIRES_SERVICE");
|
||||
SQGSOrder.DefSQConst(engine, ScriptOrder::OC_UNCONDITIONALLY, "OC_UNCONDITIONALLY");
|
||||
SQGSOrder.DefSQConst(engine, ScriptOrder::OC_REMAINING_LIFETIME, "OC_REMAINING_LIFETIME");
|
||||
SQGSOrder.DefSQConst(engine, ScriptOrder::OC_INVALID, "OC_INVALID");
|
||||
SQGSOrder.DefSQConst(engine, ScriptOrder::CF_EQUALS, "CF_EQUALS");
|
||||
SQGSOrder.DefSQConst(engine, ScriptOrder::CF_NOT_EQUALS, "CF_NOT_EQUALS");
|
||||
SQGSOrder.DefSQConst(engine, ScriptOrder::CF_LESS_THAN, "CF_LESS_THAN");
|
||||
SQGSOrder.DefSQConst(engine, ScriptOrder::CF_LESS_EQUALS, "CF_LESS_EQUALS");
|
||||
SQGSOrder.DefSQConst(engine, ScriptOrder::CF_MORE_THAN, "CF_MORE_THAN");
|
||||
SQGSOrder.DefSQConst(engine, ScriptOrder::CF_MORE_EQUALS, "CF_MORE_EQUALS");
|
||||
SQGSOrder.DefSQConst(engine, ScriptOrder::CF_IS_TRUE, "CF_IS_TRUE");
|
||||
SQGSOrder.DefSQConst(engine, ScriptOrder::CF_IS_FALSE, "CF_IS_FALSE");
|
||||
SQGSOrder.DefSQConst(engine, ScriptOrder::CF_INVALID, "CF_INVALID");
|
||||
SQGSOrder.DefSQConst(engine, ScriptOrder::ORDER_CURRENT, "ORDER_CURRENT");
|
||||
SQGSOrder.DefSQConst(engine, ScriptOrder::ORDER_INVALID, "ORDER_INVALID");
|
||||
SQGSOrder.DefSQConst(engine, ScriptOrder::STOPLOCATION_NEAR, "STOPLOCATION_NEAR");
|
||||
SQGSOrder.DefSQConst(engine, ScriptOrder::STOPLOCATION_MIDDLE, "STOPLOCATION_MIDDLE");
|
||||
SQGSOrder.DefSQConst(engine, ScriptOrder::STOPLOCATION_FAR, "STOPLOCATION_FAR");
|
||||
SQGSOrder.DefSQConst(engine, ScriptOrder::STOPLOCATION_INVALID, "STOPLOCATION_INVALID");
|
||||
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_NO_MORE_SPACE_FOR_ORDERS, ScriptOrder::ERR_ORDER_TOO_MANY);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_TOO_FAR_FROM_PREVIOUS_DESTINATION, ScriptOrder::ERR_ORDER_TOO_FAR_AWAY_FROM_PREVIOUS_DESTINATION);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_AIRCRAFT_NOT_ENOUGH_RANGE, ScriptOrder::ERR_ORDER_AIRCRAFT_NOT_ENOUGH_RANGE);
|
||||
|
||||
ScriptError::RegisterErrorMapString(ScriptOrder::ERR_ORDER_TOO_MANY, "ERR_ORDER_TOO_MANY");
|
||||
ScriptError::RegisterErrorMapString(ScriptOrder::ERR_ORDER_TOO_FAR_AWAY_FROM_PREVIOUS_DESTINATION, "ERR_ORDER_TOO_FAR_AWAY_FROM_PREVIOUS_DESTINATION");
|
||||
ScriptError::RegisterErrorMapString(ScriptOrder::ERR_ORDER_AIRCRAFT_NOT_ENOUGH_RANGE, "ERR_ORDER_AIRCRAFT_NOT_ENOUGH_RANGE");
|
||||
|
||||
SQGSOrder.DefSQStaticMethod(engine, &ScriptOrder::IsValidVehicleOrder, "IsValidVehicleOrder", 3, ".ii");
|
||||
SQGSOrder.DefSQStaticMethod(engine, &ScriptOrder::IsGotoStationOrder, "IsGotoStationOrder", 3, ".ii");
|
||||
SQGSOrder.DefSQStaticMethod(engine, &ScriptOrder::IsGotoDepotOrder, "IsGotoDepotOrder", 3, ".ii");
|
||||
SQGSOrder.DefSQStaticMethod(engine, &ScriptOrder::IsGotoWaypointOrder, "IsGotoWaypointOrder", 3, ".ii");
|
||||
SQGSOrder.DefSQStaticMethod(engine, &ScriptOrder::IsConditionalOrder, "IsConditionalOrder", 3, ".ii");
|
||||
SQGSOrder.DefSQStaticMethod(engine, &ScriptOrder::IsVoidOrder, "IsVoidOrder", 3, ".ii");
|
||||
SQGSOrder.DefSQStaticMethod(engine, &ScriptOrder::IsRefitOrder, "IsRefitOrder", 3, ".ii");
|
||||
SQGSOrder.DefSQStaticMethod(engine, &ScriptOrder::IsCurrentOrderPartOfOrderList, "IsCurrentOrderPartOfOrderList", 2, ".i");
|
||||
SQGSOrder.DefSQStaticMethod(engine, &ScriptOrder::ResolveOrderPosition, "ResolveOrderPosition", 3, ".ii");
|
||||
SQGSOrder.DefSQStaticMethod(engine, &ScriptOrder::AreOrderFlagsValid, "AreOrderFlagsValid", 3, ".ii");
|
||||
SQGSOrder.DefSQStaticMethod(engine, &ScriptOrder::IsValidConditionalOrder, "IsValidConditionalOrder", 3, ".ii");
|
||||
SQGSOrder.DefSQStaticMethod(engine, &ScriptOrder::GetOrderCount, "GetOrderCount", 2, ".i");
|
||||
SQGSOrder.DefSQStaticMethod(engine, &ScriptOrder::GetOrderDestination, "GetOrderDestination", 3, ".ii");
|
||||
SQGSOrder.DefSQStaticMethod(engine, &ScriptOrder::GetOrderFlags, "GetOrderFlags", 3, ".ii");
|
||||
SQGSOrder.DefSQStaticMethod(engine, &ScriptOrder::GetOrderJumpTo, "GetOrderJumpTo", 3, ".ii");
|
||||
SQGSOrder.DefSQStaticMethod(engine, &ScriptOrder::GetOrderCondition, "GetOrderCondition", 3, ".ii");
|
||||
SQGSOrder.DefSQStaticMethod(engine, &ScriptOrder::GetOrderCompareFunction, "GetOrderCompareFunction", 3, ".ii");
|
||||
SQGSOrder.DefSQStaticMethod(engine, &ScriptOrder::GetOrderCompareValue, "GetOrderCompareValue", 3, ".ii");
|
||||
SQGSOrder.DefSQStaticMethod(engine, &ScriptOrder::GetStopLocation, "GetStopLocation", 3, ".ii");
|
||||
SQGSOrder.DefSQStaticMethod(engine, &ScriptOrder::GetOrderRefit, "GetOrderRefit", 3, ".ii");
|
||||
SQGSOrder.DefSQStaticMethod(engine, &ScriptOrder::GetOrderDistance, "GetOrderDistance", 4, ".iii");
|
||||
|
||||
SQGSOrder.PostRegister(engine);
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_priorityqueue.hpp"
|
||||
#include "../template/template_priorityqueue.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptPriorityQueue, ST_GS>() { return "GSPriorityQueue"; }
|
||||
|
||||
void SQGSPriorityQueue_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptPriorityQueue, ST_GS> SQGSPriorityQueue("GSPriorityQueue");
|
||||
SQGSPriorityQueue.PreRegister(engine);
|
||||
SQGSPriorityQueue.AddConstructor<void (ScriptPriorityQueue::*)(), 1>(engine, "x");
|
||||
|
||||
SQGSPriorityQueue.DefSQAdvancedMethod(engine, &ScriptPriorityQueue::Insert, "Insert");
|
||||
SQGSPriorityQueue.DefSQAdvancedMethod(engine, &ScriptPriorityQueue::Pop, "Pop");
|
||||
SQGSPriorityQueue.DefSQAdvancedMethod(engine, &ScriptPriorityQueue::Peek, "Peek");
|
||||
SQGSPriorityQueue.DefSQAdvancedMethod(engine, &ScriptPriorityQueue::Exists, "Exists");
|
||||
SQGSPriorityQueue.DefSQAdvancedMethod(engine, &ScriptPriorityQueue::Clear, "Clear");
|
||||
SQGSPriorityQueue.DefSQMethod(engine, &ScriptPriorityQueue::IsEmpty, "IsEmpty", 1, "x");
|
||||
SQGSPriorityQueue.DefSQMethod(engine, &ScriptPriorityQueue::Count, "Count", 1, "x");
|
||||
|
||||
SQGSPriorityQueue.PostRegister(engine);
|
||||
}
|
@ -1,98 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_rail.hpp"
|
||||
#include "../template/template_rail.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptRail, ST_GS>() { return "GSRail"; }
|
||||
|
||||
void SQGSRail_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptRail, ST_GS> SQGSRail("GSRail");
|
||||
SQGSRail.PreRegister(engine);
|
||||
SQGSRail.AddConstructor<void (ScriptRail::*)(), 1>(engine, "x");
|
||||
|
||||
SQGSRail.DefSQConst(engine, ScriptRail::ERR_RAIL_BASE, "ERR_RAIL_BASE");
|
||||
SQGSRail.DefSQConst(engine, ScriptRail::ERR_CROSSING_ON_ONEWAY_ROAD, "ERR_CROSSING_ON_ONEWAY_ROAD");
|
||||
SQGSRail.DefSQConst(engine, ScriptRail::ERR_UNSUITABLE_TRACK, "ERR_UNSUITABLE_TRACK");
|
||||
SQGSRail.DefSQConst(engine, ScriptRail::ERR_RAILTYPE_DISALLOWS_CROSSING, "ERR_RAILTYPE_DISALLOWS_CROSSING");
|
||||
SQGSRail.DefSQConst(engine, ScriptRail::RAILTYPE_INVALID, "RAILTYPE_INVALID");
|
||||
SQGSRail.DefSQConst(engine, ScriptRail::RAILTRACK_NE_SW, "RAILTRACK_NE_SW");
|
||||
SQGSRail.DefSQConst(engine, ScriptRail::RAILTRACK_NW_SE, "RAILTRACK_NW_SE");
|
||||
SQGSRail.DefSQConst(engine, ScriptRail::RAILTRACK_NW_NE, "RAILTRACK_NW_NE");
|
||||
SQGSRail.DefSQConst(engine, ScriptRail::RAILTRACK_SW_SE, "RAILTRACK_SW_SE");
|
||||
SQGSRail.DefSQConst(engine, ScriptRail::RAILTRACK_NW_SW, "RAILTRACK_NW_SW");
|
||||
SQGSRail.DefSQConst(engine, ScriptRail::RAILTRACK_NE_SE, "RAILTRACK_NE_SE");
|
||||
SQGSRail.DefSQConst(engine, ScriptRail::RAILTRACK_INVALID, "RAILTRACK_INVALID");
|
||||
SQGSRail.DefSQConst(engine, ScriptRail::SIGNALTYPE_NORMAL, "SIGNALTYPE_NORMAL");
|
||||
SQGSRail.DefSQConst(engine, ScriptRail::SIGNALTYPE_ENTRY, "SIGNALTYPE_ENTRY");
|
||||
SQGSRail.DefSQConst(engine, ScriptRail::SIGNALTYPE_EXIT, "SIGNALTYPE_EXIT");
|
||||
SQGSRail.DefSQConst(engine, ScriptRail::SIGNALTYPE_COMBO, "SIGNALTYPE_COMBO");
|
||||
SQGSRail.DefSQConst(engine, ScriptRail::SIGNALTYPE_PBS, "SIGNALTYPE_PBS");
|
||||
SQGSRail.DefSQConst(engine, ScriptRail::SIGNALTYPE_PBS_ONEWAY, "SIGNALTYPE_PBS_ONEWAY");
|
||||
SQGSRail.DefSQConst(engine, ScriptRail::SIGNALTYPE_TWOWAY, "SIGNALTYPE_TWOWAY");
|
||||
SQGSRail.DefSQConst(engine, ScriptRail::SIGNALTYPE_NORMAL_TWOWAY, "SIGNALTYPE_NORMAL_TWOWAY");
|
||||
SQGSRail.DefSQConst(engine, ScriptRail::SIGNALTYPE_ENTRY_TWOWAY, "SIGNALTYPE_ENTRY_TWOWAY");
|
||||
SQGSRail.DefSQConst(engine, ScriptRail::SIGNALTYPE_EXIT_TWOWAY, "SIGNALTYPE_EXIT_TWOWAY");
|
||||
SQGSRail.DefSQConst(engine, ScriptRail::SIGNALTYPE_COMBO_TWOWAY, "SIGNALTYPE_COMBO_TWOWAY");
|
||||
SQGSRail.DefSQConst(engine, ScriptRail::SIGNALTYPE_NONE, "SIGNALTYPE_NONE");
|
||||
SQGSRail.DefSQConst(engine, ScriptRail::BT_TRACK, "BT_TRACK");
|
||||
SQGSRail.DefSQConst(engine, ScriptRail::BT_SIGNAL, "BT_SIGNAL");
|
||||
SQGSRail.DefSQConst(engine, ScriptRail::BT_DEPOT, "BT_DEPOT");
|
||||
SQGSRail.DefSQConst(engine, ScriptRail::BT_STATION, "BT_STATION");
|
||||
SQGSRail.DefSQConst(engine, ScriptRail::BT_WAYPOINT, "BT_WAYPOINT");
|
||||
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_CROSSING_ON_ONEWAY_ROAD, ScriptRail::ERR_CROSSING_ON_ONEWAY_ROAD);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_NO_SUITABLE_RAILROAD_TRACK, ScriptRail::ERR_UNSUITABLE_TRACK);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_THERE_IS_NO_RAILROAD_TRACK, ScriptRail::ERR_UNSUITABLE_TRACK);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_THERE_ARE_NO_SIGNALS, ScriptRail::ERR_UNSUITABLE_TRACK);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_THERE_IS_NO_STATION, ScriptRail::ERR_UNSUITABLE_TRACK);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_CROSSING_DISALLOWED_RAIL, ScriptRail::ERR_RAILTYPE_DISALLOWS_CROSSING);
|
||||
|
||||
ScriptError::RegisterErrorMapString(ScriptRail::ERR_CROSSING_ON_ONEWAY_ROAD, "ERR_CROSSING_ON_ONEWAY_ROAD");
|
||||
ScriptError::RegisterErrorMapString(ScriptRail::ERR_UNSUITABLE_TRACK, "ERR_UNSUITABLE_TRACK");
|
||||
ScriptError::RegisterErrorMapString(ScriptRail::ERR_RAILTYPE_DISALLOWS_CROSSING, "ERR_RAILTYPE_DISALLOWS_CROSSING");
|
||||
|
||||
SQGSRail.DefSQStaticMethod(engine, &ScriptRail::GetName, "GetName", 2, ".i");
|
||||
SQGSRail.DefSQStaticMethod(engine, &ScriptRail::IsRailTile, "IsRailTile", 2, ".i");
|
||||
SQGSRail.DefSQStaticMethod(engine, &ScriptRail::IsLevelCrossingTile, "IsLevelCrossingTile", 2, ".i");
|
||||
SQGSRail.DefSQStaticMethod(engine, &ScriptRail::IsRailDepotTile, "IsRailDepotTile", 2, ".i");
|
||||
SQGSRail.DefSQStaticMethod(engine, &ScriptRail::IsRailStationTile, "IsRailStationTile", 2, ".i");
|
||||
SQGSRail.DefSQStaticMethod(engine, &ScriptRail::IsRailWaypointTile, "IsRailWaypointTile", 2, ".i");
|
||||
SQGSRail.DefSQStaticMethod(engine, &ScriptRail::IsRailTypeAvailable, "IsRailTypeAvailable", 2, ".i");
|
||||
SQGSRail.DefSQStaticMethod(engine, &ScriptRail::GetCurrentRailType, "GetCurrentRailType", 1, ".");
|
||||
SQGSRail.DefSQStaticMethod(engine, &ScriptRail::SetCurrentRailType, "SetCurrentRailType", 2, ".i");
|
||||
SQGSRail.DefSQStaticMethod(engine, &ScriptRail::TrainCanRunOnRail, "TrainCanRunOnRail", 3, ".ii");
|
||||
SQGSRail.DefSQStaticMethod(engine, &ScriptRail::TrainHasPowerOnRail, "TrainHasPowerOnRail", 3, ".ii");
|
||||
SQGSRail.DefSQStaticMethod(engine, &ScriptRail::GetRailType, "GetRailType", 2, ".i");
|
||||
SQGSRail.DefSQStaticMethod(engine, &ScriptRail::ConvertRailType, "ConvertRailType", 4, ".iii");
|
||||
SQGSRail.DefSQStaticMethod(engine, &ScriptRail::GetRailDepotFrontTile, "GetRailDepotFrontTile", 2, ".i");
|
||||
SQGSRail.DefSQStaticMethod(engine, &ScriptRail::GetRailStationDirection, "GetRailStationDirection", 2, ".i");
|
||||
SQGSRail.DefSQStaticMethod(engine, &ScriptRail::BuildRailDepot, "BuildRailDepot", 3, ".ii");
|
||||
SQGSRail.DefSQStaticMethod(engine, &ScriptRail::BuildRailStation, "BuildRailStation", 6, ".iiiii");
|
||||
SQGSRail.DefSQStaticMethod(engine, &ScriptRail::BuildNewGRFRailStation, "BuildNewGRFRailStation", 11, ".iiiiiiiiib");
|
||||
SQGSRail.DefSQStaticMethod(engine, &ScriptRail::BuildRailWaypoint, "BuildRailWaypoint", 2, ".i");
|
||||
SQGSRail.DefSQStaticMethod(engine, &ScriptRail::RemoveRailWaypointTileRectangle, "RemoveRailWaypointTileRectangle", 4, ".iib");
|
||||
SQGSRail.DefSQStaticMethod(engine, &ScriptRail::RemoveRailStationTileRectangle, "RemoveRailStationTileRectangle", 4, ".iib");
|
||||
SQGSRail.DefSQStaticMethod(engine, &ScriptRail::GetRailTracks, "GetRailTracks", 2, ".i");
|
||||
SQGSRail.DefSQStaticMethod(engine, &ScriptRail::BuildRailTrack, "BuildRailTrack", 3, ".ii");
|
||||
SQGSRail.DefSQStaticMethod(engine, &ScriptRail::RemoveRailTrack, "RemoveRailTrack", 3, ".ii");
|
||||
SQGSRail.DefSQStaticMethod(engine, &ScriptRail::AreTilesConnected, "AreTilesConnected", 4, ".iii");
|
||||
SQGSRail.DefSQStaticMethod(engine, &ScriptRail::BuildRail, "BuildRail", 4, ".iii");
|
||||
SQGSRail.DefSQStaticMethod(engine, &ScriptRail::RemoveRail, "RemoveRail", 4, ".iii");
|
||||
SQGSRail.DefSQStaticMethod(engine, &ScriptRail::GetSignalType, "GetSignalType", 3, ".ii");
|
||||
SQGSRail.DefSQStaticMethod(engine, &ScriptRail::BuildSignal, "BuildSignal", 4, ".iii");
|
||||
SQGSRail.DefSQStaticMethod(engine, &ScriptRail::RemoveSignal, "RemoveSignal", 3, ".ii");
|
||||
SQGSRail.DefSQStaticMethod(engine, &ScriptRail::GetBuildCost, "GetBuildCost", 3, ".ii");
|
||||
SQGSRail.DefSQStaticMethod(engine, &ScriptRail::GetMaxSpeed, "GetMaxSpeed", 2, ".i");
|
||||
SQGSRail.DefSQStaticMethod(engine, &ScriptRail::GetMaintenanceCostFactor, "GetMaintenanceCostFactor", 2, ".i");
|
||||
|
||||
SQGSRail.PostRegister(engine);
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_railtypelist.hpp"
|
||||
#include "../template/template_railtypelist.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptRailTypeList, ST_GS>() { return "GSRailTypeList"; }
|
||||
|
||||
void SQGSRailTypeList_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptRailTypeList, ST_GS> SQGSRailTypeList("GSRailTypeList");
|
||||
SQGSRailTypeList.PreRegister(engine, "GSList");
|
||||
SQGSRailTypeList.AddConstructor<void (ScriptRailTypeList::*)(), 1>(engine, "x");
|
||||
|
||||
SQGSRailTypeList.PostRegister(engine);
|
||||
}
|
@ -1,93 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_road.hpp"
|
||||
#include "../template/template_road.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptRoad, ST_GS>() { return "GSRoad"; }
|
||||
|
||||
void SQGSRoad_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptRoad, ST_GS> SQGSRoad("GSRoad");
|
||||
SQGSRoad.PreRegister(engine);
|
||||
SQGSRoad.AddConstructor<void (ScriptRoad::*)(), 1>(engine, "x");
|
||||
|
||||
SQGSRoad.DefSQConst(engine, ScriptRoad::ERR_ROAD_BASE, "ERR_ROAD_BASE");
|
||||
SQGSRoad.DefSQConst(engine, ScriptRoad::ERR_ROAD_WORKS_IN_PROGRESS, "ERR_ROAD_WORKS_IN_PROGRESS");
|
||||
SQGSRoad.DefSQConst(engine, ScriptRoad::ERR_ROAD_DRIVE_THROUGH_WRONG_DIRECTION, "ERR_ROAD_DRIVE_THROUGH_WRONG_DIRECTION");
|
||||
SQGSRoad.DefSQConst(engine, ScriptRoad::ERR_ROAD_CANNOT_BUILD_ON_TOWN_ROAD, "ERR_ROAD_CANNOT_BUILD_ON_TOWN_ROAD");
|
||||
SQGSRoad.DefSQConst(engine, ScriptRoad::ERR_ROAD_ONE_WAY_ROADS_CANNOT_HAVE_JUNCTIONS, "ERR_ROAD_ONE_WAY_ROADS_CANNOT_HAVE_JUNCTIONS");
|
||||
SQGSRoad.DefSQConst(engine, ScriptRoad::ERR_ROADTYPE_DISALLOWS_CROSSING, "ERR_ROADTYPE_DISALLOWS_CROSSING");
|
||||
SQGSRoad.DefSQConst(engine, ScriptRoad::ERR_UNSUITABLE_ROAD, "ERR_UNSUITABLE_ROAD");
|
||||
SQGSRoad.DefSQConst(engine, ScriptRoad::ROADTYPE_ROAD, "ROADTYPE_ROAD");
|
||||
SQGSRoad.DefSQConst(engine, ScriptRoad::ROADTYPE_TRAM, "ROADTYPE_TRAM");
|
||||
SQGSRoad.DefSQConst(engine, ScriptRoad::ROADTYPE_INVALID, "ROADTYPE_INVALID");
|
||||
SQGSRoad.DefSQConst(engine, ScriptRoad::ROADTRAMTYPES_ROAD, "ROADTRAMTYPES_ROAD");
|
||||
SQGSRoad.DefSQConst(engine, ScriptRoad::ROADTRAMTYPES_TRAM, "ROADTRAMTYPES_TRAM");
|
||||
SQGSRoad.DefSQConst(engine, ScriptRoad::ROADVEHTYPE_BUS, "ROADVEHTYPE_BUS");
|
||||
SQGSRoad.DefSQConst(engine, ScriptRoad::ROADVEHTYPE_TRUCK, "ROADVEHTYPE_TRUCK");
|
||||
SQGSRoad.DefSQConst(engine, ScriptRoad::BT_ROAD, "BT_ROAD");
|
||||
SQGSRoad.DefSQConst(engine, ScriptRoad::BT_DEPOT, "BT_DEPOT");
|
||||
SQGSRoad.DefSQConst(engine, ScriptRoad::BT_BUS_STOP, "BT_BUS_STOP");
|
||||
SQGSRoad.DefSQConst(engine, ScriptRoad::BT_TRUCK_STOP, "BT_TRUCK_STOP");
|
||||
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_ROAD_WORKS_IN_PROGRESS, ScriptRoad::ERR_ROAD_WORKS_IN_PROGRESS);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_DRIVE_THROUGH_DIRECTION, ScriptRoad::ERR_ROAD_DRIVE_THROUGH_WRONG_DIRECTION);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_DRIVE_THROUGH_ON_TOWN_ROAD, ScriptRoad::ERR_ROAD_CANNOT_BUILD_ON_TOWN_ROAD);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_ONEWAY_ROADS_CAN_T_HAVE_JUNCTION, ScriptRoad::ERR_ROAD_ONE_WAY_ROADS_CANNOT_HAVE_JUNCTIONS);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_CROSSING_DISALLOWED_ROAD, ScriptRoad::ERR_ROADTYPE_DISALLOWS_CROSSING);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_NO_SUITABLE_ROAD, ScriptRoad::ERR_UNSUITABLE_ROAD);
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_NO_SUITABLE_TRAMWAY, ScriptRoad::ERR_UNSUITABLE_ROAD);
|
||||
|
||||
ScriptError::RegisterErrorMapString(ScriptRoad::ERR_ROAD_WORKS_IN_PROGRESS, "ERR_ROAD_WORKS_IN_PROGRESS");
|
||||
ScriptError::RegisterErrorMapString(ScriptRoad::ERR_ROAD_DRIVE_THROUGH_WRONG_DIRECTION, "ERR_ROAD_DRIVE_THROUGH_WRONG_DIRECTION");
|
||||
ScriptError::RegisterErrorMapString(ScriptRoad::ERR_ROAD_CANNOT_BUILD_ON_TOWN_ROAD, "ERR_ROAD_CANNOT_BUILD_ON_TOWN_ROAD");
|
||||
ScriptError::RegisterErrorMapString(ScriptRoad::ERR_ROAD_ONE_WAY_ROADS_CANNOT_HAVE_JUNCTIONS, "ERR_ROAD_ONE_WAY_ROADS_CANNOT_HAVE_JUNCTIONS");
|
||||
ScriptError::RegisterErrorMapString(ScriptRoad::ERR_ROADTYPE_DISALLOWS_CROSSING, "ERR_ROADTYPE_DISALLOWS_CROSSING");
|
||||
ScriptError::RegisterErrorMapString(ScriptRoad::ERR_UNSUITABLE_ROAD, "ERR_UNSUITABLE_ROAD");
|
||||
|
||||
SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::GetName, "GetName", 2, ".i");
|
||||
SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::GetRoadVehicleTypeForCargo, "GetRoadVehicleTypeForCargo", 2, ".i");
|
||||
SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::IsRoadTile, "IsRoadTile", 2, ".i");
|
||||
SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::IsRoadDepotTile, "IsRoadDepotTile", 2, ".i");
|
||||
SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::IsRoadStationTile, "IsRoadStationTile", 2, ".i");
|
||||
SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::IsDriveThroughRoadStationTile, "IsDriveThroughRoadStationTile", 2, ".i");
|
||||
SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::IsRoadTypeAvailable, "IsRoadTypeAvailable", 2, ".i");
|
||||
SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::GetCurrentRoadType, "GetCurrentRoadType", 1, ".");
|
||||
SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::SetCurrentRoadType, "SetCurrentRoadType", 2, ".i");
|
||||
SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::RoadVehCanRunOnRoad, "RoadVehCanRunOnRoad", 3, ".ii");
|
||||
SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::RoadVehHasPowerOnRoad, "RoadVehHasPowerOnRoad", 3, ".ii");
|
||||
SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::ConvertRoadType, "ConvertRoadType", 4, ".iii");
|
||||
SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::HasRoadType, "HasRoadType", 3, ".ii");
|
||||
SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::AreRoadTilesConnected, "AreRoadTilesConnected", 3, ".ii");
|
||||
SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::CanBuildConnectedRoadParts, "CanBuildConnectedRoadParts", 5, ".iaii");
|
||||
SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::CanBuildConnectedRoadPartsHere, "CanBuildConnectedRoadPartsHere", 4, ".iii");
|
||||
SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::GetNeighbourRoadCount, "GetNeighbourRoadCount", 2, ".i");
|
||||
SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::GetRoadDepotFrontTile, "GetRoadDepotFrontTile", 2, ".i");
|
||||
SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::GetRoadStationFrontTile, "GetRoadStationFrontTile", 2, ".i");
|
||||
SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::GetDriveThroughBackTile, "GetDriveThroughBackTile", 2, ".i");
|
||||
SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::BuildRoad, "BuildRoad", 3, ".ii");
|
||||
SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::BuildOneWayRoad, "BuildOneWayRoad", 3, ".ii");
|
||||
SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::BuildRoadFull, "BuildRoadFull", 3, ".ii");
|
||||
SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::BuildOneWayRoadFull, "BuildOneWayRoadFull", 3, ".ii");
|
||||
SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::BuildRoadDepot, "BuildRoadDepot", 3, ".ii");
|
||||
SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::BuildRoadStation, "BuildRoadStation", 5, ".iiii");
|
||||
SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::BuildDriveThroughRoadStation, "BuildDriveThroughRoadStation", 5, ".iiii");
|
||||
SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::RemoveRoad, "RemoveRoad", 3, ".ii");
|
||||
SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::RemoveRoadFull, "RemoveRoadFull", 3, ".ii");
|
||||
SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::RemoveRoadDepot, "RemoveRoadDepot", 2, ".i");
|
||||
SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::RemoveRoadStation, "RemoveRoadStation", 2, ".i");
|
||||
SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::GetBuildCost, "GetBuildCost", 3, ".ii");
|
||||
SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::GetRoadTramType, "GetRoadTramType", 2, ".i");
|
||||
SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::GetMaxSpeed, "GetMaxSpeed", 2, ".i");
|
||||
SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::GetMaintenanceCostFactor, "GetMaintenanceCostFactor", 2, ".i");
|
||||
|
||||
SQGSRoad.PostRegister(engine);
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_roadtypelist.hpp"
|
||||
#include "../template/template_roadtypelist.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptRoadTypeList, ST_GS>() { return "GSRoadTypeList"; }
|
||||
|
||||
void SQGSRoadTypeList_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptRoadTypeList, ST_GS> SQGSRoadTypeList("GSRoadTypeList");
|
||||
SQGSRoadTypeList.PreRegister(engine, "GSList");
|
||||
SQGSRoadTypeList.AddConstructor<void (ScriptRoadTypeList::*)(ScriptRoad::RoadTramTypes rtts), 2>(engine, "xi");
|
||||
|
||||
SQGSRoadTypeList.PostRegister(engine);
|
||||
}
|
@ -1,38 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_sign.hpp"
|
||||
#include "../template/template_sign.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptSign, ST_GS>() { return "GSSign"; }
|
||||
|
||||
void SQGSSign_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptSign, ST_GS> SQGSSign("GSSign");
|
||||
SQGSSign.PreRegister(engine);
|
||||
SQGSSign.AddConstructor<void (ScriptSign::*)(), 1>(engine, "x");
|
||||
|
||||
SQGSSign.DefSQConst(engine, ScriptSign::ERR_SIGN_BASE, "ERR_SIGN_BASE");
|
||||
SQGSSign.DefSQConst(engine, ScriptSign::ERR_SIGN_TOO_MANY_SIGNS, "ERR_SIGN_TOO_MANY_SIGNS");
|
||||
|
||||
ScriptError::RegisterErrorMap(STR_ERROR_TOO_MANY_SIGNS, ScriptSign::ERR_SIGN_TOO_MANY_SIGNS);
|
||||
|
||||
ScriptError::RegisterErrorMapString(ScriptSign::ERR_SIGN_TOO_MANY_SIGNS, "ERR_SIGN_TOO_MANY_SIGNS");
|
||||
|
||||
SQGSSign.DefSQStaticMethod(engine, &ScriptSign::IsValidSign, "IsValidSign", 2, ".i");
|
||||
SQGSSign.DefSQStaticMethod(engine, &ScriptSign::SetName, "SetName", 3, ".i.");
|
||||
SQGSSign.DefSQStaticMethod(engine, &ScriptSign::GetName, "GetName", 2, ".i");
|
||||
SQGSSign.DefSQStaticMethod(engine, &ScriptSign::GetOwner, "GetOwner", 2, ".i");
|
||||
SQGSSign.DefSQStaticMethod(engine, &ScriptSign::GetLocation, "GetLocation", 2, ".i");
|
||||
SQGSSign.DefSQStaticMethod(engine, &ScriptSign::BuildSign, "BuildSign", 3, ".i.");
|
||||
SQGSSign.DefSQStaticMethod(engine, &ScriptSign::RemoveSign, "RemoveSign", 2, ".i");
|
||||
|
||||
SQGSSign.PostRegister(engine);
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
|
||||
|
||||
#include "../script_signlist.hpp"
|
||||
#include "../template/template_signlist.hpp.sq"
|
||||
|
||||
|
||||
template <> const char *GetClassName<ScriptSignList, ST_GS>() { return "GSSignList"; }
|
||||
|
||||
void SQGSSignList_Register(Squirrel *engine)
|
||||
{
|
||||
DefSQClass<ScriptSignList, ST_GS> SQGSSignList("GSSignList");
|
||||
SQGSSignList.PreRegister(engine, "GSList");
|
||||
SQGSSignList.AddConstructor<void (ScriptSignList::*)(), 1>(engine, "x");
|
||||
|
||||
SQGSSignList.PostRegister(engine);
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user