<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE funcs
  SYSTEM '../../../clonk.dtd'>
<?xml-stylesheet type="text/xsl" href="../../../clonk.xsl"?>
<funcs>
  <func>
    <title>GetBaseProduction</title>
    <category>Player</category>
    <version>5.1 OC</version>
    <syntax>
      <rtype>int</rtype>
      <params>
        <param>
          <type>int</type>
          <name>player</name>
          <desc>Number of the player whose buying options you want to determine. The first player has the player number 0.</desc>
        </param>
        <param>
          <type>id</type>
          <name>id</name>
          <desc>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.</desc>
          <optional />
        </param>
        <param>
          <type>int</type>
          <name>index</name>
          <desc>List index of the buyable item to check.</desc>
          <optional />
        </param>
        <param>
          <type>int</type>
          <name>category</name>
          <desc>Category of buyable items you want to check.</desc>
          <optional />
        </param>
      </params>
    </syntax>
    <desc>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.</desc>
    <examples>
      <example>
        <code>if(!<funclink>GetBaseProduction</funclink>(0, Firestone)) <funclink>GetCursor</funclink>(0)-&gt;<funclink>CreateContents</funclink>(Firestone);</code>
        <text>Gives a flintstone to the selected clonk of the first player if currently no flintstones are resupplied to the player's home base.</text>
      </example>
    </examples>
    <related>
      <funclink>GetBaseMaterial</funclink>
      <funclink>DoBaseMaterial</funclink>
      <funclink>SetBaseMaterial</funclink>
      <funclink>DoBaseProduction</funclink>
      <funclink>SetBaseProduction</funclink>
      <funclink>C4D_All</funclink>
      <funclink>C4D_Goal</funclink>
      <funclink>C4D_Living</funclink>
      <funclink>C4D_Object</funclink>
      <funclink>C4D_Rule</funclink>
      <funclink>C4D_StaticBack</funclink>
      <funclink>C4D_Structure</funclink>
      <funclink>C4D_Vehicle</funclink>
    </related>
  </func>
  <author>Maikel</author><date>2014-04</date>
</funcs>
