WML tags fixup

This commit is contained in:
Celtic Minstrel 2016-04-04 20:10:52 -04:00
parent 19fe2aa817
commit d3374d3670
6 changed files with 16 additions and 8 deletions

View file

@ -1,4 +1,6 @@
local helper = wesnoth.require "lua/helper.lua"
local utils = wesnoth.require "lua/wml-utils.lua"
local wml_actions = wesnoth.wml_actions
function wml_actions.command(cfg)
utils.handle_event_commands(cfg, "plain")

View file

@ -1,6 +1,6 @@
local helper = wesnoth.require "lua/helper.lua"
function wml_actions.endlevel(cfg)
function wesnoth.wml_actions.endlevel(cfg)
local parsed = helper.parsed(cfg)
if wesnoth.check_end_level_disabled() then
wesnoth.message("Repeated [endlevel] execution, ignoring")

View file

@ -1,6 +1,7 @@
local helper = wesnoth.require "lua/helper.lua"
local utils = wesnoth.require "lua/wml-utils.lua"
function wml_actions.find_path(cfg)
function wesnoth.wml_actions.find_path(cfg)
local filter_unit = helper.get_child(cfg, "traveler") or helper.wml_error("[find_path] missing required [traveler] tag")
-- only the first unit matching
local unit = wesnoth.get_units(filter_unit)[1] or helper.wml_error("[find_path]'s filter didn't match any unit")

View file

@ -1,4 +1,6 @@
local helper = wesnoth.require "lua/helper.lua"
local utils = wesnoth.require "lua/wml-utils.lua"
local wml_actions = wesnoth.wml_actions
function wml_actions.harm_unit(cfg)
local filter = helper.get_child(cfg, "filter") or helper.wml_error("[harm_unit] missing required [filter] tag")

View file

@ -1,4 +1,6 @@
local helper = wesnoth.require "lua/helper.lua"
local utils = wesnoth.require "lua/wml-utils.lua"
local wml_actions = wesnoth.wml_actions
function wml_actions.modify_unit(cfg)
local unit_variable = "LUA_modify_unit"

View file

@ -1,4 +1,5 @@
local helper = wesnoth.require "lua/helper.lua"
local utils = wesnoth.require "lua/wml-utils.lua"
wesnoth.wml_actions.random_placement = function(cfg)
local dist_le = nil