# HG changeset patch # User Wuzzy # Date 1532122202 -3600 # Node ID 78f16ba1709e62e84b4119acc4a7b885362e5693 # Parent b5bb0845eaa713633de13c83fee0efd07cbb52c1 LuaAPI: Add warning for onUsedAmmo diff -r b5bb0845eaa7 -r 78f16ba1709e LuaAPI.wiki --- a/LuaAPI.wiki Fri Jul 20 00:56:14 2018 +0100 +++ b/LuaAPI.wiki 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. + === onHogHide(gearUid) === This function is called when a hedgehog with the gear ID `gearUid` is hidden (removed from the map).