Fix deprecated use of wesnoth.put_unit in test scenario

This commit is contained in:
Celtic Minstrel 2015-12-07 20:06:39 -05:00
parent c5a08251a1
commit e88ca4bd33

View file

@ -2977,7 +2977,7 @@ For game purposes, the races group into factions; for example, orcs often cooper
local l = wesnoth.get_units { side = 1, canrecruit = true }[1]
local x, y = wesnoth.find_vacant_tile(l.x, l.y, u)
u.side = 3
wesnoth.put_unit(x, y, u)
wesnoth.put_unit(u, x, y)
local ul = wesnoth.get_recall_units()
local t = {}
for i,u in ipairs(ul) do table.insert(t, u.type) end
@ -3615,7 +3615,7 @@ unplagueable: $wml_unit.status.unplagueable"
code = <<
local helper = wesnoth.require "lua/helper.lua"
for i, v in ipairs(helper.get_variable_proxy_array "temp_villages_area") do
wesnoth.put_unit(v.x, v.y, { type = "Goblin Spearman", side = 2 })
wesnoth.put_unit({ type = "Goblin Spearman", side = 2 }, v.x, v.y)
end
wesnoth.set_variable "temp_villages_area"
>>