Skip to content

Workbenches

Gareth Parker edited this page May 17, 2023 · 6 revisions

Many Interchangeable Lists may be lists of Workbenches. For example, Fueled Stoves and Electric Stoves. When replacing Workbenches, we want to transfer the bills from the old workbench over to the new one. Thankfully, there's a useful shortcut for that. By defining <isWorkbench>true</isWorkbench>, all items in that list will transfer bills to each other when replaced. It's a useful shortcut, but all it's doing is adding Replace_Stuff_Compatibility.Comps.TransferBills to the comps property for that list. Here's an example:

<Defs>
  <Replace_Stuff_Compatibility.InterchangeableItems>
    <defName>ReplacementMod_Vanilla</defName>
    <replaceLists>
      <li>
        <isWorkbench>true</isWorkbench>
        <items>
          <li>HandTailoringBench</li>
          <li>ElectricTailoringBench</li>
        </items>
      </li>
    </replaceLists>
  </Replace_Stuff_Compatibility.InterchangeableItems>
</Defs>

Here, we're defining that HandTailoringBench and ElectricTailoringBench are interchangeable. When a player has bills queued up in their Hand Tailoring Bench and replaces it with the Electric Tailoring Bench, those bills get transferred over.

Clone this wiki locally