From 34372611332a73c08f5f723ca3d6fc693759cedb Mon Sep 17 00:00:00 2001 From: Nipun Garg Date: Wed, 19 Jun 2019 17:06:29 +0530 Subject: HDB: Set the Entity Spawn names in Lua --- engines/hdb/lua-script.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/engines/hdb/lua-script.cpp b/engines/hdb/lua-script.cpp index ce635d4cb8..2f2802bd4a 100644 --- a/engines/hdb/lua-script.cpp +++ b/engines/hdb/lua-script.cpp @@ -730,7 +730,13 @@ bool LuaScript::initScript(Common::SeekableReadStream *stream, const char *scrip spawn names into Lua once they are implemented. */ - warning("STUB: LuaScript::initScript: Load ai_all_ents"); + // Set the Entity Spawn Names in Lua + int j = 0; + while (aiEntList[j].luaName) { + lua_pushnumber(_state, aiEntList[j].type); + lua_setglobal(_state, aiEntList[j].luaName); + j++; + } // Register panic callback function lua_atpanic(_state, panicCB); -- cgit v1.2.3