MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / auto_load

Function auto_load

ogsr_engine/COMMON_AI/script_engine.cpp:93–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91#endif
92
93static int auto_load(lua_State* L)
94{
95 if ((lua_gettop(L) < 2) || !lua_istable(L, 1) || !lua_isstring(L, 2))
96 {
97 lua_pushnil(L);
98 return 1;
99 }
100 ai().script_engine().process_file_if_exists(lua_tostring(L, 2), false);
101 lua_rawget(L, 1);
102 return 1;
103}
104
105void CScriptEngine::setup_auto_load()
106{

Callers

nothing calls this directly

Calls 5

lua_gettopFunction · 0.50
lua_isstringFunction · 0.50
lua_pushnilFunction · 0.50
lua_rawgetFunction · 0.50

Tested by

no test coverage detected