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
1 changed files with 10 additions and 0 deletions
|
@ -633,6 +633,16 @@ int game_lua_kernel::intf_fire_event(lua_State *L, const bool by_id)
|
|||
|
||||
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;
|
||||
|
||||
if (by_id) {
|
||||
|
|
Loading…
Add table
Reference in a new issue