PatchOperation.LoadOnDemand - notfood/PatchOperationHighlander GitHub Wiki

Given a set of mods and a set of folders, PatchOperationLoadOnDemand loads the defs found in the folders located inside Defs_OnDemand if the mods exist. Makes it easier to manage optional dependencies.

Examples:

Autoload everything by ModID in the folder Defs_OnDemand depending if they're loaded or not.

<Operation Class="PatchOperation.LoadOnDemand"/>

If RimWorld.Royalty is present, load from Defs_Extras the folders A, B and C. Dump extra information in console.

<Operation Class="PatchOperation.LoadOnDemand">
    <mods>
        <li>RimWorld.Royalty</li>
    </mods>
    <source>Defs_Extras</source>
    <folders>
        <li>A</li>
        <li>B</li>
        <li>C</li>
    </folders>
    <verbose>True</verbose>
</Operation>
⚠️ **GitHub.com Fallback** ⚠️