Configurable Spawner - Vanilla-Expanded/VanillaExpandedFramework GitHub Wiki
CompProperties_ConfigurableSpawner is a slightly more configurable version of the base game spawner
public int spawnCount = 1;
public bool spawnForbidden;
public bool requiresPower;
public bool requiresFuel;
public bool writeTimeLeftToSpawn;
public bool showMessageIfOwned;
public string saveKeysPrefix;
public bool inheritFaction;
It also requires a custom def, ConfigurableSpawnerDef
//ConfigurableSpawnerDef defines a list of items that can be selected in a configurable spawner building.
public List<string> items;
public string listName;
public string building;
public string GizmoIcon = "";
public string GizmoLabel = "";
public string GizmoDescription = "";
public int timeInTicks = 1000;
It is a comp class, so you just add it in XML in the <comps>
tag. For example, this is the fish trapper in VFE Mechanoids:
<comps>
<li Class="VEF.Buildings.CompProperties_ConfigurableSpawner">
<spawnForbidden>false</spawnForbidden>
<requiresPower>true</requiresPower>
<requiresFuel>false</requiresFuel>
<spawnCount>12</spawnCount>
<writeTimeLeftToSpawn>true</writeTimeLeftToSpawn>
<showMessageIfOwned>false</showMessageIfOwned>
</li>
</comps>
This is an example of one of its ConfigurableSpawnerDefs
<VEF.Buildings.ConfigurableSpawnerDef>
<defName>MAO_SpawnSmallFish</defName>
<listName>SmallFish</listName>
<building>VFE_FishTrapper</building>
<GizmoIcon>UI/Commands/VCEF_Command_ChooseSmallFish</GizmoIcon>
<GizmoDescription>GizmoDescriptionSmall</GizmoDescription>
<GizmoLabel>VFE_FishTrapperGizmoLabelSmall</GizmoLabel>
<timeInTicks>5000</timeInTicks>
<items>
<li>VCEF_RawAnchovy</li>
<li>VCEF_RawAngelfish</li>
<li>VCEF_RawGuppy</li>
<li>VCEF_RawHerring</li>
<li>VCEF_RawGoldfish</li>
<li>VCEF_RawMinnow</li>
<li>VCEF_RawClownfish</li>
<li>VCEF_RawSprat</li>
</items>
</VEF.Buildings.ConfigurableSpawnerDef>