wesnoth/utils/emmylua
newfrenchy83 feef53d4ab
Add an 'alignment' attribute to attacks
This attribute, when set to a valid value of lawful|neutral|chaotic|liminal, will assign to the weapon a different alignment than the unit alignment used by default. This alignment is then used when attacking with this weapon.

The attribute is not accessible from lua so far since the fallback to unit alignment does not work.
2024-09-23 17:11:46 +02:00
..
wesnoth Add an 'alignment' attribute to attacks 2024-09-23 17:11:46 +02:00
ai.lua [LuaDoc] Fix several errors in the inline documentation 2024-02-06 19:04:00 -05:00
builtin.lua [LuaDoc] Fix several errors in the inline documentation 2024-02-06 19:04:00 -05:00
config.lua Lua API: Add inline documentation for pretty much everything and convert existing docs (#6483) 2022-02-17 13:43:31 -05:00
filesystem.lua [LuaDoc] Mark filesystem.asset_type as an enumerator 2024-08-13 08:54:04 -04:00
gui.lua Fix indices in widget.add_item_of_type()/add_item()/remove_items_at() (#8516) 2024-09-03 14:17:57 +02:00
mathx.lua Lua API: Add inline documentation for pretty much everything and convert existing docs (#6483) 2022-02-17 13:43:31 -05:00
README.md [Lua] Suppress some diagnostics and also recommend suppressing certain diagnostics globally 2024-08-13 08:54:04 -04:00
stringx.lua [LuaDoc] Fix missing return type on format_*_list 2024-02-13 19:29:19 -05:00
wesnoth.lua Lua API: Add mathx.lerp_index and wesnoth.game_config.palettes 2024-09-15 15:27:39 -04:00
wml.lua [LuaDoc] Fix incorrect declaration of unit.variables and side.variables - make them consistent with wml.variables 2024-02-13 19:29:20 -05:00

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.type.weakNilCheck": true,
"Lua.type.weakUnionCheck": true,
"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"
]