LuaAPI.wiki
changeset 1410 6d356877f1d2
parent 1409 755e96dd1ff1
child 1411 7c5c8c620a9f
--- a/LuaAPI.wiki	Thu May 03 18:53:32 2018 +0100
+++ b/LuaAPI.wiki	Thu May 03 22:19:00 2018 +0100
@@ -530,6 +530,13 @@
 === <tt>!GetAmmoCount(gearUid, ammoType)</tt> ===
 Returns the ammo count of the specified ammo type for the specified hedgehog gear.
 
+=== <tt>!GetAmmoTimer(gearUid, ammoType)</tt> (0.9.25) ===
+Returns the currently configured ammo timer (in milliseconds) for the given hedgehog gear and specified ammo type. This is the timer which is set by the player by using the timer keys (1-5). For ammo types for which the timer cannot be changed, `nil` is returned.
+
+Example:
+<code lang="lua">GetAmmoTimer(CurrentHedgehog, amGrenade)
+-- May return 1000, 2000, 3000, 4000 or 5000</code>
+
 === <tt>!IsHogLocal(gearUid)</tt> (0.9.23) ===
 Returns `true` if the specified hedgehog gear is controlled by a human player on the computer on which Hedgewars runs on (i.e. not over a computer over the network). Also returns `true` if the hog is a member of any of the local clans. Returns `false` otherwise. Returns `nil` if `gearUid` is invalid.