mirror of
https://github.com/etlegacy/etlegacy-lua-docs.git
synced 2024-11-24 13:01:13 +00:00
Revert renaming for now
This mostly reverts commit 762f048f8f
,
except when irrelevant.
This commit can be reverted when/if renamng is done.
This commit is contained in:
parent
c665019cf9
commit
d04712feda
10 changed files with 32 additions and 32 deletions
8
Makefile
8
Makefile
|
@ -91,9 +91,9 @@ qthelp:
|
||||||
@echo
|
@echo
|
||||||
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
|
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
|
||||||
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
|
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
|
||||||
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/LeagueLuaAPI.qhcp"
|
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/LegacyLuaAPI.qhcp"
|
||||||
@echo "To view the help file:"
|
@echo "To view the help file:"
|
||||||
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/LeagueLuaAPI.qhc"
|
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/LegacyLuaAPI.qhc"
|
||||||
|
|
||||||
.PHONY: applehelp
|
.PHONY: applehelp
|
||||||
applehelp:
|
applehelp:
|
||||||
|
@ -110,8 +110,8 @@ devhelp:
|
||||||
@echo
|
@echo
|
||||||
@echo "Build finished."
|
@echo "Build finished."
|
||||||
@echo "To view the help file:"
|
@echo "To view the help file:"
|
||||||
@echo "# mkdir -p $$HOME/.local/share/devhelp/LeagueLuaAPI"
|
@echo "# mkdir -p $$HOME/.local/share/devhelp/LegacyLuaAPI"
|
||||||
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/LeagueLuaAPI"
|
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/LegacyLuaAPI"
|
||||||
@echo "# devhelp"
|
@echo "# devhelp"
|
||||||
|
|
||||||
.PHONY: epub
|
.PHONY: epub
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# League Lua API documentation [![Documentation Status](https://readthedocs.org/projects/etlegacy-lua-docs/badge/?version=latest)](http://etlegacy-lua-docs.readthedocs.io/en/latest/?badge=latest)
|
# Legacy Lua API documentation [![Documentation Status](https://readthedocs.org/projects/etlegacy-lua-docs/badge/?version=latest)](http://etlegacy-lua-docs.readthedocs.io/en/latest/?badge=latest)
|
||||||
|
|
||||||
League's Lua API is the interface for communication between Lua and League mod.
|
Legacy's Lua API is the interface for communication between Lua and Legacy mod.
|
||||||
|
|
||||||
This documentation is generated with [Sphinx](http://www.sphinx-doc.org/) using the [reStructuredText](http://www.sphinx-doc.org/en/stable/rest.html) markup language.
|
This documentation is generated with [Sphinx](http://www.sphinx-doc.org/) using the [reStructuredText](http://www.sphinx-doc.org/en/stable/rest.html) markup language.
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ Called when qagame runs a server frame.
|
||||||
et_Quit()
|
et_Quit()
|
||||||
---------
|
---------
|
||||||
|
|
||||||
Called when League unloads the mod.
|
Called when Legacy unloads the mod.
|
||||||
|
|
||||||
The mod should close all open filedescriptors and perform all cleanup.
|
The mod should close all open filedescriptors and perform all cleanup.
|
||||||
|
|
||||||
|
|
16
conf.py
16
conf.py
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
#
|
#
|
||||||
# League Lua API documentation build configuration file, created by
|
# Legacy Lua API documentation build configuration file, created by
|
||||||
# sphinx-quickstart on Tue Sep 13 00:05:27 2016.
|
# sphinx-quickstart on Tue Sep 13 00:05:27 2016.
|
||||||
#
|
#
|
||||||
# This file is execfile()d with the current directory set to its
|
# This file is execfile()d with the current directory set to its
|
||||||
|
@ -52,7 +52,7 @@ source_suffix = '.rst'
|
||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
|
|
||||||
# General information about the project.
|
# General information about the project.
|
||||||
project = 'League Lua API'
|
project = 'Legacy Lua API'
|
||||||
copyright = '2012-2020, ET: Legacy Team'
|
copyright = '2012-2020, ET: Legacy Team'
|
||||||
author = 'ET: Legacy Team'
|
author = 'ET: Legacy Team'
|
||||||
|
|
||||||
|
@ -137,7 +137,7 @@ html_theme = 'sphinx_rtd_theme'
|
||||||
# The name for this set of Sphinx documents.
|
# The name for this set of Sphinx documents.
|
||||||
# "<project> v<release> documentation" by default.
|
# "<project> v<release> documentation" by default.
|
||||||
#
|
#
|
||||||
# html_title = 'League Lua API v2.76'
|
# html_title = 'Legacy Lua API v2.76'
|
||||||
|
|
||||||
# A shorter title for the navigation bar. Default is the same as html_title.
|
# A shorter title for the navigation bar. Default is the same as html_title.
|
||||||
#
|
#
|
||||||
|
@ -237,7 +237,7 @@ html_static_path = ['_static']
|
||||||
# html_search_scorer = 'scorer.js'
|
# html_search_scorer = 'scorer.js'
|
||||||
|
|
||||||
# Output file base name for HTML help builder.
|
# Output file base name for HTML help builder.
|
||||||
htmlhelp_basename = 'LeagueLuaAPIdoc'
|
htmlhelp_basename = 'LegacyLuaAPIdoc'
|
||||||
|
|
||||||
# -- Options for LaTeX output ---------------------------------------------
|
# -- Options for LaTeX output ---------------------------------------------
|
||||||
|
|
||||||
|
@ -263,7 +263,7 @@ latex_elements = {
|
||||||
# (source start file, target name, title,
|
# (source start file, target name, title,
|
||||||
# author, documentclass [howto, manual, or own class]).
|
# author, documentclass [howto, manual, or own class]).
|
||||||
latex_documents = [
|
latex_documents = [
|
||||||
(master_doc, 'LeagueLuaAPI.tex', 'League Lua API Documentation',
|
(master_doc, 'LegacyLuaAPI.tex', 'Legacy Lua API Documentation',
|
||||||
'ET: Legacy Team', 'manual'),
|
'ET: Legacy Team', 'manual'),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -305,7 +305,7 @@ latex_documents = [
|
||||||
# One entry per manual page. List of tuples
|
# One entry per manual page. List of tuples
|
||||||
# (source start file, name, description, authors, manual section).
|
# (source start file, name, description, authors, manual section).
|
||||||
man_pages = [
|
man_pages = [
|
||||||
(master_doc, 'leagueluaapi', 'League Lua API Documentation',
|
(master_doc, 'legacyluaapi', 'Legacy Lua API Documentation',
|
||||||
[author], 1)
|
[author], 1)
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -320,8 +320,8 @@ man_pages = [
|
||||||
# (source start file, target name, title, author,
|
# (source start file, target name, title, author,
|
||||||
# dir menu entry, description, category)
|
# dir menu entry, description, category)
|
||||||
texinfo_documents = [
|
texinfo_documents = [
|
||||||
(master_doc, 'LeagueLuaAPI', 'League Lua API Documentation',
|
(master_doc, 'LegacyLuaAPI', 'Legacy Lua API Documentation',
|
||||||
author, 'LeagueLuaAPI', 'One line description of project.',
|
author, 'LegacyLuaAPI', 'One line description of project.',
|
||||||
'Miscellaneous'),
|
'Miscellaneous'),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -511,12 +511,12 @@ Lua constants
|
||||||
================= ==================================== ==================
|
================= ==================================== ==================
|
||||||
Name Value Description
|
Name Value Description
|
||||||
================= ==================================== ==================
|
================= ==================================== ==================
|
||||||
LUA_PATH ./league/?.lua; Ease use of the require function
|
LUA_PATH ./legacy/?.lua; Ease use of the require function
|
||||||
./league/lualibs/?.lua; to load scripts
|
./legacy/lualibs/?.lua; to load scripts
|
||||||
fs_homepath/fs_game/?.lua;
|
fs_homepath/fs_game/?.lua;
|
||||||
fs_homepath/fs_game/lualibs/?.lua
|
fs_homepath/fs_game/lualibs/?.lua
|
||||||
LUA_CPATH ./league/lualibs/?.so; Ease use of the require function
|
LUA_CPATH ./legacy/lualibs/?.so; Ease use of the require function
|
||||||
fs_homepath/league/lualibs/?.so to load libraries
|
fs_homepath/legacy/lualibs/?.so to load libraries
|
||||||
LUA_DIRSEP / Directory separator
|
LUA_DIRSEP / Directory separator
|
||||||
_VERSION Lua 5.4 Lua version
|
_VERSION Lua 5.4 Lua version
|
||||||
================= ==================================== ==================
|
================= ==================================== ==================
|
||||||
|
|
|
@ -11,7 +11,7 @@ Cvars
|
||||||
lua_modules
|
lua_modules
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
Space separated list of lua modules for League mod to load. Modules will be run in the order listed.
|
Space separated list of lua modules for Legacy mod to load. Modules will be run in the order listed.
|
||||||
|
|
||||||
|
|
||||||
lua_allowedmodules
|
lua_allowedmodules
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
Database
|
Database
|
||||||
========
|
========
|
||||||
|
|
||||||
Both the League mod and the ET: Legacy engine are built-in with `SQLite3 <https://www.sqlite.org/>`_ database support. The engine allows to execute SQL statement directly in console, while the League mod has access through `LuaSQL <https://keplerproject.github.io/luasql/>`_.
|
Both the Legacy mod and the ET: Legacy engine are built-in with `SQLite3 <https://www.sqlite.org/>`_ database support. The engine allows to execute SQL statement directly in console, while the Legacy mod has access through `LuaSQL <https://keplerproject.github.io/luasql/>`_.
|
||||||
|
|
||||||
.. tip:: See the `Database <sample.html#database>`__ sample code for an example of basic database usage.
|
.. tip:: See the `Database <sample.html#database>`__ sample code for an example of basic database usage.
|
||||||
|
|
||||||
|
|
16
index.rst
16
index.rst
|
@ -1,27 +1,27 @@
|
||||||
.. League Lua API documentation master file, created by
|
.. Legacy Lua API documentation master file, created by
|
||||||
sphinx-quickstart on Tue Sep 13 00:05:27 2016.
|
sphinx-quickstart on Tue Sep 13 00:05:27 2016.
|
||||||
You can adapt this file completely to your liking, but it should at least
|
You can adapt this file completely to your liking, but it should at least
|
||||||
contain the root `toctree` directive.
|
contain the root `toctree` directive.
|
||||||
|
|
||||||
League Lua API documentation
|
Legacy Lua API documentation
|
||||||
============================
|
============================
|
||||||
|
|
||||||
Welcome to the League Lua API's documentation!
|
Welcome to the Legacy 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 **Legacy 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 Legacy Lua API being the interface for communication between them.
|
||||||
|
|
||||||
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.
|
The embedded **Lua 5.4** interpreter will load user-defined scripts if present in the `legacy` 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 Legacy 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.
|
||||||
|
|
||||||
Through special functions, it is also possible to alter internal structures or entities (manipulate client XP, set and read cvars, remap shaders, etc.).
|
Through special functions, it is also possible to alter internal structures or entities (manipulate client XP, set and read cvars, remap shaders, etc.).
|
||||||
For example, if a player dies the `et_Obituary( victim, killer, meansOfDeath ) <callbacks.html#et-obituary-target-attacker-meansofdeath>`__ function is executed, and the Lua API allows you to manipulate and control this information.
|
For example, if a player dies the `et_Obituary( victim, killer, meansOfDeath ) <callbacks.html#et-obituary-target-attacker-meansofdeath>`__ function is executed, and the Lua API allows you to manipulate and control this information.
|
||||||
|
|
||||||
.. note:: Like qagame, Lua modules are unloaded and reloaded on `map_restart` and map changes, which means that all global variables and other information is lost. Persistent data can be stored in `cvars <functions.html#cvars>`__, external `files <functions.html#filesystem>`__ or `database <database.html>`__.
|
.. note:: Like qagame, Lua modules are unloaded and reloaded on `map_restart` and map changes, which means that all global variables and other information is lost. Persistent data can be stored in `cvars <functions.html#cvars>`__, external `files <functions.html#filesystem>`__ or `database <database.html>`__.
|
||||||
|
|
||||||
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.
|
Legacy'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 Legacy mod's Lua API.
|
||||||
|
|
||||||
.. 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.
|
.. important:: As Legacy 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
|
||||||
|
|
4
make.bat
4
make.bat
|
@ -129,9 +129,9 @@ if "%1" == "qthelp" (
|
||||||
echo.
|
echo.
|
||||||
echo.Build finished; now you can run "qcollectiongenerator" with the ^
|
echo.Build finished; now you can run "qcollectiongenerator" with the ^
|
||||||
.qhcp project file in %BUILDDIR%/qthelp, like this:
|
.qhcp project file in %BUILDDIR%/qthelp, like this:
|
||||||
echo.^> qcollectiongenerator %BUILDDIR%\qthelp\LeagueLuaAPI.qhcp
|
echo.^> qcollectiongenerator %BUILDDIR%\qthelp\LegacyLuaAPI.qhcp
|
||||||
echo.To view the help file:
|
echo.To view the help file:
|
||||||
echo.^> assistant -collectionFile %BUILDDIR%\qthelp\LeagueLuaAPI.ghc
|
echo.^> assistant -collectionFile %BUILDDIR%\qthelp\LegacyLuaAPI.ghc
|
||||||
goto end
|
goto end
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
Sample code
|
Sample code
|
||||||
===========
|
===========
|
||||||
|
|
||||||
.. tip:: If you want to see some specific Lua examples, you can check the `Lua scripts <https://github.com/etlegacy/etlegacy-lua-scripts>`_ repository.
|
.. tip:: If you want to see some specific Lua examples, you can check the `ET Legacy Lua scripts <https://github.com/etlegacy/etlegacy-lua-scripts>`_ repository.
|
||||||
|
|
||||||
|
|
||||||
General
|
General
|
||||||
|
|
Loading…
Reference in a new issue