rjw-quirks/RJW-Quirks/Modules/Quirks/Comps/CompAdder.cs

26 lines
607 B
C#

using rjw;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Verse;
namespace rjwquirks.Modules.Quirks.Comps
{
// Adds quirk comp to all races
[StaticConstructorOnStartup]
public static class CompAdder
{
static CompAdder()
{
foreach (ThingDef thingDef in DefDatabase<ThingDef>.AllDefs.Where(thingDef =>
thingDef.race != null && !thingDef.race.Animal ))
{
thingDef.comps.Add(new CompProperties_QuirkSet());
}
}
}
}