# HG changeset patch # User Wuzzy # Date 1546809916 0 # Node ID ef1f9ddfe5e25aae48427a8db25565610a0207a5 # Parent 4eea5f6707d9aa71dac1478e8146de57b68cb8b2 LuaAPI: AddAmmo per-team diff -r 4eea5f6707d9 -r ef1f9ddfe5e2 LuaAPI.wiki --- a/LuaAPI.wiki Thu Jan 03 15:20:20 2019 +0000 +++ b/LuaAPI.wiki Sun Jan 06 21:25:16 2019 +0000 @@ -1204,6 +1204,8 @@ ==== !AddAmmo(gearUid, ammoType, ammoCount) ==== 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 `AMMO_INFINITE` will give infinite ammo. +Note: By default, ammo is per-team, so calling `AddAmmo` for a hedgehog will give the ammo for the whole team. The game flags `gfPerHogAmmo` and `gfSharedAmmo` change how ammo is managed in the game, so these game flags also affect `AddAmmo`. + ==== !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`.