Updated for Lua 5.4

This commit is contained in:
Remy Marquis 2020-06-30 14:18:12 +02:00
parent 762f048f8f
commit c665019cf9
3 changed files with 10 additions and 10 deletions

View file

@ -518,5 +518,5 @@ LUA_PATH ./league/?.lua; Ease use of the require
LUA_CPATH ./league/lualibs/?.so; Ease use of the require function LUA_CPATH ./league/lualibs/?.so; Ease use of the require function
fs_homepath/league/lualibs/?.so to load libraries fs_homepath/league/lualibs/?.so to load libraries
LUA_DIRSEP / Directory separator LUA_DIRSEP / Directory separator
_VERSION Lua 5.3 Lua version _VERSION Lua 5.4 Lua version
================= ==================================== ================== ================= ==================================== ==================

View file

@ -10,7 +10,7 @@ Welcome to the League Lua API's documentation!
The **League mod** is the default mod shipped with `ET: Legacy <http://www.etlegacy.com>`_. It supports server-side modifications via the `Lua <http://www.lua.org/>`_ scripting language, with the League Lua API being the interface for communication between them. The **League mod** is the default mod shipped with `ET: Legacy <http://www.etlegacy.com>`_. It supports server-side modifications via the `Lua <http://www.lua.org/>`_ scripting language, with the League Lua API being the interface for communication between them.
The embedded **Lua 5.3** interpreter will load user-defined scripts if present in the `league` directory. The Lua API provides an "et" library of `function calls <functions.html>`__ that allow access to the server engine, and also provides `callbacks <callbacks.html>`__ so a server side mod may trigger on specific server events. The embedded **Lua 5.4** interpreter will load user-defined scripts if present in the `league` directory. The Lua API provides an "et" library of `function calls <functions.html>`__ that allow access to the server engine, and also provides `callbacks <callbacks.html>`__ so a server side mod may trigger on specific server events.
In some cases values can be returned to League mod, whenever something is intercepted (i.e. a command) and prevented to be further handled. This way, new commands can easily be defined or existing ones can be altered. In some cases values can be returned to League mod, whenever something is intercepted (i.e. a command) and prevented to be further handled. This way, new commands can easily be defined or existing ones can be altered.
@ -21,7 +21,7 @@ For example, if a player dies the `et_Obituary( victim, killer, meansOfDeath ) <
League's Lua API follows mostly the `ETPub <http://www.etpub.org/>`_ implementation with partial code of the NoQuarter implemention. The ETPub implementation being built to be compatible with `ETPro's Lua <http://wolfwiki.anime.net/index.php/Lua_Mod_API>`_, all scripts written in ETPro's documentation should be valid and more or less compatible with League mod's Lua API. League's Lua API follows mostly the `ETPub <http://www.etpub.org/>`_ implementation with partial code of the NoQuarter implemention. The ETPub implementation being built to be compatible with `ETPro's Lua <http://wolfwiki.anime.net/index.php/Lua_Mod_API>`_, all scripts written in ETPro's documentation should be valid and more or less compatible with League mod's Lua API.
.. important:: As League uses the newer Lua 5.3, you might want to check the **Incompatibilities with the Previous Version** sections of the `Lua 5.1 <https://www.lua.org/manual/5.1/manual.html#7>`_, `Lua 5.2 <https://www.lua.org/manual/5.2/manual.html#8>`_, and `Lua 5.3 <https://www.lua.org/manual/5.3/manual.html#8>`_ manuals while porting scripts written for other mods. .. important:: As League uses the newer Lua 5.4, you might want to check the **Incompatibilities with the Previous Version** sections of the `Lua 5.1 <https://www.lua.org/manual/5.1/manual.html#7>`_, `Lua 5.2 <https://www.lua.org/manual/5.2/manual.html#8>`_, `Lua 5.3 <https://www.lua.org/manual/5.3/manual.html#8>`_, and `Lua 5.4 <https://www.lua.org/manual/5.4/manual.html#8>`_ manuals while porting scripts written for other mods.
.. toctree:: .. toctree::
:maxdepth: 2 :maxdepth: 2

View file

@ -4,11 +4,11 @@ Standard libraries
The following **standard Lua libraries** are initialized by default and are available to scripts: The following **standard Lua libraries** are initialized by default and are available to scripts:
* `basic <http://www.lua.org/manual/5.3/manual.html#6.1>`_ * `basic <http://www.lua.org/manual/5.4/manual.html#6.1>`_
* `string <http://www.lua.org/manual/5.3/manual.html#6.4>`_ * `string <http://www.lua.org/manual/5.4/manual.html#6.4>`_
* `table <http://www.lua.org/manual/5.3/manual.html#6.6>`_ * `table <http://www.lua.org/manual/5.4/manual.html#6.6>`_
* `math <http://www.lua.org/manual/5.3/manual.html#6.7>`_ * `math <http://www.lua.org/manual/5.4/manual.html#6.7>`_
* `i/o <http://www.lua.org/manual/5.3/manual.html#6.8>`_ * `i/o <http://www.lua.org/manual/5.4/manual.html#6.8>`_
* `os <http://www.lua.org/manual/5.3/manual.html#6.9>`_ (available features vary depending on your OS) * `os <http://www.lua.org/manual/5.4/manual.html#6.9>`_ (available features vary depending on your OS)
.. tip:: For more information about Lua, check out the `Reference Manual <http://www.lua.org/manual/5.3/>`_, the online edition of the book `Programming in Lua <http://www.lua.org/pil/>`_ or the `Lua-users wiki <http://lua-users.org/wiki/>`_. .. tip:: For more information about Lua, check out the `Reference Manual <http://www.lua.org/manual/5.4/>`_, the online edition of the book `Programming in Lua <http://www.lua.org/pil/>`_ or the `Lua-users wiki <http://lua-users.org/wiki/>`_.