using RimWorld; using System.Collections.Generic; using Verse; namespace rjwquirks.Modules.Quirks.Comps { /// /// Base class for the comps that add thoughts to the pawn /// public abstract class ThoughtAdder : QuirkComp { public ThoughtDef thought; /// /// Add to the /// public void ApplyThought(Pawn pawn, Pawn partner) => pawn.needs?.mood?.thoughts?.memories?.TryGainMemory(thought, partner); public override IEnumerable ConfigErrors(QuirkDef parent) { foreach (string error in base.ConfigErrors(parent)) { yield return error; } if (thought == null) { yield return " is empty"; } if (eventDef == null) { yield return " is empty"; } } } }