LuaAPI: Add warning for onUsedAmmo
Fri, 20 Jul 2018 22:30:02 +0100
changeset 1491 78f16ba1709e
parent 1490 b5bb0845eaa7
child 1492 13e8497cc611
LuaAPI: Add warning for onUsedAmmo
--- a/	Fri Jul 20 00:56:14 2018 +0100
+++ b/	Fri Jul 20 22:30:02 2018 +0100
@@ -361,6 +361,8 @@
 For example, it is called right after a bazooka is fired, when both shots of a shotgun have been fired, when extra time is used, or when all 4 shots of a portable portal device have been fired. It is also called when using a multi-shot ammo has been aborted by changing the weapon selection mid-way, because this still uses up the ammo.
+*Warning:* In 0.9.24 or earlier, you must not manipulate any ammo within this callback, e.g. by using `AddAmmo`. The ammo storage might become garbled otherwise.
 === <tt>onHogHide(gearUid)</tt> ===
 This function is called when a hedgehog with the gear ID `gearUid` is hidden (removed from the map).