oops. forgot the getter.
--- a/hedgewars/uScript.pas Mon Dec 13 19:00:03 2010 -0500
+++ b/hedgewars/uScript.pas Mon Dec 13 19:22:09 2010 -0500
@@ -116,8 +116,15 @@
lc_bnot := 1;
end;
+function lc_getinputmask(L : Plua_State) : LongInt; Cdecl;
+begin
+ if lua_gettop(L) <> 0 then
+ LuaError('Lua: Wrong number of parameters passed to GetInputMask!')
+ else lua_pushinteger(L, InputMask);
+ lc_getinputmask:= 1
+end;
+
function lc_setinputmask(L : Plua_State) : LongInt; Cdecl;
-var gear : PGear;
begin
if lua_gettop(L) <> 1 then
LuaError('Lua: Wrong number of parameters passed to SetInputMask!')
@@ -1426,6 +1433,7 @@
lua_register(luaState, 'band', @lc_band);
lua_register(luaState, 'bor', @lc_bor);
lua_register(luaState, 'bnot', @lc_bnot);
+lua_register(luaState, 'GetInputMask', @lc_getinputmask);
lua_register(luaState, 'SetInputMask', @lc_setinputmask);
lua_register(luaState, 'AddGear', @lc_addgear);
lua_register(luaState, 'DeleteGear', @lc_deletegear);