# HG changeset patch # User Wuzzy # Date 1537021324 -7200 # Node ID e2d902745fd5e0937dc9a666d6956cc7e9cca954 # Parent 3fa9e30927f1cd8a78e95dbc682e7235301ce242 Fix some syntax errors in internal Lua syntax documentation diff -r 3fa9e30927f1 -r e2d902745fd5 ChangeLog.txt --- a/ChangeLog.txt Sat Sep 15 15:26:23 2018 +0200 +++ b/ChangeLog.txt Sat Sep 15 16:22:04 2018 +0200 @@ -110,8 +110,8 @@ Lua API: * Deprecation: Setting TurnTimeLeft/ReadyTimeLeft directly is deprecated and will become useless in future. Use the setter functions below - + New call: SetTurnTimeLeft(TurnTimeLeft): Set remaining turn time - + New call: SetReadyTimeLeft(ReadyTimeLeft): Set remaining ready time + + New call: SetTurnTimeLeft(newTurnTimeLeft): Set remaining turn time + + New call: SetReadyTimeLeft(newReadyTimeLeft): Set remaining ready time + New call: Retreat(time [, respectGetAwayTimeFactor): Force current turn into retreating mode + New call: GetAmmoTimer(gearUid, ammoType): Returns current set timer for given ammoType and hog gear in ms. Returns nil for non-timerable ammo + New call: EnableSwitchHog(): Enable hog switching diff -r 3fa9e30927f1 -r e2d902745fd5 hedgewars/uScript.pas --- a/hedgewars/uScript.pas Sat Sep 15 15:26:23 2018 +0200 +++ b/hedgewars/uScript.pas Sat Sep 15 16:22:04 2018 +0200 @@ -2199,8 +2199,8 @@ var s: LongInt; soundState: boolean; const - call = 'SetSoundMasked'; - params = 'soundId, isMasked]'; + call = 'SetSoundMask'; + params = 'soundId, isMasked'; begin if CheckLuaParamCount(L, 2, call, params) then begin @@ -2810,7 +2810,7 @@ placed, behind, flipHoriz, flipVert : boolean; const call = 'PlaceSprite'; - params = 'x, y, sprite, frameIdx, tint, behind, flipHoriz, flipVert, [, landFlag, ... ]'; + params = 'x, y, sprite, frameIdx, tint, behind, flipHoriz, flipVert [, landFlag, ... ]'; begin placed:= false; if CheckAndFetchLuaParamMinCount(L, 4, call, params, n) then @@ -2858,7 +2858,7 @@ eraseOnLFMatch, onlyEraseLF, flipHoriz, flipVert : boolean; const call = 'EraseSprite'; - params = 'x, y, sprite, frameIdx, eraseOnLFMatch, onlyEraseLF, flipHoriz, flipVert, [, landFlag, ... ]'; + params = 'x, y, sprite, frameIdx, eraseOnLFMatch, onlyEraseLF, flipHoriz, flipVert [, landFlag, ... ]'; begin if CheckAndFetchLuaParamMinCount(L, 4, call, params, n) then begin @@ -3212,7 +3212,7 @@ function lc_setturntimeleft(L : Plua_State) : LongInt; Cdecl; var number: Int64; begin - if CheckLuaParamCount(L, 1, 'SetTurnTimeLeft', 'TurnTimeLeft') then + if CheckLuaParamCount(L, 1, 'SetTurnTimeLeft', 'newTurnTimeLeft') then begin number:= Trunc(lua_tonumber(L, 1)); if number < 0 then @@ -3229,7 +3229,7 @@ function lc_setreadytimeleft(L : Plua_State) : LongInt; Cdecl; var number: Int64; begin - if CheckLuaParamCount(L, 1, 'SetReadyTimeLeft', 'ReadyTimeLeft') then + if CheckLuaParamCount(L, 1, 'SetReadyTimeLeft', 'newReadyTimeLeft') then begin number:= Trunc(lua_tonumber(L, 1)); if number < 0 then