# HG changeset patch
# User Wuzzy
# Date 1478701003 0
# Node ID ea13b02292c5e3626fdeb51262718461bd3efe66
# Parent eaafb853db575141c940e826c1fb7cc3081d5573
LuaAPI: Move non-gear related ammo functions to new section
diff -r eaafb853db57 -r ea13b02292c5 LuaAPI.wiki
--- a/LuaAPI.wiki Wed Nov 09 14:15:20 2016 +0000
+++ b/LuaAPI.wiki Wed Nov 09 14:16:43 2016 +0000
@@ -741,25 +741,6 @@
=== !SetGearFriction(gearUid, Friction) ===
Sets the friction of the specified gear. The friction normally determines how well the gear will slide on terrain. Higher values are for increased sliding properties. `0` is for no sliding whatsoever, where `9999` is for very long slides, greater values are not recommended.
-=== !SetAmmo(ammoType, count, probability, delay, numberInCrate) ===
-This updates the settings for a specified [AmmoTypes Ammo Type] as of count available for players, spawn probability, availability delay in turns, and the number available in crates. This is supposed to be used in the `onAmmoStoreInit()` event handler.
-
-Example:
-
- SetAmmo(amShotgun, 9, 0, 0, 0) -- unlimited amount of shotgun ammo for players
- SetAmmo(amGrenade, 0, 0, 0, 3) -- crates should contain always three grenade
-
-=== !SetAmmoDelay(ammoType, delay) ===
-Changes the delay of a specified [AmmoTypes Ammo Type].
-
-=== !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.
-
-=== !GetAmmoName(ammoType) (0.9.23) ===
-Returns the localized name for the specified `ammoType`.
-
=== !SetHealth(gearUid, health) ===
Sets the health of the specified gear. The “health” of a gear can refer to many things, depending on the gear type.
@@ -931,6 +912,26 @@
==== !EndGame() ====
Makes the game end.
+=== Ammo ===
+==== !SetAmmo(ammoType, count, probability, delay, numberInCrate) ====
+This updates the settings for a specified [AmmoTypes Ammo Type] as of count available for players, spawn probability, availability delay in turns, and the number available in crates. This is supposed to be used in the `onAmmoStoreInit()` event handler.
+
+Example:
+
+ SetAmmo(amShotgun, 9, 0, 0, 0) -- unlimited amount of shotgun ammo for players
+ SetAmmo(amGrenade, 0, 0, 0, 3) -- crates should contain always three grenade
+
+==== !SetAmmoDelay(ammoType, delay) ====
+Changes the delay of a specified [AmmoTypes Ammo Type].
+
+==== !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.
+
+==== !GetAmmoName(ammoType) (0.9.23) ====
+Returns the localized name for the specified `ammoType`.
+
=== Map ===
==== !MapHasBorder() ====
Returns `true`/`false` if the map has a border or not.