[Commits] [wesnoth/wesnoth] 024602: move WML [event] impl to lua, fixup core wml vs lu...

GitHub noreply at github.com
Wed Dec 24 09:24:02 UTC 2014


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 0246026940b8f22f71976e53fb60e859f32d8d53
      https://github.com/wesnoth/wesnoth/commit/0246026940b8f22f71976e53fb60e859f32d8d53
  Author: Chris Beck <render787 at gmail.com>
  Date:   2014-12-24 (Wed, 24 Dec 2014)

  Changed paths:
    M data/core/_main.cfg
    M data/lua/wml-tags.lua
    M src/game_events/action_wml.cpp
    M src/scripting/game_lua_kernel.cpp
    M src/scripting/game_lua_kernel.hpp

  Log Message:
  -----------
  move WML [event] impl to lua, fixup core wml vs lua loading order

This commit moves [event] to be implemented in lua/wml-tags.lua.
It turns out that because of some questionable ordering in
data/core/_main.cfg, none of the tags defined in
data/lua/wml-tags.lua are actually defined at the time that core
is read, instead they are defined right after this. This is broken,
the entire wml library should be defined before core is read. Thus
we reorder some directives in data/core/_main.cfg to ensure this.

This commit adds lua callbacks `wesnoth.add_event_handler`,
`wesnoth.remove_event_handler` as well.





More information about the Commits mailing list