Cleaned up use of deprecated APIs in campaign Lua

[ci skip]
This commit is contained in:
Charles Dang 2018-03-13 08:06:11 +11:00
parent 8a0d697eec
commit b92ee187b8
5 changed files with 6 additions and 6 deletions

View file

@ -4,7 +4,7 @@
local helper = wesnoth.require "helper"
local wml_actions = wesnoth.wml_actions
local _ = wesnoth.textdomain "wesnoth-ei"
local T = helper.set_wml_tag_metatable {}
local T = wml.tag
function wml_actions.spread_bandit_villages(cfg)
local x = cfg.x or helper.wml_error("[spread_bandit_villages] missing required x= attribute.")

View file

@ -6,8 +6,8 @@ local replace_map = wesnoth.wml_actions.replace_map
local helper = wesnoth.require "helper"
local wml_actions = wesnoth.wml_actions
local T = helper.set_wml_tag_metatable {}
local V = helper.set_wml_var_metatable {}
local T = wml.tag
local V = wml.variables
function wesnoth.wml_actions.shift_labels(cfg)
for k, v in ipairs(labels) do

View file

@ -1,5 +1,5 @@
local helper = wesnoth.require "helper"
local T = helper.set_wml_tag_metatable {}
local T = wml.tag
function wesnoth.wml_actions.find_respawn_point(cfg)
local respawn_near = cfg.respawn_near or helper.wml_error "[find_respawn_point] missing required respawn_near= key"

View file

@ -3,7 +3,7 @@
local helper = wesnoth.require "helper"
local utils = wesnoth.require "wml-utils"
local wml_actions = wesnoth.wml_actions
local T = helper.set_wml_tag_metatable {}
local T = wml.tag
function wml_actions.spawn_units(cfg)
local x = cfg.x or helper.wml_error("[spawn_units] missing required x= attribute.")

View file

@ -4,7 +4,7 @@
-- for the tutorial
local helper = wesnoth.require "helper"
local T = helper.set_wml_tag_metatable {}
local T = wml.tag
local wml_actions = wesnoth.wml_actions
local _ = wesnoth.textdomain "wesnoth-tutorial"