From 9da5d4adfdd3a6f014bd8f6da751992b5165a40a Mon Sep 17 00:00:00 2001 From: Celtic Minstrel Date: Sun, 1 Dec 2019 21:47:15 -0500 Subject: [PATCH] fixup! Declare wesnoth.interface.remove_overlay directly instead of declaring it local and then assigning it Missed updating the deprecation line and used the wrong new name --- data/lua/wml/items.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/data/lua/wml/items.lua b/data/lua/wml/items.lua index 518ff6dc7c8..48f2e05874b 100644 --- a/data/lua/wml/items.lua +++ b/data/lua/wml/items.lua @@ -24,7 +24,7 @@ local function add_overlay(x, y, cfg) }) end -function wesnoth.interface.remove_overlay(x, y, name) +function wesnoth.interface.remove_item(x, y, name) local items = scenario_items[x * 10000 + y] if not items then return end wesnoth.interface.remove_hex_overlay(x, y, name) @@ -84,7 +84,7 @@ end function wml_actions.remove_item(cfg) local locs = wesnoth.get_locations(cfg) for i, loc in ipairs(locs) do - remove_overlay(loc[1], loc[2], cfg.image) + wesnoth.interface.remove_item(loc[1], loc[2], cfg.image) end end @@ -120,7 +120,7 @@ function wesnoth.interface.add_item_halo(x, y, name) end local methods = { - remove = wesnoth.deprecate_api('items.remove', 'wesnoth.interface.remove_item', 1, nil, remove_overlay), + remove = wesnoth.deprecate_api('items.remove', 'wesnoth.interface.remove_item', 1, nil, wesnoth.interface.remove_item), place_image = wesnoth.deprecate_api('items.place_image', 'wesnoth.interface.add_item_image', 1, nil, wesnoth.interface.add_item_image), place_halo = wesnoth.deprecate_api('items.place_halo', 'wesnoth.interface.add_item_halo', 1, nil, wesnoth.interface.add_item_halo) }