mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-15 17:25:32 +00:00
Remove remaining uses of wesnoth.special_locations
This commit is contained in:
parent
e1a79988b4
commit
16c8fcc49c
@ -655,7 +655,7 @@ function ai_helper.get_named_loc_xy(param_core, cfg, required_for)
|
||||
if (param_core ~= '') then param_loc = param_core .. '_loc' end
|
||||
local loc_id = cfg[param_loc]
|
||||
if loc_id then
|
||||
local loc = wesnoth.special_locations[loc_id]
|
||||
local loc = wesnoth.current.map.special_locations[loc_id]
|
||||
if loc then
|
||||
return loc
|
||||
else
|
||||
|
@ -684,7 +684,7 @@ return {
|
||||
local enemy_sides = wesnoth.sides.find({ { "enemy_of", {side = wesnoth.current.side} } })
|
||||
local min_dist = math.huge
|
||||
for _, side in ipairs(enemy_sides) do
|
||||
local enemy_start_hex = wesnoth.special_locations[side.side]
|
||||
local enemy_start_hex = wesnoth.current.map.special_locations[side.side]
|
||||
if enemy_start_hex then
|
||||
local dist = wesnoth.map.distance_between(reference_hex[1], reference_hex[2], enemy_start_hex[1], enemy_start_hex[2])
|
||||
if dist < min_dist then
|
||||
|
@ -4,7 +4,7 @@ local function path_locs(path)
|
||||
local function special_locations()
|
||||
return function()
|
||||
for _,loc in ipairs(tostring(path.location_id):split()) do
|
||||
loc = wesnoth.special_locations[loc]
|
||||
loc = wesnoth.current.map.special_locations[loc]
|
||||
if loc then coroutine.yield(loc[1], loc[2]) end
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user