mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-08 18:16:30 +00:00

use game_events.add in on_event.lua previously on_event.lua and game_events.add had separate priority lists, so that independent of the priority parameter (which both game_events.add and on_event.lua now support) on_event.lua events were always executed first. The set_undoable(true) call is there to match the previous behavior of on_event.lua where events implemented via on_event were undoable by default. The higher default priority of 0.5 is there to match the previous behavior of on_event.lua where events implemented via on_event.lua were always run before wml events.