Дополнительные действия
Это страница документации Модуль:Lua.
Some functions for checking the existence of modules and loading them in the iCCup environment.
API[править код]
-
Программное имя: Lua
Checks if a module with the given name exists.
{{#iccupdb_datapoint:API_Lua/doc_moduleExists
|type=api
|name=moduleExists
|information=
|image=
|date=
|extradata={{#iccupdb_create_json:
|description=Checks if a module with the given name exists.
|params=name: string
|returns=boolean
|module=Module:Lua
}}
}}
Requires the module if it exists and returns the default otherwise.
{{#iccupdb_datapoint:API_Lua/doc_requireIfExists
|type=api
|name=requireIfExists
|information=
|image=
|date=
|extradata={{#iccupdb_create_json:
|description=Requires the module if it exists and returns the default otherwise.
|params=name: string, options: table
|returns=Module require or default
|module=Module:Lua
}}
}}
Loads the module data if the module exists and returns the default otherwise.
{{#iccupdb_datapoint:API_Lua/doc_loadDataIfExists
|type=api
|name=loadDataIfExists
|information=
|image=
|date=
|extradata={{#iccupdb_create_json:
|description=Loads the module data if the module exists and returns the default otherwise.
|params=name: string
|returns=Module data or default
|module=Module:Lua
}}
}}
Imports a module by its name. If in development mode, the corresponding `/dev` module may be loaded instead.
{{#iccupdb_datapoint:API_Lua/doc_import
|type=api
|name=import
|information=
|image=
|date=
|extradata={{#iccupdb_create_json:
|description=Imports a module by its name. If in development mode, the corresponding `/dev` module may be loaded instead.
|params=name: string, options: table?
|returns=Module
|module=Module:Lua
}}
}}
Посмотрите всю нашу документацию iCCup здесь.