rjw-events/Source/ThinkNodes/ThinkNode_ConditionalNude.cs

40 lines
1.1 KiB
C#
Raw Normal View History

2021-04-12 07:48:48 +00:00
using RimWorld;
using rjw;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Verse;
using Verse.AI;
namespace RJW_Events
{
public class ThinkNode_ConditionalNude : ThinkNode_Conditional
{
protected override bool Satisfied(Pawn pawn)
{
//if pawn is rendering apparel they shouldn't be,
if (pawn.Drawer.renderer.graphics.apparelGraphics.Any((ApparelGraphicRecord x) => {
if (x.sourceApparel.def.defName.ToLower().ContainsAny(new string[]
{
"vibrator",
"piercing",
"strapon"
}) || (RJWPreferenceSettings.sex_wear == RJWPreferenceSettings.Clothing.Headgear && !x.sourceApparel.def.apparel.bodyPartGroups.Contains(BodyPartGroupDefOf.UpperHead)))
return false;
return true;
}))
{
//they aren't nude
return false;
}
return true;
}
}
}