diff --git a/Makefile b/Makefile index 671327d..5976f55 100644 --- a/Makefile +++ b/Makefile @@ -91,9 +91,9 @@ qthelp: @echo @echo "Build finished; now you can run "qcollectiongenerator" with the" \ ".qhcp project file in $(BUILDDIR)/qthelp, like this:" - @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/LegacyLuaAPI.qhcp" + @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/LeagueLuaAPI.qhcp" @echo "To view the help file:" - @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/LegacyLuaAPI.qhc" + @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/LeagueLuaAPI.qhc" .PHONY: applehelp applehelp: @@ -110,8 +110,8 @@ devhelp: @echo @echo "Build finished." @echo "To view the help file:" - @echo "# mkdir -p $$HOME/.local/share/devhelp/LegacyLuaAPI" - @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/LegacyLuaAPI" + @echo "# mkdir -p $$HOME/.local/share/devhelp/LeagueLuaAPI" + @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/LeagueLuaAPI" @echo "# devhelp" .PHONY: epub diff --git a/README.md b/README.md index 467f4fa..9ae99a0 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ -# Legacy Lua API documentation [![Documentation Status](https://readthedocs.org/projects/legacy-lua-api/badge/?version=latest)](http://legacy-lua-api.readthedocs.io/en/latest/?badge=latest) +# 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's Lua API is the interface for communication between Lua and Legacy mod. +League's Lua API is the interface for communication between Lua and League 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. -It can be read online at [legacy-lua-api.rtfd.io](http://legacy-lua-api.rtfd.io). +It can be read online at [etlegacy-lua-docs.rtfd.io](http://etlegacy-lua-docs.rtfd.io). diff --git a/callbacks.rst b/callbacks.rst index 19d511c..31613ed 100644 --- a/callbacks.rst +++ b/callbacks.rst @@ -38,7 +38,7 @@ Called when qagame runs a server frame. et_Quit() --------- -Called when Legacy unloads the mod. +Called when League unloads the mod. The mod should close all open filedescriptors and perform all cleanup. diff --git a/conf.py b/conf.py index ed9e47d..27c389f 100644 --- a/conf.py +++ b/conf.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- # -# Legacy Lua API documentation build configuration file, created by +# League Lua API documentation build configuration file, created by # sphinx-quickstart on Tue Sep 13 00:05:27 2016. # # This file is execfile()d with the current directory set to its @@ -52,7 +52,7 @@ source_suffix = '.rst' master_doc = 'index' # General information about the project. -project = 'Legacy Lua API' +project = 'League Lua API' copyright = '2012-2020, ET: Legacy Team' author = 'ET: Legacy Team' @@ -137,7 +137,7 @@ html_theme = 'sphinx_rtd_theme' # The name for this set of Sphinx documents. # " v documentation" by default. # -# html_title = 'Legacy Lua API v2.76' +# html_title = 'League Lua API v2.76' # 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' # Output file base name for HTML help builder. -htmlhelp_basename = 'LegacyLuaAPIdoc' +htmlhelp_basename = 'LeagueLuaAPIdoc' # -- Options for LaTeX output --------------------------------------------- @@ -263,7 +263,7 @@ latex_elements = { # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ - (master_doc, 'LegacyLuaAPI.tex', 'Legacy Lua API Documentation', + (master_doc, 'LeagueLuaAPI.tex', 'League Lua API Documentation', 'ET: Legacy Team', 'manual'), ] @@ -305,7 +305,7 @@ latex_documents = [ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ - (master_doc, 'legacyluaapi', 'Legacy Lua API Documentation', + (master_doc, 'leagueluaapi', 'League Lua API Documentation', [author], 1) ] @@ -320,8 +320,8 @@ man_pages = [ # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ - (master_doc, 'LegacyLuaAPI', 'Legacy Lua API Documentation', - author, 'LegacyLuaAPI', 'One line description of project.', + (master_doc, 'LeagueLuaAPI', 'League Lua API Documentation', + author, 'LeagueLuaAPI', 'One line description of project.', 'Miscellaneous'), ] diff --git a/constants.rst b/constants.rst index 29eaa25..2277ad1 100644 --- a/constants.rst +++ b/constants.rst @@ -51,7 +51,7 @@ et.CS_INTERMISSION_START_TIME 36 et.CS_ENDGAME_STATS 37 et.CS_CHARGETIMES 38 et.CS_FILTERCAMS 39 -et.CS_LEGACYINFO 40 +et.CS_MODINFO 40 et.CS_SVCVAR 41 et.CS_CONFIGNAME 42 et.CS_TEAMRESTRICTIONS 43 @@ -511,12 +511,12 @@ Lua constants ================= ==================================== ================== Name Value Description ================= ==================================== ================== -LUA_PATH ./legacy/?.lua; Ease use of the require function - ./legacy/lualibs/?.lua; to load scripts +LUA_PATH ./league/?.lua; Ease use of the require function + ./league/lualibs/?.lua; to load scripts fs_homepath/fs_game/?.lua; fs_homepath/fs_game/lualibs/?.lua -LUA_CPATH ./legacy/lualibs/?.so; Ease use of the require function - fs_homepath/legacy/lualibs/?.so to load libraries +LUA_CPATH ./league/lualibs/?.so; Ease use of the require function + fs_homepath/league/lualibs/?.so to load libraries LUA_DIRSEP / Directory separator _VERSION Lua 5.3 Lua version ================= ==================================== ================== diff --git a/cvars.rst b/cvars.rst index cd9d3df..936e732 100644 --- a/cvars.rst +++ b/cvars.rst @@ -11,7 +11,7 @@ Cvars lua_modules ----------- -Space separated list of lua modules for Legacy mod to load. Modules will be run in the order listed. +Space separated list of lua modules for League mod to load. Modules will be run in the order listed. lua_allowedmodules diff --git a/database.rst b/database.rst index b6ffc36..6ce2cf0 100644 --- a/database.rst +++ b/database.rst @@ -2,7 +2,7 @@ Database ======== -Both the Legacy mod and the ET: Legacy engine are built-in with `SQLite3 `_ database support. The engine allows to execute SQL statement directly in console, while the Legacy mod has access through `LuaSQL `_. +Both the League mod and the ET: Legacy engine are built-in with `SQLite3 `_ database support. The engine allows to execute SQL statement directly in console, while the League mod has access through `LuaSQL `_. .. tip:: See the `Database `__ sample code for an example of basic database usage. @@ -73,9 +73,9 @@ If desired, Lua scripts can also connect to the engine memory database by the fo conn = assert(env:connect("file::memory:?cache=shared")) -.. Note:: The database is only active when the `db_mode `_ cvar is set. +.. Note:: The database is only active when the *db_mode* cvar is set. -To save this in memory database to disk use the **saveDB** console command. See also the `db_url `_ cvar to specify the database path. +To save this in memory database to disk use the **saveDB** console command. See also the *db_url* cvar to specify the database path. Connection objects diff --git a/fields.rst b/fields.rst index 07f8394..83310d1 100644 --- a/fields.rst +++ b/fields.rst @@ -289,7 +289,7 @@ vec3 ---- A vec3_t is a 3-element array of numbers, usually used to store and process coordinates in 3D space. -Similarly, in Legacy a vector is an array (table indexed by integers) containing 3 numbers. It can be accessed by:: +Similarly, a vector is an array (table indexed by integers) containing 3 numbers. It can be accessed by:: origin = et.gentity_get(entNum, "r.currentOrigin") --a vec3 value x, y, z = origin[1], origin[2], origin[3] diff --git a/index.rst b/index.rst index 1bc3860..ff21898 100644 --- a/index.rst +++ b/index.rst @@ -1,27 +1,27 @@ -.. Legacy Lua API documentation master file, created by +.. League Lua API documentation master file, created by sphinx-quickstart on Tue Sep 13 00:05:27 2016. You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. -Legacy Lua API -============== +League Lua API documentation +============================ -Welcome to the Legacy Lua API's documentation! +Welcome to the League Lua API's documentation! -The **Legacy mod** is the default mod shipped with `ET: Legacy `_. It supports server-side modifications via the `Lua `_ scripting language, with the Legacy Lua API being the interface for communication between them. +The **League mod** is the default mod shipped with `ET: Legacy `_. It supports server-side modifications via the `Lua `_ 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 `legacy` directory. The Lua API provides an "et" library of `function calls `__ that allow access to the server engine, and also provides `callbacks `__ so a server side mod may trigger on specific server events. +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 `__ that allow access to the server engine, and also provides `callbacks `__ so a server side mod may trigger on specific server events. -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. +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. 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 ) `__ 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 `__, external `files `__ or `database `__. -Legacy's Lua API follows mostly the `ETPub `_ implementation with partial code of the NoQuarter implemention. The ETPub implementation being built to be compatible with `ETPro's Lua `_, all scripts written in ETPro's documentation should be valid and more or less compatible with Legacy mod's Lua API. +League's Lua API follows mostly the `ETPub `_ implementation with partial code of the NoQuarter implemention. The ETPub implementation being built to be compatible with `ETPro's Lua `_, all scripts written in ETPro's documentation should be valid and more or less compatible with League mod's Lua API. -.. important:: As Legacy uses the newer Lua 5.3, you might want to check the **Incompatibilities with the Previous Version** sections of the `Lua 5.1 `_, `Lua 5.2 `_, and `Lua 5.3 `_ manuals while porting scripts written for other mods. +.. 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 `_, `Lua 5.2 `_, and `Lua 5.3 `_ manuals while porting scripts written for other mods. .. toctree:: :maxdepth: 2 diff --git a/make.bat b/make.bat index 0809614..a51f3de 100644 --- a/make.bat +++ b/make.bat @@ -129,9 +129,9 @@ if "%1" == "qthelp" ( echo. echo.Build finished; now you can run "qcollectiongenerator" with the ^ .qhcp project file in %BUILDDIR%/qthelp, like this: - echo.^> qcollectiongenerator %BUILDDIR%\qthelp\LegacyLuaAPI.qhcp + echo.^> qcollectiongenerator %BUILDDIR%\qthelp\LeagueLuaAPI.qhcp echo.To view the help file: - echo.^> assistant -collectionFile %BUILDDIR%\qthelp\LegacyLuaAPI.ghc + echo.^> assistant -collectionFile %BUILDDIR%\qthelp\LeagueLuaAPI.ghc goto end ) diff --git a/sample.rst b/sample.rst index 064654a..8647d4f 100644 --- a/sample.rst +++ b/sample.rst @@ -2,7 +2,7 @@ Sample code =========== -.. tip:: If you want to see some ET-specific Lua examples, you can check the `ET Legacy Lua scripts `_ repository. +.. tip:: If you want to see some specific Lua examples, you can check the `Lua scripts `_ repository. General @@ -12,7 +12,7 @@ General General example:: --[[ - Lua Example ETLegacy + Lua Example --]] function et_InitGame(levelTime,randomSeed,restart)