wesnoth/data/core/_main.cfg
Chris Beck 0246026940 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.
2014-12-24 04:21:58 -05:00

27 lines
484 B
INI

#textdomain wesnoth
# Main purpose of this file is to ensure that macros get read in first.
# wmlscope: set export=yes
[lua]
code=<<
wesnoth.dofile 'lua/backwards-compatibility.lua'
wesnoth.dofile 'lua/wml-tags.lua'
wesnoth.dofile 'ai/micro_ais/micro_ai_wml_tag.lua'
>>
[/lua]
#ifndef NO_TERRAIN_GFX
{core/terrain-graphics/}
#endif
{core/macros/}
{core/about.cfg}
{core/help.cfg}
{core/hotkeys.cfg}
#ifndef NO_TERRAIN
{core/terrain.cfg}
#endif
{core/units.cfg}
{core/editor/}