LuaAPI.wiki
changeset 1700 ef1f9ddfe5e2
parent 1699 4eea5f6707d9
child 1702 e9a2b9e33060
equal deleted inserted replaced
1699:4eea5f6707d9 1700:ef1f9ddfe5e2
  1202 SetAmmoTexts(amBazooka, "This weapon deals double the damage than usually.")</code>
  1202 SetAmmoTexts(amBazooka, "This weapon deals double the damage than usually.")</code>
  1203 
  1203 
  1204 ==== <tt>!AddAmmo(gearUid, ammoType, ammoCount)</tt> ====
  1204 ==== <tt>!AddAmmo(gearUid, ammoType, ammoCount)</tt> ====
  1205 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.
  1205 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.
  1206 
  1206 
       
  1207 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`.
       
  1208 
  1207 ==== <tt>!GetAmmoName(ammoType [, ignoreOverwrite ])</tt> (0.9.23) ====
  1209 ==== <tt>!GetAmmoName(ammoType [, ignoreOverwrite ])</tt> (0.9.23) ====
  1208 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`.
  1210 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`.
  1209 
  1211 
  1210 === Map ===
  1212 === Map ===
  1211 ==== <tt>!MapHasBorder()</tt> ====
  1213 ==== <tt>!MapHasBorder()</tt> ====