From 9ab60d12958ae9a5ed9a1a76346729963ef08bb7 Mon Sep 17 00:00:00 2001
From: wolfy852 <wolfy852@hotmail.com>
Date: Sat, 19 Jul 2014 17:46:53 -0500
Subject: [PATCH] Add LUA_EvalMath to Lua with function name EvalMath

---
 src/lua_baselib.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/lua_baselib.c b/src/lua_baselib.c
index a01afe80f0..38ed690610 100644
--- a/src/lua_baselib.c
+++ b/src/lua_baselib.c
@@ -85,6 +85,13 @@ static int lib_print(lua_State *L)
 	return 0;
 }
 
+static int lib_evalMath(lua_State *L)
+{
+	const char *word = luaL_checkstring(L, 1);
+	lua_pushinteger(L, LUA_EvalMath(word));
+	return 1;
+}
+
 // M_RANDOM
 //////////////
 
@@ -1633,6 +1640,7 @@ static int lib_gTicsToMilliseconds(lua_State *L)
 
 static luaL_Reg lib[] = {
 	{"print", lib_print},
+	{"EvalMath", lib_evalMath,},
 
 	// m_random
 	{"P_Random",lib_pRandom},
-- 
GitLab