LuaAPI: ReadyTimeLeft and AmmoTypeMax
authorWuzzy
Fri, 17 Nov 2017 04:20:19 +0000
changeset 1112 f8b1be6befc7
parent 1111 f6d0d5772a6c
child 1113 0ebc4b6ea11c
LuaAPI: ReadyTimeLeft and AmmoTypeMax
LuaAPI.wiki
--- a/LuaAPI.wiki	Fri Nov 17 04:16:37 2017 +0000
+++ b/LuaAPI.wiki	Fri Nov 17 04:20:19 2017 +0000
@@ -87,9 +87,11 @@
 || `ClansCount` || Number of clans in the game (teams with the same color belong to one clan) ||
 || `TeamsCount` || Number of teams in the game ||
 || `TurnTimeLeft` || Number of game ticks (milliseconds) left until the current turn ends. You can change this variable directly. ||
+|| `ReadyTimeLeft` || Remaining ready time in millseconds, 0 if turn in progress. Can be set in onNewTurn. In other places, it should only be read, not written. ||
 || `GameTime` || Number of total game ticks ||
 || `TotalRounds` || Number of rounds that have passed ||
 || `CurrentHedgehog` || The hedgehog gear that is currently in play ||
+|| `AmmoTypeMax` || Maximum ammo type ID (useful to iterate through all ammo types, starting by 0)
 
 === !GameFlags ===
 The !GameFlags are used to store simple boolean settings of the game.
@@ -215,7 +217,7 @@
 This function is called every 20 game ticks, which equals 50 times a second. It reduces Lua overhead for simple monitoring that doesn’t need to happen every single tick.
 
 === <tt>onNewTurn()</tt> ===
-This function calls at the start of every turn.
+This function calls at the start of every turn. You can set `ReadyTimeLeft` here to change the ready time for this turn. (See also: `Ready`)
 
 === <tt>onSuddenDeath()</tt> (0.9.22) ===
 This function is called on the start of Sudden Death.