Fix registration order of on_load events (fixes #1684)
This commit is contained in:
parent
dc8aa58b25
commit
2eea57b27f
1 changed files with 14 additions and 8 deletions
|
@ -1,11 +1,3 @@
|
|||
--! #textdomain wesnoth
|
||||
|
||||
wesnoth.require "wml-flow"
|
||||
wesnoth.require "wml"
|
||||
-- Note: When adding new WML tags, unless they're very simple, it's preferred to
|
||||
-- add a new file in the "data/lua/wml" directory. The file will then automatically
|
||||
-- be loaded by the above require statement.
|
||||
|
||||
local helper = wesnoth.require "helper"
|
||||
local location_set = wesnoth.require "location_set"
|
||||
local utils = wesnoth.require "wml-utils"
|
||||
|
@ -23,6 +15,20 @@ function wesnoth.game_events.on_save()
|
|||
return {}
|
||||
end
|
||||
|
||||
wesnoth.require "wml-flow"
|
||||
wesnoth.require "wml"
|
||||
|
||||
--[[
|
||||
|
||||
Note: When adding new WML tags, unless they're very simple, it's preferred to
|
||||
add a new file in the "data/lua/wml" directory rather than implementing it in this file.
|
||||
The file will then automatically be loaded by the above require statement.
|
||||
|
||||
Also note: The above on_load event needs to be registered before any other on_load events.
|
||||
That means before loading the WML tags via wesnoth.require "wml".
|
||||
|
||||
]]
|
||||
|
||||
function wml_actions.sync_variable(cfg)
|
||||
local names = cfg.name or helper.wml_error "[sync_variable] missing required name= attribute."
|
||||
local result = wesnoth.synchronize_choice(
|
||||
|
|
Loading…
Add table
Reference in a new issue