LuaAPI: Clarify ammoCount parameter of AddAmmo
authorWuzzy
Thu, 21 Sep 2017 00:31:16 +0100
changeset 1030 b8c041a2f98e
parent 1029 958b671fe4d0
child 1031 637ad254daf9
LuaAPI: Clarify ammoCount parameter of AddAmmo
LuaAPI.wiki
--- a/LuaAPI.wiki	Thu Sep 21 00:22:06 2017 +0100
+++ b/LuaAPI.wiki	Thu Sep 21 00:31:16 2017 +0100
@@ -968,9 +968,7 @@
 SetAmmoTexts(amBazooka, "This weapon deals double the damage than usually.")</code>
 
 ==== <tt>!AddAmmo(gearUid, ammoType, ammoCount) (0.9.16) </tt> ====
-Adds `ammoType` to the specified gear. The amount added is determined by the arguments passed via `SetAmmo()` in the `onAmmoStoreInit()` event handler. In 0.9.16 ammo can be set directly via the optional third parameter, `ammoCount`. A value of 0 will remove the weapon, a value of 100 will give infinite ammo.
-
-*Note:* The effectiveness of this function may be limited due to problems with `gfPerHogAmmo` in Lua scripting.
+Adds `ammoType` to the specified gear. The amount added is determined by the arguments passed via `SetAmmo()` in the `onAmmoStoreInit()` event handler. `ammoCount` is an optional parameter. If this is set, the ammo will **not** be added, but instead set to `ammoCount`. A value of 0 will remove the weapon, a value of 100 will give infinite ammo.
 
 ==== <tt>!GetAmmoName(ammoType [, ignoreOverwrite ])</tt> (0.9.23) ====
 Returns the localized name for the specified `ammoType`, taking an ammo name overwritten by `SetAmmoTexts` into account. If `ignoreOverwrite` is `true`, this function will always return the original ammo name of the weapon and ignores names which may have been overwritten by `SetAmmoTexts`.