Fixup some event deprecations

No functionality change, just documentation
This commit is contained in:
Celtic Minstrel 2022-07-24 00:53:14 -04:00
parent 26f977c9b2
commit e08451517a

View file

@ -69,10 +69,10 @@ if wesnoth.kernel_type() == "Game Lua Kernel" then
-- wesnoth.interface.set_menu_item only adds the menu item
wesnoth.interface.set_menu_item(id, cfg)
wesnoth.game_events.add_menu(cfg.id, wesnoth.wml_actions.command)
end)
end, 'You also need to call wesnoth.game_events.add_menu')
wesnoth.clear_menu_item = wesnoth.interface.clear_menu_item
-- Event handlers don't have a separate module Lua file so dump those here
wesnoth.add_event_handler = wesnoth.deprecate_api('wesnoth.add_event_hander', 'wesnoth.game_events.add', 1, nil, function(cfg) wesnoth.wml_actions.event(cfg) end)
wesnoth.add_event_handler = wesnoth.deprecate_api('wesnoth.add_event_hander', 'wesnoth.game_events.add_wml', 1, nil, function(cfg) wesnoth.wml_actions.event(cfg) end)
wesnoth.remove_event_handler = wesnoth.deprecate_api('wesnoth.remove_event_handler', 'wesnoth.game_events.remove', 1, nil, wesnoth.game_events.remove)
local function old_fire_event(fcn)