# HG changeset patch # User Wuzzy # Date 1505950276 -3600 # Node ID b8c041a2f98ef663dbf24d3305fe0d9ed6d63313 # Parent 958b671fe4d029a83f7d0156eb17d8b5a9eab184 LuaAPI: Clarify ammoCount parameter of AddAmmo diff -r 958b671fe4d0 -r b8c041a2f98e 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.") ==== !AddAmmo(gearUid, ammoType, ammoCount) (0.9.16) ==== -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. ==== !GetAmmoName(ammoType [, ignoreOverwrite ]) (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`.