Random Outcome - Vanilla-Expanded/VanillaExpandedFramework GitHub Wiki

<- Back

CompProperties_RandomOutcomeComp makes a weapon turn into other weapons when created. It is used by lasers in Vanilla Weapons Expanded - Laser so the salvaged laser weapon recipe produces random results

       public List<string> canProvideTags = new List<string>();

How do I use this code?

It is a comp class, so you just add it in XML in the <comps> tag of the ThingDef. For example, for lasers:

<comps>
      <li Class="VEF.Things.CompProperties_RandomOutcomeComp">
        <canProvideTags>
          <li>SalvagedLaserGun</li>
        </canProvideTags>
      </li>
</comps>

SalvagedLaserGun (in this case) needs to be on the weaponTags of the weapons you want to be produced.

We will probably make this a bit more generic in the future...

⚠️ **GitHub.com Fallback** ⚠️