mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-02 19:03:28 +00:00

* Add new [screen_fade] WML action It takes (for now) the arguments: * red, green, blue = values between 0 and 255 * alpha = value between 0 and 255 * duration = time in ms over which to fade The game display is faded to the given colour over the duration. It will be left with an overlay of that colour and alpha until a screen_fade to 0 alpha is performed.
These files can be used to allow Lua linting tools to understand Wesnoth types and functions that are defined in C++. Documentation of the annotations format can be found here.
To enable in Visual Studio Code, install this Lua plugin and add the following settings to your settings.json:
"Lua.runtime.version": "Lua 5.4",
"Lua.workspace.library": [
"./utils/emmylua"
],
"Lua.runtime.special": {
"wesnoth.require": "require",
"wesnoth.dofile": "dofile"
},
"Lua.runtime.builtin": {
"io": "disable",
"debug": "disable",
"os": "disable",
"package": "disable"
},
"Lua.diagnostics.globals": [
"wesnoth",
"wml",
"gui",
"filesystem",
"unit_test",
"stringx",
"mathx",
"ai"
]