42 att->ref_own_ = att->ref_enemy_ = -1;
43 if(!lua_istable(L,
n)) {
46 lua_getfield(L,
n,
"own");
47 if(lua_istable(L, -1)) {
52 }
else if(lua_isfunction(L, -1)) {
54 att->ref_own_ = luaL_ref(L, LUA_REGISTRYINDEX);
55 assert(att->ref_own_ != -1);
57 lua_getfield(L,
n,
"enemy");
58 if(lua_istable(L, -1)) {
63 }
else if(lua_isfunction(L, -1)) {
65 att->ref_enemy_ = luaL_ref(L, LUA_REGISTRYINDEX);
66 assert(att->ref_enemy_ != -1);
std::shared_ptr< T > to_type(lua_State *, int)
A config object defines a single node in a WML file, with access to child nodes.
A variable-expanding proxy for the config class.
bool luaW_tovconfig(lua_State *L, int index, vconfig &vcfg)
Gets an optional vconfig from either a table or a userdata.
Lua object(value) wrapper implementation.
A small explanation about what's going on here: Each action has access to two game_info objects First...
static map_location::direction n