Commit graph

22 commits

Author SHA1 Message Date
Celtic Minstrel
faaeaadaa1 [Lua] Avoid missing field warning by reversing the order of the check 2024-08-13 08:54:04 -04:00
Celtic Minstrel
542581916f [Lua] Suppress some diagnostics and also recommend suppressing certain diagnostics globally 2024-08-13 08:54:04 -04:00
Celtic Minstrel
f5c4f2e841 [Lua] Update obsolete usage of [1],[2] to refer to a tag's name and contents 2024-05-19 12:54:35 -04:00
Celtic Minstrel
6145c48d35 [LuaDoc] Fix incorrect declaration of unit.variables and side.variables - make them consistent with wml.variables 2024-02-13 19:29:20 -05:00
Celtic Minstrel
c7741907c2 [LuaDoc] Fix several errors in the inline documentation 2024-02-06 19:04:00 -05:00
Celtic Minstrel
5a51a309a4 [LuaDoc] Fix several minor errors in the specification of API 2024-02-06 19:04:00 -05:00
Celtic Minstrel
d104a81269 Lua API: Make the WML module dir-friendly 2022-06-20 20:54:28 -04:00
Celtic Minstrel
e2875f34b2 Fix a bunch of luadoc errors 2022-06-11 00:15:18 -04:00
Celtic Minstrel
e1300e29b0
Lua API: Add inline documentation for pretty much everything and convert existing docs (#6483)
The new format is EmmyLua-based and can be used with (at least) Visual Studio Code.
2022-02-17 13:43:31 -05:00
Celtic Minstrel
82a98fd96e Lua API: Revive mp_settings.active_mods and mp_settings.era_id
These were removed without deprecation in 0efd35acbc
This adds them back as deprecated.

Fixes #5941
2021-07-13 14:10:07 -04:00
Celtic Minstrel
8b05449bbc Lua API: Deprecate helper.set_wml_action_metatable
wml.fire now supports the same syntax - both of the following work:

- wml.fire("message", {message = "Hello World"})
- wml.fire.message{message = "Hello World"}
2021-07-07 01:32:05 -04:00
Celtic Minstrel
1e42f80c13 Lua API: Use the named tuple idiom for WML tags
Instead of this:

for i,t in ipairs(cfg) do
  if t[1] == 'foo' then
    do_something(t[2])
  end
end

You can now write this:

for i,t in ipairs(cfg) do
  if t.tag == 'foo' then
    do_something(t.value)
  end
end
2021-07-07 01:32:05 -04:00
Celtic Minstrel
0ef4a86b7e Fix wml.remove_children 2021-06-24 00:51:13 -04:00
Celtic Minstrel
5a1e38e99b
Add wesnoth.sync module for the synchronization-related commands (#5862) 2021-06-19 15:39:10 -04:00
Celtic Minstrel
1122ed00fb Fix broken global_vars table 2021-05-17 20:35:27 -04:00
Celtic Minstrel
0970880910 whitespace fixes 2021-05-11 14:52:22 -04:00
Celtic Minstrel
1410b5cef9 Allow accessing variables through the new APIs in the mapgen kernel
This also reverses the deprecation of wml.tovconfig and friends in the mapgen kernel.
2021-05-11 14:52:20 -04:00
Celtic Minstrel
05b0b7a1df Update uses of wesnoth.fire 2021-05-11 14:52:20 -04:00
Celtic Minstrel
2ea92baa13 Move some more functions to the wml module
- eval_conditional and fire
- the internal set|get_variable functions
2021-05-11 14:52:20 -04:00
Celtic Minstrel
1205e3fd25 Move the Lua global variable helpers from WC to a new "experimental" module 2021-05-11 14:52:19 -04:00
Pentarctagon
d203b061f9
Whitespace cleanup of lua files. 2021-04-25 15:11:09 -05:00
Celtic Minstrel
862668911a Split core.lua up by module to make things easier to find
Core is now a directory instead of a file. The Lua kernel automatically loads all files in that directory when it starts up.
2021-02-20 21:32:29 -05:00