# HG changeset patch
# User Wuzzy
# Date 1561153482 -3600
# Node ID e65b834f2dd9a379e2cc2a561a6c9216e450d6a4
# Parent fea4b9719045e9932d624a67838d9d0823bbb2d5
LuaEvents: Add onHogSwitch
diff -r fea4b9719045 -r e65b834f2dd9 LuaEvents.wiki
--- a/LuaEvents.wiki Fri Jun 21 22:41:51 2019 +0100
+++ b/LuaEvents.wiki Fri Jun 21 22:44:42 2019 +0100
@@ -82,7 +82,7 @@
=== onSuddenDeath() ===
This function is called on the start of Sudden Death.
-=== onGameResult(winningClan) (0.9.25) ===
+=== onGameResult(winningClan) (1.0.0) ===
This function calls when the game ends with a winner or in a draw. If a clan wins, `winningClan` is the clan ID of the winning clan. If the game ends in a draw, `winningClan` is set to -1.
=== onAchievementsDeclaration() ===
@@ -93,6 +93,11 @@
Note: If you want to detect when a turn was skipped, use `onSkipTurn()`. There is no guarantee that `onHogAttack(amSkip)` is called in such an event.
+=== onHogSwitch(oldHog) (1.0.0) ===
+Called when hogs have been switched using the “switch hedgehog” utility. `oldHog` is the gear ID of the previous hedgehog and the current hedgehog gear ID is stored in `CurrentHedgehog`.
+
+Note: If you want to detect when a turn was skipped, use `onSkipTurn()`. There is no guarantee that `onHogAttack(amSkip)` is called in such an event.
+
=== onUsedAmmo(ammoType) ===
Called after a weapon has been used completely, with `ammoType` as the used ammo type.