Commit graph

27 commits

Author SHA1 Message Date
Pentarctagon
370d03ccb7 Fix luacheck warnings and add to CI.
Note the `exclude_files` in .luacheckrc should be deleted once the eventual Ubuntu 22.04 base image has an updated luacheck that supports lua 5.4.
2021-11-28 14:26:02 -06:00
Celtic Minstrel
c6f4e8db28 Lua API: Use string indexing here 2021-07-02 14:04:54 -04:00
Celtic Minstrel
a0ee38a49a
Use to-be-closed variables to scope WML variables in tag definitions (#5536) 2021-02-15 21:11:56 -05:00
Celtic Minstrel
31467d29d7 Deprecate wml_utils.split in favour of stringx.split 2019-12-04 08:09:51 -05:00
Celtic Minstrel
34cce96a58 Deprecate wml_utils.parenthetical_split in favour of stringx.split
There were no uses of this function in core Lua files.
2019-12-04 08:07:15 -05:00
Celtic Minstrel
4eb043bb16 Deprecate wml_utils.trim in favour of stringx.trim and update all use cases 2019-12-04 00:53:59 -05:00
Celtic Minstrel
732b7942bb Replace all references to deprecated functions in the helper module
(and remove the require if this meant it was no longer used)
2019-12-02 01:10:34 -05:00
Celtic Minstrel
b7a358c4af Fix a typo 2019-11-23 15:25:06 -05:00
Celtic Minstrel
3734bce276 Lua: Replace uses of deprecated (moved) sides functions 2019-11-23 14:41:03 -05:00
Celtic Minstrel
24b11221cf Use wml.array_variables instead of wml.array_access.get/set 2019-11-16 13:09:04 -05:00
mattsc
0e017d9f7c Lua code: replace deprecated wesnoth.set_variable() calls
(cherry-picked from commit ce7faae4f4)
2018-10-07 03:21:07 +00:00
mattsc
05d5afa6a9 Lua code: replace deprecated wesnoth.get_variable() calls
(cherry-picked from commit f1764d182f)
2018-10-07 03:21:06 +00:00
mattsc
448a20779f Lua code: replace deprecated wesnoth.tovconfig() calls
(cherry-picked from commit 138107c8f6)
2018-10-07 03:21:06 +00:00
Celtic Minstrel
08ec9017b5 Lua API: Some tweaks of the experimental wml module 2018-03-17 16:48:00 -04:00
Charles Dang
0103959c36 Cleaned up deprecated API usage in core Lua
[ci skip]
2018-03-13 16:55:36 +11:00
vgaming
8ba6e5f40e fix code problems found by luacheck (#2380)
actual bugs found:
* backwards_compatibility.lua (undeclared global "helper")
* core.lua (use of undeclared global "helper")
* wml_tags.transform_unit had wrong code to deal with recall_cost
* wrong variable name in cave_map_generator
2018-01-20 23:05:58 -05:00
gfgtdf
121c1cb007 fix wml tags using side.controller (#1740) 2017-05-29 11:58:29 +02:00
Celtic Minstrel
8d4cf3cf62 Shorten requires where possible 2017-05-03 02:42:25 -04:00
Celtic Minstrel
eb0947c863 Some improvements to the new Lua music API
- Allow removing a track by index and fixup the "set track" interface
- Commit music changes only after event completes, not after any control=flow tag is executed
- Allow inserting a track into the middle of the playlist
- Allow assigning a config to an existing track to overwrite it
- Use std::find when checking for duplicate tracks
2017-04-27 17:09:16 -04:00
Celtic Minstrel
6906ced4e7 Properly port [music] to Lua 2017-04-27 17:09:03 -04:00
Celtic Minstrel
e0d07e854e Properly port [modify_side] to Lua 2016-12-11 18:07:36 -05:00
gfgtdf
40ff1ec986 make utils.split return empty set on nil values
previously it returned a "nil" string
2016-07-09 21:01:35 +02:00
Celtic Minstrel
7e26e09061 Fix erroneous handling of [break]/[continue] in [elseif] 2015-09-23 00:25:31 -04:00
Celtic Minstrel
2fec74a6ac Add default scope_type to handle_event_commands 2015-09-20 01:01:57 -04:00
Celtic Minstrel
3c329408ce Implement [break], [continue], [return] tags (they take no arguments) 2015-09-20 00:47:23 -04:00
Celtic Minstrel
03580ed9a9 Allow spaces in [object]id= and show error if invalid characters are present 2015-09-19 12:13:38 -04:00
Celtic Minstrel
6200f60c79 Split some utility functions from wml-tags.lua into a new file 2015-09-19 12:13:21 -04:00