using rjw.Modules.Interactions.Enums; using rjw.Modules.Interactions.Objects; using rjw.Modules.Shared; using System.Collections.Generic; using Verse; namespace rjwquirks.Modules.Quirks.Comps { public class PartKindUsageRules_Static : PartKindUsageRules { // rjw.Modules.Shared can't be loaded directly because it uses properties. // Probably should change that, but it'll cause more ripples then I'm willing to handle rn public class WeightedDef { public LewdablePartKind partKind; public float weightMultiplier; } public List self = new List(); public List partner = new List(); public override IEnumerable> GetModifiersForPawn(InteractionPawn quirkOwner, InteractionPawn partner) { return self.ConvertAll(ruleDef => new Weighted(ruleDef.weightMultiplier, ruleDef.partKind)); } public override IEnumerable> GetModifiersForPartner(InteractionPawn quirkOwner, InteractionPawn partner) { return this.partner.ConvertAll(ruleDef => new Weighted(ruleDef.weightMultiplier, ruleDef.partKind)); } public override IEnumerable ConfigErrors(QuirkDef parent) { foreach (string error in base.ConfigErrors(parent)) { yield return error; } if (self.NullOrEmpty() && partner.NullOrEmpty()) { yield return "Both and can not be empty"; } } } }