LuaAPI.wiki
changeset 1491 78f16ba1709e
parent 1443 d25ab95f2311
child 1498 17a55d9cc7b9
equal deleted inserted replaced
1490:b5bb0845eaa7 1491:78f16ba1709e
   359 === <tt>onUsedAmmo(ammoType)</tt> (0.9.23) ===
   359 === <tt>onUsedAmmo(ammoType)</tt> (0.9.23) ===
   360 Called after a weapon has been used completely, with `ammoType` as the used ammo type.
   360 Called after a weapon has been used completely, with `ammoType` as the used ammo type.
   361 
   361 
   362 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.
   362 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.
   363 
   363 
       
   364 *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.
       
   365 
   364 === <tt>onHogHide(gearUid)</tt> ===
   366 === <tt>onHogHide(gearUid)</tt> ===
   365 This function is called when a hedgehog with the gear ID `gearUid` is hidden (removed from the map).
   367 This function is called when a hedgehog with the gear ID `gearUid` is hidden (removed from the map).
   366 
   368 
   367 === <tt>onHogRestore(gearUid)</tt> ===
   369 === <tt>onHogRestore(gearUid)</tt> ===
   368 This function is called when a hedgehog with the specified gear ID `gearUid` is restored (unhidden).
   370 This function is called when a hedgehog with the specified gear ID `gearUid` is restored (unhidden).