hedgewars/uScript.pas
changeset 15198 a22013a817e4
parent 15152 a77b0e339929
child 15604 6a38a30e772a
child 15937 1becf4a0e907
--- a/hedgewars/uScript.pas	Wed Jun 19 02:40:00 2019 +0300
+++ b/hedgewars/uScript.pas	Mon Jun 17 21:43:05 2019 +0200
@@ -3660,6 +3660,12 @@
     lua_setglobal(luaState, Str2PChar(name));
 end;
 
+procedure ScriptSetLongWord(name : shortstring; value : LongWord);
+begin
+    lua_pushnumber(luaState, value);
+    lua_setglobal(luaState, Str2PChar(name));
+end;
+
 procedure ScriptSetString(name : shortstring; value : shortstring);
 begin
     lua_pushstring(luaState, Str2PChar(value));
@@ -4369,8 +4375,8 @@
 for we:= Low(TWorldEdge) to High(TWorldEdge) do
     ScriptSetInteger(EnumToStr(we), ord(we));
 
-ScriptSetInteger('capcolDefault'    , capcolDefault);
-ScriptSetInteger('capcolSetting'    , capcolSetting);
+ScriptSetLongWord('capcolDefault'   , capcolDefaultLua);
+ScriptSetLongWord('capcolSetting'   , capcolSettingLua);
 
 ScriptSetInteger('gstDrowning'      , gstDrowning);
 ScriptSetInteger('gstHHDriven'      , gstHHDriven);