author: Rian Drake
contact: riandrake#6840
This script implements a simple monkey patch for the Avorion documentation that replaces all of the function definitions found in each file with hyperlinks whenever an avorion type (with documentation nearby) is found.
Python 3.8+
Here is where you can tweak some settings. If you make a mistake and you are not sure how to fix it, just delete config.ini and it will regenerate the next time you run the script.
[IO]
inputdirectory = The directory where you want to read html documentation from.
outputdirecotry = The directory where you want to write patched documentation to (must be different).
This script looks at the documentation generated by the AvorionDocumentationPatcher and generates a bunch of stub lua files you can use to help with autocomplete and intellisense in your favourite text editor
Python 3.8+ BeautifulSoup
Download the stubs.zip from the latest release on the release page, extract the contents into your mods/
directory or wherever you're developing. After that, open your workspace and hopefully your text editor has loaded the files for autocompletion.
Tested for use in Intellij IDEA Community with EmmyLua 1.3.3.150-IDEA201
Tested on VS CODE, using the extension [lua] (https://marketplace.visualstudio.com/items?itemName=sumneko.lua) Add the stub files into a "lib" folder and add the following settings to your setting file : File location : - Windows %APPDATA%\Code\User\settings.json - macOS $HOME/Library/Application Support/Code/User/settings.json - Linux $HOME/.config/Code/User/settings.json Settings :
"Lua.workspace.library": [
"C:\\path\\to\\lib"<-- To fill
],
"Lua.runtime.special": {
"include": "require"
},
"Lua.diagnostics.severity": {
"lowercase-global": "Hint"
},
"Lua.diagnostics.disable": [
"lowercase-global"
]
Visual Studio might still work, but I(Bubbet) haven't tested it personally.