Since engine version: 1.0 OC
With id specified, the function returns how quickly objects of that type are resupplied to the player's home base. In this case index and category are ignored. If id is not specified, the function returns the id of the indicated type of objects of the specified category in the player's resupply list. This will return all object types from the resupply list, even if they are currently not being resupplied.
int GetBaseProduction(int player, id id, int index, int category);
- Number of the player whose buying options you want to determine. The first player has the player number 0.
- [opt] If specified, the function returns the number of objects of the given type which are resupplied to the player's home base. In this case index and category are ignored.
- [opt] List index of the buyable item to check.
- [opt] Category of buyable items you want to check.
if(!GetBaseProduction(0, Firestone)) GetCursor(0)->CreateContents(Firestone);
Gives a flintstone to the selected clonk of the first player if currently no flintstones are resupplied to the player's home base.