WML tags fixup
This commit is contained in:
parent
19fe2aa817
commit
d3374d3670
6 changed files with 16 additions and 8 deletions
|
@ -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")
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue