LuaAPI.wiki
changeset 202 47363108b6b6
parent 184 346bf9196f84
child 203 08cc35ba4d34
--- a/LuaAPI.wiki	Tue Jan 24 00:25:54 2012 +0000
+++ b/LuaAPI.wiki	Sun Feb 26 17:39:27 2012 +0000
@@ -102,6 +102,16 @@
 <blockquote>This function is called when the game is initialized to request the available ammo and ammo probabilities. Use !SetAmmo here.
 </blockquote>
 
+=== <tt>onNewAmmoStore(team index [or clan], hog index)</tt> ===
+
+<blockquote>This function is identical to onAmmoStoreInit in function, but is called once per ammo store.  This allows different ammo sets for each clan, team or hedgehog depending on the mode.</blockquote>
+If gfSharedAmmo is set, the parameters passed are the clan index, and -1, and the function will be called once for each clan.
+If gfPerHogAmmo is set, the parameters passed are the team index and the hog index in that team, and the function will be called once for each hedgehog.
+If neither is set, the parameters passed are the team index and -1, and the function will be called once for each team.
+
+These indexes can be used to look up details of the clan/team/hedgehog prior to gear creation.  Routines to do these lookups will be created as needed.
+If you add this hook, the expectation is that you will call SetAmmo appropriately.  Any values from onAmmoStoreInit are ignored.
+
 === <tt>onScreenResize() (0.9.16) </tt> ===
 
 <blockquote>This function is called when you resize the screen. Useful place to put a redraw function for any vgtHealthTags you're using.