mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-29 13:33:18 +00:00
Support primary_attack and secondary_attack in wesnoth.game_events.fire
These are taken as synonyms of the actual internal tag names, [first] and [second]. So, first is interchangeable with primary_attack and second is interchangeable with secondary_attack.
This commit is contained in:
parent
8eb7a70a63
commit
501936affb
@ -633,6 +633,16 @@ int game_lua_kernel::intf_fire_event(lua_State *L, const bool by_id)
|
|||||||
|
|
||||||
luaW_toconfig(L, pos, data);
|
luaW_toconfig(L, pos, data);
|
||||||
|
|
||||||
|
// Support WML names for some common data
|
||||||
|
if(data.has_child("primary_attack")) {
|
||||||
|
data.add_child("first", data.child("primary_attack"));
|
||||||
|
data.remove_children("primary_attack");
|
||||||
|
}
|
||||||
|
if(data.has_child("secondary_attack")) {
|
||||||
|
data.add_child("second", data.child("secondary_attack"));
|
||||||
|
data.remove_children("secondary_attack");
|
||||||
|
}
|
||||||
|
|
||||||
bool b = false;
|
bool b = false;
|
||||||
|
|
||||||
if (by_id) {
|
if (by_id) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user