From 6923b07f6c6d3d923a20c9d866c7fcb3da443b17 Mon Sep 17 00:00:00 2001 From: Marco Tylus Date: Sat, 19 Sep 2026 11:41:19 +0900 Subject: [PATCH] feat(ui): implement Script_IsDebugBuild (#171) --- src/ui/game/GameScript.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/ui/game/GameScript.cpp b/src/ui/game/GameScript.cpp index a122822..7d0bdeb 100644 --- a/src/ui/game/GameScript.cpp +++ b/src/ui/game/GameScript.cpp @@ -120,7 +120,13 @@ int32_t Script_GetDebugStats(lua_State* L) { } int32_t Script_IsDebugBuild(lua_State* L) { - WHOA_UNIMPLEMENTED(0); +#if defined(NDEBUG) + lua_pushboolean(L, 0); +#else + lua_pushboolean(L, 1); +#endif + + return 1; } int32_t Script_RegisterCVar(lua_State* L) {