mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-29 17:21:57 +00:00
Further cleanup of deprecated Lua API usecases (inc. ones from fef953a)
[ci skip]
This commit is contained in:
parent
10a3ef1dac
commit
134353f863
@ -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.
|
||||
|
@ -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
|
||||
|
@ -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 = {}
|
||||
|
||||
|
@ -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"
|
||||
|
||||
|
@ -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 = {}
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user