From efb1b491aa6bdae2f1eded559cda300a88c276ee Mon Sep 17 00:00:00 2001
From: Jisk <danielthesmartypants2017+jisk@gmail.com>
Date: Mon, 8 Jan 2024 19:13:30 +0000
Subject: [PATCH] Expose chat_on to Lua as chatactive

---
 src/lua_script.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/lua_script.c b/src/lua_script.c
index f90db7bc34..d63f885f44 100644
--- a/src/lua_script.c
+++ b/src/lua_script.c
@@ -38,6 +38,8 @@
 #include "doomstat.h"
 #include "g_state.h"
 
+#include "hu_stuff.h"
+
 lua_State *gL = NULL;
 
 // List of internal libraries to load from SRB2
@@ -432,6 +434,9 @@ int LUA_PushGlobals(lua_State *L, const char *word)
 			return 0;
 		LUA_PushUserdata(L, &camera2, META_CAMERA);
 		return 1;
+	} else if (fastcmp(word, "chatactive")) {
+		lua_pushboolean(L, chat_on);
+		return 1;
 	}
 	return 0;
 }
-- 
GitLab