Proxy table for the AI context. More...
#include <core.hpp>
Public Member Functions | |
~lua_ai_context () | |
void | update_state () |
void | get_persistent_data (config &) const |
void | set_persistent_data (const config &) |
void | get_arguments (config &) const |
void | set_arguments (const config &) |
void | push_ai_table () |
Static Public Member Functions | |
static void | init (lua_State *L) |
Private Member Functions | |
lua_ai_context (lua_State *l, int num, int side) | |
Static Private Member Functions | |
static lua_ai_context * | create (lua_State *L, char const *code, engine_lua *engine) |
Private Attributes | |
lua_State * | L |
int | num_ |
int | side_ |
Friends | |
class | ::game_lua_kernel |
class | lua_ai_load |
ai::lua_ai_context::~lua_ai_context | ( | ) |
Definition at line 1096 of file core.cpp.
References aisKey, lua_pop, lua_pushlightuserdata(), lua_pushnil(), lua_rawget(), lua_rawseti(), LUA_REGISTRYINDEX, and num_.
|
staticprivate |
Definition at line 979 of file core.cpp.
References ERR_LUA, ai::generate_and_push_ai_state(), ai::engine::get_readonly_context(), ai::side_context::get_side(), lua_ai_context(), lua_pop, lua_pushlightuserdata(), lua_pushvalue(), lua_setfield(), lua_tostring, and luaL_loadstring().
Referenced by game_lua_kernel::create_lua_ai_context().
Definition at line 67 of file core.cpp.
References aisKey, lua_getfield(), lua_gettop(), lua_pushlightuserdata(), lua_rawget(), lua_rawgeti(), LUA_REGISTRYINDEX, lua_settop(), luaW_toconfig(), and num_.
Definition at line 95 of file core.cpp.
References aisKey, lua_getfield(), lua_gettop(), lua_pushlightuserdata(), lua_rawget(), lua_rawgeti(), LUA_REGISTRYINDEX, lua_settop(), luaW_toconfig(), and num_.
Definition at line 59 of file core.cpp.
References aisKey, lua_newtable, lua_pushlightuserdata(), lua_rawset(), and LUA_REGISTRYINDEX.
Referenced by game_lua_kernel::game_lua_kernel().
Definition at line 81 of file core.cpp.
References aisKey, lua_gettop(), lua_pushlightuserdata(), lua_rawget(), lua_rawgeti(), LUA_REGISTRYINDEX, lua_setfield(), lua_settop(), luaW_pushconfig(), and num_.
Definition at line 109 of file core.cpp.
References aisKey, lua_gettop(), lua_pushlightuserdata(), lua_rawget(), lua_rawgeti(), LUA_REGISTRYINDEX, lua_setfield(), lua_settop(), luaW_pushconfig(), and num_.
void ai::lua_ai_context::update_state | ( | ) |
Definition at line 1000 of file core.cpp.
References lua_getfield(), lua_pop, lua_setfield(), and luaW_pcall().
|
friend |
|
friend |
|
private |
Definition at line 39 of file core.hpp.
Referenced by get_arguments(), get_persistent_data(), ai::lua_ai_load::lua_ai_load(), set_arguments(), set_persistent_data(), and ~lua_ai_context().