Commit graph

21 commits

Author SHA1 Message Date
Steve Cotton
0a0263e54f Support [foreach]array=this_item, nested loops using the default name
Since a0ee38a49, the inner this_item was still in scope when the inner loop
writes changed data back to the outer loop's variable, which meant that
changes were silently ignored.

A lot of the changes in wml-flow.lua are just indentation because of the
extra block.
2023-02-05 04:34:23 +01:00
Celtic Minstrel
e8381ea9da Update uses of eval_conditional 2021-05-11 14:52:20 -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
cbd88814c3 Fix #4622 2019-12-09 22:12:39 -05:00
Celtic Minstrel
d9b5e3c4df Replace uses of wml_utils.split with stringx.split 2019-12-04 08:46:04 -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
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
Gregory A Lundberg
468f07364e Bug in [for] missing step
https://forums.wesnoth.org/viewtopic.php?t=46450 reports a Lua crash if end is given but step is not. The wiki says the default step is 1. Note that if end is negative, the [for] does nothing (per sniity check).
2017-06-21 20:45:21 -05:00
Celtic Minstrel
41d0a6b3d8 Fix #1688 2017-05-12 17:21:38 -04:00
Celtic Minstrel
8d4cf3cf62 Shorten requires where possible 2017-05-03 02:42:25 -04:00
Celtic Minstrel
5fdb73b92f Fix an error in [for] if step not specified 2016-12-11 18:06:51 -05:00
Celtic Minstrel
293151687c Fix number-nil comparison in [for] 2016-10-26 15:15:47 -04:00
fendrin
b9d2ec4409 Renamed [foreach] variable= to array= and item_var= to variable= 2016-08-06 06:20:41 +02:00
Celtic Minstrel
d3374d3670 WML tags fixup 2016-04-04 20:10:52 -04:00
Celtic Minstrel
a791909544 Split the more complicated WML tags into separate Lua files 2016-04-04 17:03:38 -04:00