From cd8494c069e827992bd13db2adc309be7994768a Mon Sep 17 00:00:00 2001 From: Ace Lite <47698279+Ace-Lite@users.noreply.github.com> Date: Mon, 6 May 2024 01:35:28 +0200 Subject: [PATCH] Added Lua globals - emblems, numemblems, numextraemblems --- src/lua_script.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/lua_script.c b/src/lua_script.c index b62fa675e2..f98d75a562 100644 --- a/src/lua_script.c +++ b/src/lua_script.c @@ -412,6 +412,15 @@ int LUA_PushGlobals(lua_State *L, const char *word) } else if (fastcmp(word, "token")) { lua_pushinteger(L, token); return 1; + } else if (fastcmp(word, "emblems")) { + lua_pushinteger(L, M_CountEmblems(clientGamedata)); + return 1; + } else if (fastcmp(word, "numemblems")) { + lua_pushinteger(L, numemblems); + return 1; + } else if (fastcmp(word, "numextraemblems")) { + lua_pushinteger(L, numextraemblems); + return 1; } else if (fastcmp(word, "gamestate")) { lua_pushinteger(L, gamestate); return 1; -- GitLab