hedgewars/uScript.pas
changeset 4522 0f590eefd531
parent 4517 0618b31023dc
child 4523 23ed16e6c7d2
--- a/hedgewars/uScript.pas	Mon Dec 13 18:13:42 2010 -0500
+++ b/hedgewars/uScript.pas	Mon Dec 13 19:00:03 2010 -0500
@@ -116,6 +116,15 @@
     lc_bnot := 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!')
+    else InputMask:= lua_tointeger(L, 1);
+    lc_setinputmask:= 0
+end;
+
 function lc_writelntoconsole(L : Plua_State) : LongInt; Cdecl;
 begin
     if lua_gettop(L) = 1 then
@@ -1417,6 +1426,7 @@
 lua_register(luaState, 'band', @lc_band);
 lua_register(luaState, 'bor', @lc_bor);
 lua_register(luaState, 'bnot', @lc_bnot);
+lua_register(luaState, 'SetInputMask', @lc_setinputmask);
 lua_register(luaState, 'AddGear', @lc_addgear);
 lua_register(luaState, 'DeleteGear', @lc_deletegear);
 lua_register(luaState, 'AddVisualGear', @lc_addvisualgear);