# HG changeset patch
# User Wuzzy
# Date 1491318540 -3600
# Node ID 3ca13c637fd0255843a29bbd4a795163246ead13
# Parent c2f6ca98d8dccc1bcd5130e10b455fa5107288fb
LuaAPI: Add onUsedAmmo
diff -r c2f6ca98d8dc -r 3ca13c637fd0 LuaAPI.wiki
--- a/LuaAPI.wiki Tue Apr 04 14:53:35 2017 +0100
+++ b/LuaAPI.wiki Tue Apr 04 16:09:00 2017 +0100
@@ -341,6 +341,11 @@
=== onUpUp() ===
This function is called when you release the up key.
+=== onUsedAmmo(ammoType) (0.9.23) ===
+Called after a weapon has been used completely, with `ammoType` as the used ammo type.
+
+For example, it is called right after a bazooka is fired, when both shots of a shotgun have been fired. It is also called when using a multi-shot ammo has been aborted because this still uses up the ammo.
+
=== onHogHide(gearUid) (0.9.16) ===
This function is called when a hedgehog with the gear ID `gearUid` is hidden (removed from the map).