44 att->ref_own_ = att->ref_enemy_ = -1;
45 if(!lua_istable(L,
n)) {
48 lua_getfield(L,
n,
"own");
49 if(lua_istable(L, -1)) {
54 }
else if(lua_isfunction(L, -1)) {
56 att->ref_own_ = luaL_ref(L, LUA_REGISTRYINDEX);
57 assert(att->ref_own_ != -1);
59 lua_getfield(L,
n,
"enemy");
60 if(lua_istable(L, -1)) {
65 }
else if(lua_isfunction(L, -1)) {
67 att->ref_enemy_ = luaL_ref(L, LUA_REGISTRYINDEX);
68 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.
LUA AI Support engine - creating specific ai components from config.
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