hedgewars/uScript.pas
changeset 14415 d670e4efe1ed
parent 14414 c2cd3f64b9f7
child 14484 bd1db668b7c0
--- a/hedgewars/uScript.pas	Sun Dec 09 16:54:22 2018 +0100
+++ b/hedgewars/uScript.pas	Sun Dec 09 17:12:47 2018 +0100
@@ -3303,6 +3303,22 @@
     lc_setreadytimeleft:= 0;
 end;
 
+function lc_setturntimepaused(L : Plua_State) : LongInt; Cdecl;
+begin
+    if CheckLuaParamCount(L, 1, 'SetTurnTimePaused', 'isPaused') then
+        LuaClockPaused:= lua_toboolean(L, 1);
+    lc_setturntimepaused:= 0;
+end;
+
+function lc_getturntimepaused(L : Plua_State) : LongInt; Cdecl;
+begin
+    if CheckLuaParamCount(L, 0, 'GetTurnTimePaused', '') then
+        lua_pushboolean(L, LuaClockPaused)
+    else
+        lua_pushnil(L);
+    lc_getturntimepaused:= 1;
+end;
+
 function lc_startghostpoints(L : Plua_State) : LongInt; Cdecl;
 begin
     if CheckLuaParamCount(L, 1, 'StartGhostPoints', 'count') then
@@ -4337,6 +4353,8 @@
 lua_register(luaState, _P'Explode', @lc_explode);
 lua_register(luaState, _P'SetTurnTimeLeft', @lc_setturntimeleft);
 lua_register(luaState, _P'SetReadyTimeLeft', @lc_setreadytimeleft);
+lua_register(luaState, _P'SetTurnTimePaused', @lc_setturntimepaused);
+lua_register(luaState, _P'GetTurnTimePaused', @lc_getturntimepaused);
 // drawn map functions
 lua_register(luaState, _P'AddPoint', @lc_addPoint);
 lua_register(luaState, _P'FlushPoints', @lc_flushPoints);