LuaAPI: Add onCaseDrop, SetTeamPassive
authorWuzzy
Mon, 08 Apr 2019 18:42:31 +0100
changeset 1725 5b85c98653ad
parent 1724 63af61779c9d
child 1726 c3de0c96ce6e
LuaAPI: Add onCaseDrop, SetTeamPassive
LuaAPI.wiki
--- a/LuaAPI.wiki	Mon Apr 08 15:02:08 2019 +0100
+++ b/LuaAPI.wiki	Mon Apr 08 18:42:31 2019 +0100
@@ -227,6 +227,13 @@
 === <tt>onNewTurn()</tt> ===
 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>onCaseDrop(gear)</tt> ===
+This function calls between two turns right after the moment at which the game *might* drop a crate according to the game scheme settings. It does not matter if it actually wants to drop a crate.
+
+If a crate was dropped, `gear` is the crate gear that was dropped, if no crate was dropped, `gear` is `nil`.
+
+This function is useful to add custom crate drops as well.
+
 === <tt>onEndTurn()</tt> (0.9.24) ===
 This function calls at the end of every turn. The end of a turn is defined as the point of time after the current hedgehog lost control and all the important gears are either gone or have settled.
 
@@ -1443,6 +1450,9 @@
 
 Use this to display a score, power value or another important team attribute. There's no hard length limit, but please try to keep it as short as possible to avoid visual clutter.
 
+=== <tt>SetTeamPassive(teamname, isPassive)</tt> (1.0.0) ===
+Mark a team as passive if `isPassive` is `true`. Passive teams do not participate in the game and are treated like frozen teams. When determining the team order, passive teams are completely ignored.
+
 ==== <tt>!GetClanColor(clan)</tt> ====
 Returns the RGBA color of the chosen clan by its number. The color data type is described in [LuaAPI#Color].