Further cleanup of deprecated Lua API usecases (inc. ones from fef953a)

[ci skip]
This commit is contained in:
Charles Dang 2018-03-17 00:25:59 +11:00
parent 10a3ef1dac
commit 134353f863
7 changed files with 8 additions and 9 deletions

View File

@ -1,7 +1,7 @@
local H = wesnoth.require "helper"
local AH = wesnoth.require "ai/lua/ai_helper.lua"
local LS = wesnoth.require "location_set"
local T = H.set_wml_tag_metatable{}
local T = wml.tag
local M = wesnoth.map
-- Functions to perform fast evaluation of attacks and attack combinations.

View File

@ -3,7 +3,7 @@ local W = H.set_wml_action_metatable {}
local AH = wesnoth.require "ai/lua/ai_helper.lua"
local LS = wesnoth.require "location_set"
local M = wesnoth.map
local T = H.set_wml_tag_metatable {}
local T = wml.tag
local function get_forest_animals(cfg)
-- We want the deer/rabbits to move first, tuskers afterward

View File

@ -1,7 +1,7 @@
local H = wesnoth.require "helper"
local W = H.set_wml_action_metatable {}
local AH = wesnoth.require "ai/lua/ai_helper.lua"
local T = H.set_wml_tag_metatable {}
local T = wml.tag
local ca_forest_animals_new_rabbit = {}

View File

@ -1,5 +1,5 @@
local H = wesnoth.require "helper"
local T = H.set_wml_tag_metatable {}
local T = wml.tag
local AH = wesnoth.require("ai/lua/ai_helper.lua")
local MAIUV = wesnoth.require "ai/micro_ais/micro_ai_unit_variables.lua"

View File

@ -1,7 +1,7 @@
local H = wesnoth.require "helper"
local LS = wesnoth.require "location_set"
local M = wesnoth.map
local T = H.set_wml_tag_metatable {}
local T = wml.tag
local ca_transport = {}

View File

@ -212,7 +212,7 @@ function wesnoth.custom_synced_commands.ship_unload(cfg)
unit.variables.destination_x = 1
unit.variables.destination_y = 30
local locs = helper.child_array(cfg, "dst")
local locs = wml.child_array(cfg, "dst")
local l2_type = helper.rand('Swordsman,Javelineer,Pikeman')
wesnoth.put_unit({ side = wesnoth.current.side, type = l2_type, moves = 2 }, locs[1].x, locs[1].y)

View File

@ -1,11 +1,10 @@
local helper = wesnoth.require "helper"
local T = helper.set_wml_tag_metatable {}
local T = wml.tag
wesnoth.custom_synced_commands = {}
function wesnoth.game_events.on_synced_command(cfg)
local handler = wesnoth.custom_synced_commands[cfg.name]
local data = helper.get_child(cfg, "data")
local data = wml.get_child(cfg, "data")
if handler then
handler(data)
end