# HG changeset patch # User Wuzzy # Date 1554745351 -3600 # Node ID 5b85c98653ad6e59c605468643aaf5ac518ca4b3 # Parent 63af61779c9d3d03efbcf2b526559a0d5a6e3abd LuaAPI: Add onCaseDrop, SetTeamPassive diff -r 63af61779c9d -r 5b85c98653ad 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 @@ === onNewTurn() === 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`) +=== onCaseDrop(gear) === +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. + === onEndTurn() (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. +=== SetTeamPassive(teamname, isPassive) (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. + ==== !GetClanColor(clan) ==== Returns the RGBA color of the chosen clan by its number. The color data type is described in [LuaAPI#Color].