diff options
Diffstat (limited to 'engines/hdb/lua-script.cpp')
-rw-r--r-- | engines/hdb/lua-script.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/hdb/lua-script.cpp b/engines/hdb/lua-script.cpp index c39ae4a11a..82b40a17a9 100644 --- a/engines/hdb/lua-script.cpp +++ b/engines/hdb/lua-script.cpp @@ -35,6 +35,8 @@ struct ScriptPatch { const char* replace; } scriptPatches[] = { {"GLOBAL_LUA", "for i,npc in npcs do", "for i,npc in pairs(npcs) do"}, + {"GLOBAL_LUA", "setglobal( npcdef.codename..\"_init\", function() return NPC_Init( npcdef ) end )", "npcdef.codename..\"_init\" = function() return NPC_Init( npcdef ) end"}, + {"GLOBAL_LUA", "setglobal( npcdef.codename..\"_use\", function(x, y, v1, v2) return NPC_Use( npcdef, x, y, v1, v2 ) end )", "npcdef.codename..\"_use\" = function(x, y, v1, v2) return NPC_Use( npcdef, x, y, v1, v2 ) end"}, {NULL, NULL, NULL}, }; @@ -711,7 +713,6 @@ bool LuaScript::initScript(Common::SeekableReadStream *stream, const char *scrip return true; } - bool LuaScript::executeMPC(Common::SeekableReadStream *stream, const char *name, const char *scriptName, int32 length) { if (!_systemInit) { |