LuaGameplay.wiki
changeset 1940 37a2cc377a4f
parent 1938 e1b83a39bbbc
child 1942 b36285e8e3f5
equal deleted inserted replaced
1939:0cb80de3d5bb 1940:37a2cc377a4f
   178 
   178 
   179 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`.
   179 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`.
   180 
   180 
   181 === <tt>!GetAmmoName(ammoType [, ignoreOverwrite ])</tt> (0.9.23) ===
   181 === <tt>!GetAmmoName(ammoType [, ignoreOverwrite ])</tt> (0.9.23) ===
   182 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`.
   182 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`.
       
   183 
       
   184 === <tt>!SetAmmoSlot(ammoType, slot)</tt> (1.0.0) ===
       
   185 Sets the slot number of `ammoType` to the given `slot` (counting starts from 1).
       
   186 
       
   187 Use with care! It is your responsibility that each ammo slot does not hold more weapons than the maximum ammo menu width, otherwise, crashes are possible. Test with a full ammo menu to be sure.
       
   188 
       
   189 Use this function only if you absolutely must! For usability reasons and to help the player's muscle memory, we should normally not re-arrange the weapons. This function was actually only created for the “Frenzy” game style in which we needed to re-arrange the ammo slots to give each weapon an unique ammo slot.
   183 
   190 
   184 == Map ==
   191 == Map ==
   185 === <tt>!MapHasBorder()</tt> ===
   192 === <tt>!MapHasBorder()</tt> ===
   186 Returns `true`/`false` if the map has a border or not.
   193 Returns `true`/`false` if the map has a border or not.
   187 
   194