rjw-events/Source/ThinkNodes/ThinkNode_ConditionalNude.cs

43 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
{
2021-07-28 06:10:59 +00:00
2021-04-12 07:48:48 +00:00
public class ThinkNode_ConditionalNude : ThinkNode_Conditional
{
protected override bool Satisfied(Pawn pawn)
{
//if pawn is rendering apparel they shouldn't be,
2021-07-28 06:10:59 +00:00
if (pawn.Drawer.renderer.graphics.apparelGraphics.Any((x) => {
2021-04-12 07:48:48 +00:00
2021-07-28 06:10:59 +00:00
if (
x.sourceApparel.def is bondage_gear_def ||
x.sourceApparel.def.defName.ToLower().ContainsAny(new string[]
2021-04-12 07:48:48 +00:00
{
"vibrator",
"piercing",
"strapon"
2021-07-28 06:10:59 +00:00
}) ||
(RJWPreferenceSettings.sex_wear == RJWPreferenceSettings.Clothing.Headgear && !x.sourceApparel.def.apparel.bodyPartGroups.Contains(BodyPartGroupDefOf.UpperHead)))
2021-04-12 07:48:48 +00:00
return false;
return true;
}))
{
//they aren't nude
return false;
}
return true;
}
}
}