# HG changeset patch
# User Wuzzy
# Date 1525382340 -3600
# Node ID 6d356877f1d2a85d1aef48805884ef256b2f9edc
# Parent 755e96dd1ff11dbbb42625cf7ae8364da67de087
LuaAPI: add GetAmmoTimer
diff -r 755e96dd1ff1 -r 6d356877f1d2 LuaAPI.wiki
--- 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 @@
=== !GetAmmoCount(gearUid, ammoType) ===
Returns the ammo count of the specified ammo type for the specified hedgehog gear.
+=== !GetAmmoTimer(gearUid, ammoType) (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:
+GetAmmoTimer(CurrentHedgehog, amGrenade)
+-- May return 1000, 2000, 3000, 4000 or 5000
+
=== !IsHogLocal(gearUid) (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.