9 Commits

Author SHA1 Message Date
Celtic Minstrel
5a1e38e99b
Add wesnoth.sync module for the synchronization-related commands (#5862) 2021-06-19 15:39:10 -04:00
mattsc
ac9246aba1 Micro AIs: fix unit variables being lost in replays
Some Micro AIs save information in unit variables. Examples are the patrol and messenger AIs, which save the next waypoint for a unit. This needs to be done as a synced command, so that the information is not lost when continuing a game from a replay.
2021-03-13 19:36:56 -08:00
mattsc
695fa69238 Micro AIs: simplify unit variable handling functions
The main reason for doing this, besides simplifying the code, is to avoid using the WML table dump __cfg, which is slow. This includes a change of the format in which the variables are stored, but since these are internal Micro AI utility functions, that does not matter.

(cherry-picked from commit 133568efe6851944f0b9ddaaf75ccaff0cad6a4d)
2018-10-07 03:24:38 +00:00
mattsc
1c88a6d8c8 Do not load helper.lua where it is not used any more
(cherry-picked from commit 4b6681a300f29eab3b5adcf3b12df8bc6ad455dd)
2018-10-07 03:21:10 +00:00
mattsc
4586e04eca Lua code: replace deprecated helper.child_range() calls
(cherry-picked from commit 7c137e1a336559acdd6f797192a9516135480b2e)
2018-10-07 03:21:09 +00:00
Celtic Minstrel
4b8e37044c Micro AIs: Fix Lua error in AIs that use unit variables 2017-05-11 16:00:51 -04:00
Celtic Minstrel
8d4cf3cf62 Shorten requires where possible 2017-05-03 02:42:25 -04:00
mattsc
6bd3bae330 Fix typos in comments 2014-03-31 19:55:24 -07:00
mattsc
96e84f24c5 MAIs: add utility functions for storing information in unit variables
These provide a simple and consistent way of storing variables inside
[micro_ai] tags in unit variables.  This is needed for fixing a bug
with variables stored in units from a previous MAI causing problems
with a subsequent MAI.
2014-03-31 07:54:52 -07:00