code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Verse;
using UnityEngine;
using RimWorld;

namespace Rimworld_Animations {

    public class AnimationSettings : ModSettings {

        public static bool orgasmQuiver, rapeShiver, soundOverride = true, hearts = true, controlGenitalRotation = false, applySemenOnAnimationOrgasm = false, fastAnimForQuickie = false,
            PlayAnimForNonsexualActs = true;
        public static bool offsetTab = false, debugMode = false;
        public static float shiverIntensity = 2f;

        public static Dictionary<string, Vector2> offsets = new Dictionary<string, Vector2>();
        public static Dictionary<string, float> rotation = new Dictionary<string, float>();
        public static Dictionary<string, int> shiftCount = new Dictionary<string, int>();

        public override void ExposeData() {

            base.ExposeData();

            Scribe_Values.Look(ref debugMode, "RJWAnimations-AnimsDebugMode", false);
            Scribe_Values.Look(ref offsetTab, "RJWAnimations-EnableOffsetTab", false);
            Scribe_Values.Look(ref controlGenitalRotation, "RJWAnimations-controlGenitalRotation", false);
            Scribe_Values.Look(ref orgasmQuiver, "RJWAnimations-orgasmQuiver");
            Scribe_Values.Look(ref fastAnimForQuickie, "RJWAnimations-fastAnimForQuickie");
            Scribe_Values.Look(ref rapeShiver, "RJWAnimations-rapeShiver");
            Scribe_Values.Look(ref hearts, "RJWAnimation-sheartsOnLovin");
            Scribe_Values.Look(ref PlayAnimForNonsexualActs, "RJWAnims-PlayAnimForNonsexualActs");
            Scribe_Values.Look(ref applySemenOnAnimationOrgasm, "RJWAnimations-applySemenOnOrgasm", false);
            Scribe_Values.Look(ref soundOverride, "RJWAnimations-rjwAnimSoundOverride", true);
            Scribe_Values.Look(ref shiverIntensity, "RJWAnimations-shiverIntensity", 2f);
            //todo: save offsetsByDefName

            Scribe_Collections.Look(ref offsets, "RJWAnimations-animationOffsets");
            Scribe_Collections.Look(ref rotation, "RJWAnimations-rotationOffsets");
            Scribe_Collections.Look(ref shiftCount, "RJWAnimations-shiftCount");

            //needs to be rewritten
            //probably somewhere in options?

        }

    }

    public class RJW_Animations : Mod {

        public RJW_Animations(ModContentPack content) : base(content) {
            GetSettings<AnimationSettings>();

        }

        public override void DoSettingsWindowContents(Rect inRect) {

            Listing_Standard listingStandard = new Listing_Standard();
            listingStandard.Begin(inRect);

            listingStandard.CheckboxLabeled("Enable Sound Override", ref AnimationSettings.soundOverride);
            listingStandard.CheckboxLabeled("Control Genital Rotation", ref AnimationSettings.controlGenitalRotation);
            listingStandard.CheckboxLabeled("Play Fast Animation for Quickie", ref AnimationSettings.fastAnimForQuickie);
            listingStandard.CheckboxLabeled("Apply Semen on Animation Orgasm", ref AnimationSettings.applySemenOnAnimationOrgasm);

            if(AnimationSettings.applySemenOnAnimationOrgasm) {
                listingStandard.Label("Recommended--turn down \"Cum on body percent\" in RJW settings to about 33%");
            }

            listingStandard.CheckboxLabeled("Enable Orgasm Quiver", ref AnimationSettings.orgasmQuiver);
            listingStandard.CheckboxLabeled("Enable Rape Shiver", ref AnimationSettings.rapeShiver);
            listingStandard.CheckboxLabeled("Enable hearts during lovin'", ref AnimationSettings.hearts);
            listingStandard.CheckboxLabeled("Play animation for nonsexual acts (handholding, makeout)", ref AnimationSettings.PlayAnimForNonsexualActs);
            listingStandard.CheckboxLabeled("Enable Animation Manager Tab", ref AnimationSettings.offsetTab);

            listingStandard.Label("Shiver/Quiver Intensity (default 2): " + AnimationSettings.shiverIntensity);
            AnimationSettings.shiverIntensity = listingStandard.Slider(AnimationSettings.shiverIntensity, 0.0f, 12f);

            listingStandard.CheckboxLabeled("Debug Mode", ref AnimationSettings.debugMode);

            listingStandard.End();
            base.DoSettingsWindowContents(inRect);
        }

        public override void WriteSettings() {
            base.WriteSettings();
            OffsetMainButtonDefOf.OffsetManager.buttonVisible = AnimationSettings.offsetTab;

        }

        public override string SettingsCategory() {
            return "RJW Animation Settings";
        }
    }
}


code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using RimWorld;
using rjw.Modules.Interactions.Helpers;
using rjw.Modules.Interactions.Objects;
using UnityEngine;
using Verse;
using Verse.AI;
using rjw.Modules.Interactions.Enums;

namespace Rimworld_Animations {
    public static class AnimationUtility {
        /*
         Note: always make the list in this order:
             Female pawns, animal female pawns, male pawns, animal male pawns
        */
        public static AnimationDef tryFindAnimation(ref List<Pawn> participants, rjw.xxx.rjwSextype sexType = 0, rjw.SexProps sexProps = null) {

            InteractionWithExtension interaction = InteractionHelper.GetWithExtension(sexProps.dictionaryKey);

            if(interaction.HasInteractionTag(InteractionTag.Reverse))
            {
                Pawn buffer = participants[1];
                participants[1] = participants[0];
                participants[0] = buffer;
            }

            participants =
                participants.OrderBy(p => p.jobs.curDriver is rjw.JobDriver_SexBaseInitiator)
                .OrderBy(p => rjw.xxx.can_fuck(p))
                .ToList();

            List<Pawn> localParticipants = new List<Pawn>(participants);

            IEnumerable<AnimationDef> options = DefDatabase<AnimationDef>.AllDefs.Where((AnimationDef x) => {

                if (x.actors.Count != localParticipants.Count) {
                    return false;
                }
                for (int i = 0; i < x.actors.Count; i++) {

                    if (rjw.RJWPreferenceSettings.Malesex == rjw.RJWPreferenceSettings.AllowedSex.Nohomo) {
                        if (rjw.xxx.is_male(localParticipants[i]) && x.actors[i].isFucked) {
                            return false;
                        }
                }
				if (x.actors[i].requiredGender != null && !x.actors[i].requiredGender.Contains(localParticipants[i].gender.ToStringSafe<Gender>()))
				{
					if (AnimationSettings.debugMode)
					{
						Log.Message(string.Concat(new string[]
						{
							x.defName.ToStringSafe<string>(),
							" not selected -- ",
							localParticipants[i].def.defName.ToStringSafe<string>(),
							" ",
							localParticipants[i].Name.ToStringSafe<Name>(),
							" does not match required gender"
						}));
					}
					return false;
				}
                    if ((x.actors[i].blacklistedRaces != null) && x.actors[i].blacklistedRaces.Contains(localParticipants[i].def.defName)) {
                        if(AnimationSettings.debugMode)
                            Log.Message(x.defName.ToStringSafe() + " not selected -- " + localParticipants[i].def.defName.ToStringSafe() + " " + localParticipants[i].Name.ToStringSafe() + " is blacklisted");
                        return false;
                    }

                    if(x.actors[i].defNames.Contains("Human")) {
                        if (!rjw.xxx.is_human(localParticipants[i])) {
                            if (AnimationSettings.debugMode)
                                Log.Message(x.defName.ToStringSafe() + " not selected -- " + localParticipants[i].def.defName.ToStringSafe() + " " + localParticipants[i].Name.ToStringSafe() + " is not human");

                            return false;
                        }

                    }
                    else if (!x.actors[i].bodyDefTypes.Contains(localParticipants[i].RaceProps.body)) {

                        if (!x.actors[i].defNames.Contains(localParticipants[i].def.defName)) {

                            if (rjw.RJWSettings.DevMode) {
                                string animInfo = x.defName.ToStringSafe() + " not selected -- " + localParticipants[i].def.defName.ToStringSafe() + " " + localParticipants[i].Name.ToStringSafe() + " is not ";
                                foreach(String defname in x.actors[i].defNames) {
                                    animInfo += defname + ", ";
                                }
                                if (AnimationSettings.debugMode)
                                    Log.Message(animInfo);
                            }

                            return false;
                        }
                    }
                    //genitals checking

                    if(!GenitalCheckForPawn(x.actors[i].requiredGenitals, localParticipants[i], out string failReason)) {
                        Debug.Log("Didn't select " + x.defName + ", " + localParticipants[i].Name + " " + failReason);
                        return false;
                    }

                    //TESTING ANIMATIONS ONLY REMEMBER TO COMMENT OUT BEFORE PUSH
                    /*
                    if (x.defName != "Cunnilingus")
                        return false;
                    */

                    if (x.actors[i].isFucking && !rjw.xxx.can_fuck(localParticipants[i])) {
                        if (AnimationSettings.debugMode)
                            Log.Message(x.defName.ToStringSafe() + " not selected -- " + localParticipants[i].def.defName.ToStringSafe() + " " + localParticipants[i].Name.ToStringSafe() + " can't fuck");
                        return false;
                    }

                    if (x.actors[i].isFucked && !rjw.xxx.can_be_fucked(localParticipants[i])) {
                        if (AnimationSettings.debugMode)
                            Log.Message(x.defName.ToStringSafe() + " not selected -- " + localParticipants[i].def.defName.ToStringSafe() + " " + localParticipants[i].Name.ToStringSafe() + " can't be fucked");
                        return false;
                    }
                }
                return true;
            });
            List<AnimationDef> optionsWithInteractionType = options.ToList().FindAll(x => x.interactionDefTypes != null && x.interactionDefTypes.Contains(sexProps.sexType.ToStringSafe()));
            if (optionsWithInteractionType.Any()) {
                if (AnimationSettings.debugMode)
                    Log.Message("Selecting animation for interaction type " + sexProps.sexType.ToStringSafe() + "...");
                return optionsWithInteractionType.RandomElement();
            }
            List<AnimationDef> optionsWithSexType = options.ToList().FindAll(x => x.sexTypes != null && x.sexTypes.Contains(sexType));
            if (optionsWithSexType.Any()) {
                if (AnimationSettings.debugMode)
                    Log.Message("Selecting animation for rjwSexType " + sexType.ToStringSafe() + "...");
                return optionsWithSexType.RandomElement();
            }

            /*
            if(optionsWithInitiator.Any()) {
                if (AnimationSettings.debugMode)
                    Log.Message("Selecting animation for initiators...");
            }
            */

            if (options != null && options.Any()) {
                if (AnimationSettings.debugMode)
                    Log.Message("Randomly selecting animation...");
                return options.RandomElement();
            }
            else
                return null;
        }

        public static void RenderPawnHeadMeshInAnimation1(Mesh mesh, Vector3 loc, Quaternion quaternion, Material material, bool drawNow, Pawn pawn) {

            if (pawn == null || pawn.Map != Find.CurrentMap) {
                GenDraw.DrawMeshNowOrLater(mesh, loc, quaternion, material, drawNow);
                return;
            }

            CompBodyAnimator pawnAnimator = pawn.TryGetComp<CompBodyAnimator>();

            if (pawnAnimator == null || !pawnAnimator.isAnimating) {
                GenDraw.DrawMeshNowOrLater(mesh, loc, quaternion, material, drawNow);
            } else {
                Vector3 pawnHeadPosition = pawnAnimator.getPawnHeadPosition();
                pawnHeadPosition.y = loc.y;
                GenDraw.DrawMeshNowOrLater(MeshPool.humanlikeHeadSet.MeshAt(pawnAnimator.headFacing), pawnHeadPosition, Quaternion.AngleAxis(pawnAnimator.headAngle, Vector3.up), material, true);
            }
        }

        public static void AdjustHead(ref Quaternion quat, ref Rot4 bodyFacing, ref Vector3 pos, ref float angle, Pawn pawn, PawnRenderFlags flags)
        {
            if (flags.FlagSet(PawnRenderFlags.Portrait)) return;

            CompBodyAnimator anim = pawn.TryGetComp<CompBodyAnimator>();
            if (anim.isAnimating)
            {
                bodyFacing = anim.headFacing;
                angle = anim.headAngle;
                quat = Quaternion.AngleAxis(anim.headAngle, Vector3.up);
                pos = anim.getPawnHeadOffset();

            }
        }

        public static void RenderPawnHeadMeshInAnimation(Mesh mesh, Vector3 loc, Quaternion quaternion, Material material, bool portrait, Pawn pawn, float bodySizeFactor = 1) {

            if (pawn == null) {
                GenDraw.DrawMeshNowOrLater(mesh, loc, quaternion, material, portrait);
                return;
            }

            CompBodyAnimator pawnAnimator = pawn.TryGetComp<CompBodyAnimator>();

            if (pawnAnimator == null || !pawnAnimator.isAnimating || portrait) {
                GenDraw.DrawMeshNowOrLater(mesh, loc, quaternion, material, portrait);
            }
            else {
                Vector3 pawnHeadPosition = pawnAnimator.getPawnHeadPosition();
                pawnHeadPosition.x *= bodySizeFactor;
                pawnHeadPosition.x *= bodySizeFactor;
                pawnHeadPosition.y = loc.y;
                GenDraw.DrawMeshNowOrLater(mesh, pawnHeadPosition, Quaternion.AngleAxis(pawnAnimator.headAngle, Vector3.up), material, portrait);
            }
        }

        public static bool GenitalCheckForPawn(List<string> requiredGenitals, Pawn pawn, out string failReason) {

            failReason = null;
            if (requiredGenitals != null) {
                if (requiredGenitals.Contains("Vagina")) {

                    if (!rjw.Genital_Helper.has_vagina(pawn)) {
                        failReason = "missing vagina";
                        return false;
                    }

                }

                if (requiredGenitals.Contains("Penis")) {

                    if (!(rjw.Genital_Helper.has_multipenis(pawn) || rjw.Genital_Helper.has_penis_infertile(pawn) || rjw.Genital_Helper.has_penis_fertile(pawn) || rjw.Genital_Helper.has_ovipositorM(pawn) || rjw.Genital_Helper.has_ovipositorF(pawn))) {
                        failReason = "missing penis";
                        return false;
                    }

                }

                if (requiredGenitals.Contains("Mouth")) {

                    if (!rjw.Genital_Helper.has_mouth(pawn)) {
                        failReason = "missing mouth";
                        return false;
                    }

                }

                if (requiredGenitals.Contains("Anus")) {

                    if (!rjw.Genital_Helper.has_anus(pawn)) {
                        failReason = "missing anus";
                        return false;
                    }

                }

                if (requiredGenitals.Contains("Breasts")) {
                    if (!rjw.Genital_Helper.can_do_breastjob(pawn)) {
                        failReason = "missing breasts";
                        return false;
                    }
                }

                if (requiredGenitals.Contains("NoVagina")) {

                    if (rjw.Genital_Helper.has_vagina(pawn)) {
                        failReason = "has vagina";
                        return false;
                    }

                }

                if (requiredGenitals.Contains("NoPenis")) {

                    if ((rjw.Genital_Helper.has_multipenis(pawn) || rjw.Genital_Helper.has_penis_infertile(pawn) || rjw.Genital_Helper.has_penis_fertile(pawn))) {
                        failReason = "has penis";
                        return false;
                    }

                }

                if (requiredGenitals.Contains("NoMouth")) {

                    if (rjw.Genital_Helper.has_mouth(pawn)) {
                        failReason = "has mouth";
                        return false;
                    }

                }

                if (requiredGenitals.Contains("NoAnus")) {

                    if (rjw.Genital_Helper.has_anus(pawn)) {
                        failReason = "has anus";
                        return false;
                    }

                }

                if (requiredGenitals.Contains("NoBreasts")) {
                    if (rjw.Genital_Helper.can_do_breastjob(pawn)) {
                        failReason = "has breasts";
                        return false;
                    }
                }
            }

            return true;

        }

        public static Rot4 PawnHeadRotInAnimation(Pawn pawn, Rot4 regularPos)
        {
            Debug.Log("Test");

            if(pawn?.TryGetComp<CompBodyAnimator>() != null && pawn.TryGetComp<CompBodyAnimator>().isAnimating)
            {
                return pawn.TryGetComp<CompBodyAnimator>().headFacing;
            }

            return regularPos;
        }
    }
}

repo_name: Sumret/rimworld

license: unknown


code:
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml;
using Verse;

namespace Rimworld_Animations
{
    public class PatchOperationAddOrReplace : PatchOperationPathed
    {

        protected string key;
        private XmlContainer value;

        protected override bool ApplyWorker(XmlDocument xml)
        {
            XmlNode valNode = value.node;
            bool result = false;
            IEnumerator enumerator = xml.SelectNodes(xpath).GetEnumerator();
            try
            {
                while (enumerator.MoveNext())
                {
                    object obj = enumerator.Current;
                    result = true;
                    XmlNode parentNode = obj as XmlNode;
                    XmlNode xmlNode = parentNode.SelectSingleNode(key);
                    if (xmlNode == null)
                    {
                        // Add - Add node if not existing
                        xmlNode = parentNode.OwnerDocument.CreateElement(key);
                        parentNode.AppendChild(xmlNode);
                    }
                    else
                    {
                        // Replace - Clear existing children
                        xmlNode.RemoveAll();
                    }
                    // (Re)add value
                    xmlNode.AppendChild(parentNode.OwnerDocument.ImportNode(valNode.FirstChild, true));
                }
            }
            finally
            {
                IDisposable disposable = enumerator as IDisposable;
                if (disposable != null)
                {
                    disposable.Dispose();
                }
            }
            return result;
        }

    }

}


code:
<?xml version="1.0" encoding="utf-8"?>

<ModMetaData>
	<name>Rimworld-Animations</name>
	<author>C0ffee</author>
  <url>https://gitgud.io/c0ffeeeeeeee/rimworld-animations</url>
	<supportedVersions>

1.1

1.2

1.3

	</supportedVersions>
	<packageId>c0ffee.rimworld.animations</packageId>
	<modDependencies>

			<packageId>brrainz.harmony</packageId>
			<displayName>Harmony</displayName>
			<steamWorkshopUrl>steam://url/CommunityFilePage/2009463077</steamWorkshopUrl>
			<downloadUrl>https://github.com/pardeike/HarmonyRimWorld/releases/latest</downloadUrl>

			<packageId>UnlimitedHugs.HugsLib</packageId>
			<displayName>HugsLib</displayName>
			<downloadUrl>https://github.com/UnlimitedHugs/RimworldHugsLib/releases/latest</downloadUrl>
			<steamWorkshopUrl>steam://url/CommunityFilePage/818773962</steamWorkshopUrl>

			<packageId>rim.job.world</packageId>
			<displayName>RimJobWorld</displayName>
			<downloadUrl>https://www.loverslab.com/topic/110270-mod-rimjobworld/</downloadUrl>

			<packageId>erdelf.HumanoidAlienRaces</packageId>
			<displayName>Humanoid Alien Races 2.0</displayName>
			<steamWorkshopUrl>https://steamcommunity.com/sharedfiles/filedetails/?id=839005762</steamWorkshopUrl>

	</modDependencies>
	<loadAfter>

UnlimitedHugs.HugsLib

brrainz.harmony

erdelf.humanoidalienraces

nals.facialanimation

com.yayo.yayoAni

	</loadAfter>
	<loadBefore>
	</loadBefore>
	<incompatibleWith>

velc.HatsDisplaySelection

	</incompatibleWith>
	<description>
    Rimworld Animations! Hurray!

    Questions or bugs?
    Chat with me on the forums: https://www.loverslab.com/topic/140386-rjw-animations/
    Or on the rjw discord: https://discord.gg/CXwHhv8

  </description>
</ModMetaData>


code:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Manifest>
  <identifier>Rimworld-Animations</identifier>
  <version>1.2.7</version>
</Manifest>


code:
<?xml version="1.0" encoding="utf-8"?>
<LanguageData>

  <OffsetManager.label>gerenciador de posições</OffsetManager.label>
  <OffsetManager.description>Controla as posições sexuais dos colonos.</OffsetManager.description>

</LanguageData>


code:
<?xml version="1.0" encoding="utf-8"?>
<LanguageData>

  <Dog_Doggystyle.label>estilo cachorrinho</Dog_Doggystyle.label>
  <Horse_Cowgirl.label>vaqueira</Horse_Cowgirl.label>

</LanguageData>


code:
<?xml version="1.0" encoding="utf-8"?>
<LanguageData>

  <Tribadism.label>tribadismo</Tribadism.label>
  <Cunnilingus.label>cunilíngua</Cunnilingus.label>

</LanguageData>


code:
<?xml version="1.0" encoding="utf-8"?>
<LanguageData>

  <Double_Penetration.label>dupla penetração</Double_Penetration.label>

</LanguageData>


code:
<?xml version="1.0" encoding="utf-8"?>
<LanguageData>

  <Doggystyle.label>estilo cachorrinho</Doggystyle.label>
  <Blowjob.label>boquete</Blowjob.label>
  <ReverseStandAndCarry.label>69</ReverseStandAndCarry.label>
  <Cowgirl.label>vaqueira</Cowgirl.label>

</LanguageData>


code:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<loadFolders>
	<v1.1>

/

1.1

	</v1.1>
	<v1.2>

/

1.2

Patch_HatsDisplaySelection/1.2

	</v1.2>
	<v1.3>

/

1.3

Patch_HatsDisplaySelection/1.2

Patch_SexToysMasturbation

Patch_SexToysMasturbation/1.3

	</v1.3>
	<v1.4>

/

1.4

Patch_HatsDisplaySelection/1.2

Patch_SexToysMasturbation

Patch_SexToysMasturbation/1.3

	</v1.4>

</loadFolders>


code:
<?xml version="1.0" encoding="utf-8" ?>
<Defs>
	<Patch_SexToysMasturbation.SexToyAnimationDef>
		<defName>Masturbation_DildoVaginal</defName>
		dildo masturbation
		<requiredBodyPart>vagina</requiredBodyPart>
		<sounds>true</sounds>
		<sexTypes>

Masturbation

		</sexTypes>
		<actors>

				<defNames>

Human

				</defNames>
				<isFucked>true</isFucked>

		</actors>

		<animationStages>

				<stageName>Masturbating</stageName>
				<isLooping>true</isLooping>
				<playTimeTicks>917</playTimeTicks>
				<stageIndex>0</stageIndex>
				<animationClips>

						<layer>LayingPawn</layer>
						<keyframes>

								<tickDuration>40</tickDuration>
								<bodyAngle>73.01611</bodyAngle>
								<headAngle>40.0739746</headAngle>
								<genitalAngle>0</genitalAngle>
								<bodyOffsetZ>0.054543376</bodyOffsetZ>
								<bodyOffsetX>0.112624526</bodyOffsetX>
								<headBob>0</headBob>
								<bodyFacing>3</bodyFacing>
								<headFacing>3</headFacing>

								<soundEffect>Slimy</soundEffect>
								<tickDuration>30</tickDuration>
								<bodyAngle>76.4867554</bodyAngle>
								<headAngle>45.3887634</headAngle>
								<genitalAngle>0</genitalAngle>
								<bodyOffsetZ>0.0506898165</bodyOffsetZ>
								<bodyOffsetX>0.08564949</bodyOffsetX>
								<headBob>0</headBob>
								<bodyFacing>3</bodyFacing>
								<headFacing>3</headFacing>

								<tickDuration>30</tickDuration>
								<bodyAngle>78.22131</bodyAngle>
								<headAngle>48.0072327</headAngle>
								<genitalAngle>0</genitalAngle>
								<bodyOffsetZ>0.039129138</bodyOffsetZ>
								<bodyOffsetX>0.07794231</bodyOffsetX>
								<headBob>0</headBob>
								<bodyFacing>3</bodyFacing>
								<headFacing>3</headFacing>

								<tickDuration>30</tickDuration>
								<bodyAngle>76.4867554</bodyAngle>
								<headAngle>45.3887634</headAngle>
								<genitalAngle>0</genitalAngle>
								<bodyOffsetZ>0.0506898165</bodyOffsetZ>
								<bodyOffsetX>0.08564949</bodyOffsetX>
								<headBob>0</headBob>
								<bodyFacing>3</bodyFacing>
								<headFacing>3</headFacing>

								<tickDuration>1</tickDuration>
								<bodyAngle>73.01611</bodyAngle>
								<headAngle>40.0739746</headAngle>
								<genitalAngle>0</genitalAngle>
								<bodyOffsetZ>0.054543376</bodyOffsetZ>
								<bodyOffsetX>0.112624526</bodyOffsetX>
								<headBob>0</headBob>
								<bodyFacing>3</bodyFacing>
								<headFacing>3</headFacing>

						</keyframes>

						<keyframes>

								<tickDuration>40</tickDuration>
								<positionX>-0.359264076</positionX>
								<positionZ>-0.00901746</positionZ>
								<rotation>114.011215</rotation>

								<tickDuration>30</tickDuration>
								<positionX>-0.2783391</positionX>
								<positionZ>-0.0514066666</positionZ>
								<rotation>81.16443</rotation>

								<tickDuration>30</tickDuration>
								<positionX>-0.1704393</positionX>
								<positionZ>-0.0668209046</positionZ>
								<rotation>72.8611145</rotation>

								<tickDuration>30</tickDuration>
								<positionX>-0.2783391</positionX>
								<positionZ>-0.0514066666</positionZ>
								<rotation>81.16443</rotation>

								<tickDuration>1</tickDuration>
								<positionX>-0.359264076</positionX>
								<positionZ>-0.00901746</positionZ>
								<rotation>114.011215</rotation>

						</keyframes>

				</animationClips>

				<stageName>GettingIntoPosition</stageName>
				<isLooping>false</isLooping>
				<stageIndex>0</stageIndex>
				<animationClips>

						<layer>LayingPawn</layer>
						<keyframes>

								<tickDuration>50</tickDuration>
								<bodyAngle>73.01611</bodyAngle>
								<headAngle>40.0739746</headAngle>
								<genitalAngle>0</genitalAngle>
								<bodyOffsetZ>0.054543376</bodyOffsetZ>
								<bodyOffsetX>0.112624526</bodyOffsetX>
								<headBob>0</headBob>
								<bodyFacing>3</bodyFacing>
								<headFacing>3</headFacing>

								<soundEffect>Slimy</soundEffect>
								<tickDuration>1</tickDuration>
								<bodyAngle>81.65927</bodyAngle>
								<headAngle>58.8843079</headAngle>
								<genitalAngle>0</genitalAngle>
								<bodyOffsetZ>0.03912908</bodyOffsetZ>
								<bodyOffsetX>0.08950315</bodyOffsetX>
								<headBob>0</headBob>
								<bodyFacing>3</bodyFacing>
								<headFacing>3</headFacing>

						</keyframes>

						<keyframes>

								<tickDuration>50</tickDuration>
								<positionX>-0.359264076</positionX>
								<positionZ>-0.00901746</positionZ>
								<rotation>114.011215</rotation>

								<tickDuration>1</tickDuration>
								<positionX>-0.2899</positionX>
								<positionZ>-0.0282852575</positionZ>
								<rotation>98.13748</rotation>

						</keyframes>

				</animationClips>

				<stageName>FastMasturbation</stageName>
				<isLooping>true</isLooping>
				<stageIndex>0</stageIndex>
				<playTimeTicks>1610</playTimeTicks>
				<animationClips>

						<layer>LayingPawn</layer>
						<keyframes>

								<tickDuration>20</tickDuration>
								<bodyAngle>81.65927</bodyAngle>
								<headAngle>58.8843079</headAngle>
								<genitalAngle>0</genitalAngle>
								<bodyOffsetZ>0.03912908</bodyOffsetZ>
								<bodyOffsetX>0.08950315</bodyOffsetX>
								<headBob>0</headBob>
								<bodyFacing>3</bodyFacing>
								<headFacing>3</headFacing>

								<soundEffect>Slimy</soundEffect>
								<tickDuration>25</tickDuration>
								<bodyAngle>85.17255</bodyAngle>
								<headAngle>58.0615845</headAngle>
								<genitalAngle>0</genitalAngle>
								<bodyOffsetZ>0.03527552</bodyOffsetZ>
								<bodyOffsetX>0.0471138731</bodyOffsetX>
								<headBob>0</headBob>
								<bodyFacing>3</bodyFacing>
								<headFacing>3</headFacing>

								<tickDuration>1</tickDuration>
								<bodyAngle>81.65927</bodyAngle>
								<headAngle>58.8843079</headAngle>
								<genitalAngle>0</genitalAngle>
								<bodyOffsetZ>0.03912908</bodyOffsetZ>
								<bodyOffsetX>0.08950315</bodyOffsetX>
								<headBob>0</headBob>
								<bodyFacing>3</bodyFacing>
								<headFacing>3</headFacing>

						</keyframes>

						<keyframes>

								<tickDuration>25</tickDuration>
								<positionX>-0.2899</positionX>
								<positionZ>-0.0282852575</positionZ>
								<rotation>98.13748</rotation>

								<tickDuration>20</tickDuration>
								<positionX>-0.178146541</positionX>
								<positionZ>-0.01672452</positionZ>
								<rotation>96.95889</rotation>

								<tickDuration>1</tickDuration>
								<positionX>-0.2899</positionX>
								<positionZ>-0.0282852575</positionZ>
								<rotation>98.13748</rotation>

						</keyframes>

				</animationClips>

				<stageName>VeryFastMasturbation</stageName>
				<isLooping>true</isLooping>
				<stageIndex>0</stageIndex>
				<playTimeTicks>225</playTimeTicks>
				<animationClips>

						<layer>LayingPawn</layer>
						<keyframes>

								<tickDuration>6</tickDuration>
								<bodyAngle>81.65927</bodyAngle>
								<headAngle>58.8843079</headAngle>
								<genitalAngle>0</genitalAngle>
								<bodyOffsetZ>0.03912908</bodyOffsetZ>
								<bodyOffsetX>0.08950315</bodyOffsetX>
								<headBob>0</headBob>
								<bodyFacing>3</bodyFacing>
								<headFacing>3</headFacing>

								<soundEffect>Slimy</soundEffect>
								<tickDuration>8</tickDuration>
								<bodyAngle>85.17255</bodyAngle>
								<headAngle>58.0615845</headAngle>
								<genitalAngle>0</genitalAngle>
								<bodyOffsetZ>0.03527552</bodyOffsetZ>
								<bodyOffsetX>0.0471138731</bodyOffsetX>
								<headBob>0</headBob>
								<bodyFacing>3</bodyFacing>
								<headFacing>3</headFacing>

								<tickDuration>1</tickDuration>
								<bodyAngle>81.65927</bodyAngle>
								<headAngle>58.8843079</headAngle>
								<genitalAngle>0</genitalAngle>
								<bodyOffsetZ>0.03912908</bodyOffsetZ>
								<bodyOffsetX>0.08950315</bodyOffsetX>
								<headBob>0</headBob>
								<bodyFacing>3</bodyFacing>
								<headFacing>3</headFacing>

						</keyframes>

						<keyframes>

								<tickDuration>6</tickDuration>
								<positionX>-0.2899</positionX>
								<positionZ>-0.0282852575</positionZ>
								<rotation>98.13748</rotation>

								<tickDuration>8</tickDuration>
								<positionX>-0.178146541</positionX>
								<positionZ>-0.01672452</positionZ>
								<rotation>96.95889</rotation>

								<tickDuration>1</tickDuration>
								<positionX>-0.2899</positionX>
								<positionZ>-0.0282852575</positionZ>
								<rotation>98.13748</rotation>

						</keyframes>

				</animationClips>

				<stageName>Orgasm</stageName>
				<isLooping>false</isLooping>
				<stageIndex>0</stageIndex>
				<animationClips>

						<layer>LayingPawn</layer>
						<keyframes>

								<soundEffect>Slimy</soundEffect>
								<tickDuration>6</tickDuration>
								<bodyAngle>81.65927</bodyAngle>
								<headAngle>58.8843079</headAngle>
								<genitalAngle>0</genitalAngle>
								<bodyOffsetZ>0.03912908</bodyOffsetZ>
								<bodyOffsetX>0.08950315</bodyOffsetX>
								<headBob>0</headBob>
								<bodyFacing>3</bodyFacing>
								<headFacing>3</headFacing>

								<quiver>True</quiver>
								<soundEffect>Cum</soundEffect>
								<tickDuration>80</tickDuration>
								<bodyAngle>85.17255</bodyAngle>
								<headAngle>58.0615845</headAngle>
								<genitalAngle>0</genitalAngle>
								<bodyOffsetZ>0.03527552</bodyOffsetZ>
								<bodyOffsetX>0.0471138731</bodyOffsetX>
								<headBob>0</headBob>
								<bodyFacing>3</bodyFacing>
								<headFacing>3</headFacing>

								<quiver>True</quiver>
								<soundEffect>Cum</soundEffect>
								<tickDuration>90</tickDuration>
								<bodyAngle>92.15109</bodyAngle>
								<headAngle>96.34238</headAngle>
								<genitalAngle>0</genitalAngle>
								<bodyOffsetZ>0.0237147212</bodyOffsetZ>
								<bodyOffsetX>0.0432603136</bodyOffsetX>
								<headBob>0</headBob>
								<bodyFacing>3</bodyFacing>
								<headFacing>3</headFacing>

								<quiver>True</quiver>
								<soundEffect>Cum</soundEffect>
								<tickDuration>70</tickDuration>
								<bodyAngle>92.15109</bodyAngle>
								<headAngle>96.34238</headAngle>
								<genitalAngle>0</genitalAngle>
								<bodyOffsetZ>0.0237147212</bodyOffsetZ>
								<bodyOffsetX>0.0432603136</bodyOffsetX>
								<headBob>0</headBob>
								<bodyFacing>3</bodyFacing>
								<headFacing>3</headFacing>

								<tickDuration>70</tickDuration>
								<bodyAngle>92.15109</bodyAngle>
								<headAngle>96.34238</headAngle>
								<genitalAngle>0</genitalAngle>
								<bodyOffsetZ>0.0237147212</bodyOffsetZ>
								<bodyOffsetX>0.0432603136</bodyOffsetX>
								<headBob>0</headBob>
								<bodyFacing>3</bodyFacing>
								<headFacing>3</headFacing>

								<tickDuration>1</tickDuration>
								<bodyAngle>81.65927</bodyAngle>
								<headAngle>58.8843079</headAngle>
								<genitalAngle>0</genitalAngle>
								<bodyOffsetZ>0.03912908</bodyOffsetZ>
								<bodyOffsetX>0.08950315</bodyOffsetX>
								<headBob>0</headBob>
								<bodyFacing>3</bodyFacing>
								<headFacing>3</headFacing>

						</keyframes>

						<keyframes>

								<tickDuration>6</tickDuration>
								<positionX>-0.2899</positionX>
								<positionZ>-0.0282852575</positionZ>
								<rotation>98.13748</rotation>

								<tickDuration>80</tickDuration>
								<positionX>-0.178146541</positionX>
								<positionZ>-0.01672452</positionZ>
								<rotation>96.95889</rotation>

								<tickDuration>90</tickDuration>
								<positionX>-0.178146541</positionX>
								<positionZ>-0.01672452</positionZ>
								<rotation>96.95889</rotation>

								<tickDuration>70</tickDuration>
								<positionX>-0.178146541</positionX>
								<positionZ>-0.01672452</positionZ>
								<rotation>96.95889</rotation>

								<tickDuration>70</tickDuration>
								<positionX>-0.178146541</positionX>
								<positionZ>-0.01672452</positionZ>
								<rotation>96.95889</rotation>

								<tickDuration>1</tickDuration>
								<positionX>-0.2899</positionX>
								<positionZ>-0.0282852575</positionZ>
								<rotation>98.13748</rotation>

						</keyframes>

				</animationClips>

		</animationStages>
	</Patch_SexToysMasturbation.SexToyAnimationDef>
</Defs>


code:
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProjectGuid>{87763712-0536-4D5F-9EAA-520F15D4F84E}</ProjectGuid>
    <OutputType>Library</OutputType>
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <RootNamespace>Patch_SexToysMasturbation</RootNamespace>
    <AssemblyName>Patch_SexToysMasturbation</AssemblyName>
    <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
    <FileAlignment>512</FileAlignment>
    <Deterministic>true</Deterministic>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>false</DebugSymbols>
    <DebugType>none</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>1.3\Assemblies\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
    <GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugType>pdbonly</DebugType>
    <Optimize>true</Optimize>
    <OutputPath>bin\Release\</OutputPath>
    <DefineConstants>TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="0Harmony">
      <HintPath>..\..\..\..\..\workshop\content\294100\1127530465\1.3\Assemblies\0Harmony.dll</HintPath>
      <Private>False</Private>
    </Reference>
    <Reference Include="Assembly-CSharp">
      <HintPath>..\..\..\RimWorldWin64_Data\Managed\Assembly-CSharp.dll</HintPath>
      <Private>False</Private>
    </Reference>
    <Reference Include="Rimworld-Animations, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>..\1.3\Assemblies\Rimworld-Animations.dll</HintPath>
      <Private>False</Private>
    </Reference>
    <Reference Include="RJW">
      <HintPath>..\..\rjw\1.3\Assemblies\RJW.dll</HintPath>
      <Private>False</Private>
    </Reference>
    <Reference Include="RJW-ToysAndMasturbation">
      <HintPath>..\..\rjw-toys-and-masturbation\Assemblies\RJW-ToysAndMasturbation.dll</HintPath>
      <Private>False</Private>
    </Reference>
    <Reference Include="System" />
    <Reference Include="System.Core" />
    <Reference Include="System.Xml.Linq" />
    <Reference Include="System.Data.DataSetExtensions" />
    <Reference Include="Microsoft.CSharp" />
    <Reference Include="System.Data" />
    <Reference Include="System.Net.Http" />
    <Reference Include="System.Xml" />
    <Reference Include="UnityEngine">
      <HintPath>..\..\..\RimWorldWin64_Data\Managed\UnityEngine.dll</HintPath>
      <Private>False</Private>
    </Reference>
    <Reference Include="UnityEngine.CoreModule">
      <HintPath>..\..\..\RimWorldWin64_Data\Managed\UnityEngine.CoreModule.dll</HintPath>
      <Private>False</Private>
    </Reference>
  </ItemGroup>
  <ItemGroup>
    <Compile Include="Properties\AssemblyInfo.cs" />
    <Compile Include="Source\Defs\SexToyAnimationDef.cs" />
    <Compile Include="Source\Patches\HarmonyPatch_JobDriver_SexBaseInitiator.cs" />
    <Compile Include="Source\Harmony\Harmony_PatchAll.cs" />
    <Compile Include="Source\Utilities\AnimSexToyUtility.cs" />
  </ItemGroup>
  <ItemGroup>
    <Folder Include="1.3\Assemblies\" />
  </ItemGroup>
  <ItemGroup>
    <Content Include="1.3\Defs\AnimationDefs\Animations_Dildo.xml" />
  </ItemGroup>
  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>


code:
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Patch_SexToysMasturbation")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Patch_SexToysMasturbation")]
[assembly: AssemblyCopyright("Copyright ©  2022")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components.  If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("87763712-0536-4d5f-9eaa-520f15d4f84e")]

// Version information for an assembly consists of the following four values:
//
//      Major Version
//      Minor Version
//      Build Number
//      Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]


code:
using Rimworld_Animations;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Patch_SexToysMasturbation
{
    public class SexToyAnimationDef : AnimationDef
    {

        public String requiredBodyPart = null;

    }
}


code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Verse;
using HarmonyLib;
using System.Reflection;

namespace Patch_SexToysMasturbation
{

    [StaticConstructorOnStartup]
    public static class Harmony_PatchAll {

        static Harmony_PatchAll() {

            Harmony val = new Harmony("animtoyspatch");
            val.PatchAll(Assembly.GetExecutingAssembly());

        }
    }
}


code:
using HarmonyLib;
using Rimworld_Animations;
using rjw;
using RJW_ToysAndMasturbation;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Verse;

namespace Patch_SexToysMasturbation
{
    [HarmonyPatch(typeof(JobDriver_SexBaseInitiator), "Start")]
    public class HarmonyPatch_JobDriver_SexBaseInitiator
    {

        public static void Postfix(ref JobDriver_SexBaseInitiator __instance)
        {

            if(__instance is JobDriver_MasturbateWithToy masturbateJobDriver)
            {

                Log.Message("Rerolling animations...");
                Pawn pawn = masturbateJobDriver.pawn;
                Thing sexToy = masturbateJobDriver.dildo;

                RerollAnimationsForSexToy(pawn, sexToy, masturbateJobDriver.Bed);
            }

        }

        public static void RerollAnimationsForSexToy(Pawn pawn, Thing thing, Thing bed)
        {
            CompSexToy sextoy = thing.TryGetComp<CompSexToy>();

            SexToyAnimationDef anim = AnimSexToyUtility.tryFindAnimation(sextoy, pawn);

            if (anim != null)
            {
                Log.Message("Playing anim " + anim.defName);

                if(bed != null)
                {
                    pawn.TryGetComp<CompBodyAnimator>().setAnchor(bed);
                    thing.TryGetComp<CompThingAnimator>().setAnchor(bed);
                }
                else
                {
                    pawn.TryGetComp<CompBodyAnimator>().setAnchor(pawn.Position);
                    thing.TryGetComp<CompThingAnimator>().setAnchor(pawn.Position);
                }

                bool mirror = GenTicks.TicksGame % 2 == 0;

                pawn.TryGetComp<CompBodyAnimator>().StartAnimation(anim, new List<Pawn> { pawn }, 0, mirror);
                thing.TryGetComp<CompThingAnimator>().StartAnimation(anim, pawn, mirror);

                (pawn.jobs.curDriver as JobDriver_Sex).ticks_left = anim.animationTimeTicks;
                (pawn.jobs.curDriver as JobDriver_Sex).sex_ticks = anim.animationTimeTicks;
                (pawn.jobs.curDriver as JobDriver_Sex).duration = anim.animationTimeTicks;
            }
            else
            {
                Log.Message("No animation found");
            }

        }

    }

}


code:
using rjw;
using RJW_ToysAndMasturbation;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Verse;

namespace Patch_SexToysMasturbation
{
    public class AnimSexToyUtility
    {

        public static SexToyAnimationDef tryFindAnimation(CompSexToy sexToy, Pawn pawn)
        {

            IEnumerable<SexToyAnimationDef> options = DefDatabase<SexToyAnimationDef>.AllDefs.Where((SexToyAnimationDef x) =>
            {

                if(!sexToy.Props.requiredBodyParts.Contains(x.requiredBodyPart))
                {
                    return false;
                }

                if(x.requiredBodyPart == "vagina" && !Genital_Helper.has_vagina(pawn))
                {
                    return false;
                }

                return true;

            });

            if(options != null && options.Any())
            {
                return options.RandomElement();
            }
            else
            {
                return null;
            }

        }

    }
}


code:
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Rimworld-Animations")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Rimworld-Animations")]
[assembly: AssemblyCopyright("Copyright ©  2020")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components.  If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("71b05d71-67b2-4014-82cd-18c20ac0882f")]

// Version information for an assembly consists of the following four values:
//
//      Major Version
//      Minor Version
//      Build Number
//      Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]


code:
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProjectGuid>{71B05D71-67B2-4014-82CD-18C20AC0882F}</ProjectGuid>
    <OutputType>Library</OutputType>
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <RootNamespace>Rimworld_Animations</RootNamespace>
    <AssemblyName>Rimworld-Animations</AssemblyName>
    <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
    <FileAlignment>512</FileAlignment>
    <Deterministic>true</Deterministic>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>false</DebugSymbols>
    <DebugType>none</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>1.3\Assemblies\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugType>none</DebugType>
    <Optimize>true</Optimize>
    <OutputPath>bin\Release\</OutputPath>
    <DefineConstants>TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="0Harmony">
      <HintPath>..\..\..\..\workshop\content\294100\2009463077\Current\Assemblies\0Harmony.dll</HintPath>
      <Private>False</Private>
    </Reference>
    <Reference Include="AlienRace">
      <HintPath>..\..\..\..\workshop\content\294100\839005762\1.3\Assemblies\AlienRace.dll</HintPath>
      <Private>False</Private>
    </Reference>
    <Reference Include="Assembly-CSharp">
      <HintPath>..\..\RimWorldWin64_Data\Managed\Assembly-CSharp.dll</HintPath>
      <Private>False</Private>
    </Reference>
    <Reference Include="RJW">
      <HintPath>..\rjw\1.3\Assemblies\RJW.dll</HintPath>
      <Private>False</Private>
    </Reference>
    <Reference Include="System" />
    <Reference Include="System.Core" />
    <Reference Include="System.Xml.Linq" />
    <Reference Include="System.Data.DataSetExtensions" />
    <Reference Include="Microsoft.CSharp" />
    <Reference Include="System.Data" />
    <Reference Include="System.Net.Http" />
    <Reference Include="System.Xml" />
    <Reference Include="UnityEngine">
      <HintPath>..\..\RimWorldWin64_Data\Managed\UnityEngine.dll</HintPath>
      <Private>False</Private>
    </Reference>
    <Reference Include="UnityEngine.CoreModule">
      <HintPath>..\..\RimWorldWin64_Data\Managed\UnityEngine.CoreModule.dll</HintPath>
      <Private>False</Private>
    </Reference>
  </ItemGroup>
  <ItemGroup>
    <Compile Include="1.3\Source\Patches\RimworldPatches\HarmonyPatch_Thing.cs" />
    <Compile Include="1.3\Source\Utilities\PatchOperationAddOrReplace.cs" />
    <Compile Include="Properties\AssemblyInfo.cs" />
    <Compile Include="1.3\Source\Actors\Actor.cs" />
    <Compile Include="1.3\Source\Actors\AlienRaceOffset.cs" />
    <Compile Include="1.3\Source\Actors\BodyTypeOffset.cs" />
    <Compile Include="1.3\Source\Animations\AnimationStage.cs" />
    <Compile Include="1.3\Source\Animations\Clips\BaseAnimationClip.cs" />
    <Compile Include="1.3\Source\Animations\Clips\PawnAnimationClip.cs" />
    <Compile Include="1.3\Source\Animations\Clips\ThingAnimationClip.cs" />
    <Compile Include="1.3\Source\Animations\Keyframes\Keyframe.cs" />
    <Compile Include="1.3\Source\Animations\Keyframes\PawnKeyframe.cs" />
    <Compile Include="1.3\Source\Animations\Keyframes\ThingKeyframe.cs" />
    <Compile Include="1.3\Source\Utilities\AnimationUtility.cs" />
    <Compile Include="1.3\Source\Comps\CompBodyAnimator.cs" />
    <Compile Include="1.3\Source\Comps\CompProperties_BodyAnimator.cs" />
    <Compile Include="1.3\Source\Comps\CompProperties_ThingAnimator.cs" />
    <Compile Include="1.3\Source\Comps\CompThingAnimator.cs" />
    <Compile Include="1.3\Source\Defs\AnimationDef.cs" />
    <Compile Include="1.3\Source\MainTabWindows\WorldComponent_UpdateMainTab.cs" />
    <Compile Include="1.3\Source\MainTabWindows\MainTabWindow_OffsetConfigure.cs" />
    <Compile Include="1.3\Source\MainTabWindows\OffsetMainButtonDefOf.cs" />
    <Compile Include="1.3\Source\Patches\OtherModPatches\HarmonyPatch_AlienRace.cs" />
    <Compile Include="1.3\Source\Patches\OtherModPatches\HarmonyPatch_CSL.cs" />
    <Compile Include="1.3\Source\Patches\OtherModPatches\HarmonyPatch_DontShaveYourHead.cs" />
    <Compile Include="1.3\Source\Patches\OtherModPatches\HarmonyPatch_FacialAnimation.cs" />
    <Compile Include="1.3\Source\Patches\OtherModPatches\HarmonyPatch_HatsDisplaySelection.cs" />
    <Compile Include="1.3\Source\Patches\OtherModPatches\HarmonyPatch_ShowHairWithHats.cs" />
    <Compile Include="1.3\Source\Patches\RimworldPatches\HarmonyPatch_HeadHair.cs" />
    <Compile Include="1.3\Source\Patches\RimworldPatches\HarmonyPatch_PawnRenderer.cs" />
    <Compile Include="1.3\Source\Patches\RimworldPatches\HarmonyPatch_PawnRotation.cs" />
    <Compile Include="1.3\Source\Patches\RimworldPatches\HarmonyPatch_Pawn_DrawTracker.cs" />
    <Compile Include="1.3\Source\Patches\RimworldPatches\HarmonyPatch_SetPawnAnimatable.cs" />
    <Compile Include="1.3\Source\Patches\Harmony_PatchAll.cs" />
    <Compile Include="1.3\Source\Patches\RJWPatches\JobDrivers\HarmonyPatch_JobDriver_JoinInBed.cs" />
    <Compile Include="1.3\Source\Patches\RJWPatches\JobDrivers\HarmonyPatch_JobDriver_SexBaseInitiator.cs" />
    <Compile Include="1.3\Source\Patches\RJWPatches\HarmonyPatch_PlaySexSounds.cs" />
    <Compile Include="1.3\Source\Patches\RJWPatches\HarmonyPatch_SexTick.cs" />
    <Compile Include="1.3\Source\Patches\RJWPatches\HarmonyPatch_WorkGiverSex.cs" />
    <Compile Include="1.3\Source\Patches\RJWPatches\JobDrivers\HarmonyPatch_JobDriver_SexBaseReceiverLoved.cs" />
    <Compile Include="1.3\Source\Settings\AnimationSettings.cs" />
  </ItemGroup>
  <ItemGroup>
    <Content Include="1.1\Assemblies\Rimworld-Animations.dll" />
    <Content Include="1.3\Assemblies\Rimworld-Animations.dll" />
    <Content Include="About\About.xml" />
    <Content Include="About\Manifest.xml" />
    <Content Include="1.3\Defs\AnimationDefs\Animations_Beast.xml" />
    <Content Include="1.3\Defs\AnimationDefs\Animations_Lesbian.xml" />
    <Content Include="1.3\Defs\AnimationDefs\Animations_Masturbate.xml" />
    <Content Include="1.3\Defs\AnimationDefs\Animations_Multi.xml" />
    <Content Include="1.3\Defs\AnimationDefs\Animations_vanilla.xml" />
    <Content Include="1.3\Defs\AnimationDefs\Animations_Vanilla2.xml" />
    <Content Include="1.3\Defs\MainTabDefs\MainButtonDef.xml" />
    <Content Include="1.3\Defs\SoundDefs\Sounds_Sex.xml" />
    <Content Include="Languages\PortugueseBrazilian\DefInjected\MainButtonDef\MainButtonDef.xml" />
    <Content Include="Languages\PortugueseBrazilian\DefInjected\Rimworld_Animations.AnimationDef\Animations_Beast.xml" />
    <Content Include="Languages\PortugueseBrazilian\DefInjected\Rimworld_Animations.AnimationDef\Animations_Lesbian.xml" />
    <Content Include="Languages\PortugueseBrazilian\DefInjected\Rimworld_Animations.AnimationDef\Animations_Multi.xml" />
    <Content Include="Languages\PortugueseBrazilian\DefInjected\Rimworld_Animations.AnimationDef\Animations_vanilla.xml" />
    <Content Include="LoadFolders.xml" />
  </ItemGroup>
  <ItemGroup>
    <Folder Include="1.2\" />
    <Folder Include="1.3\Defs\JobDefs\" />
    <Folder Include="1.3\Source\JobDrivers\" />
  </ItemGroup>
  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>


code:
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29905.134
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Rimworld-Animations", "Rimworld-Animations.csproj", "{71B05D71-67B2-4014-82CD-18C20AC0882F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Patch_HatsDisplaySelection", "Patch_HatsDisplaySelection\Patch_HatsDisplaySelection.csproj", "{BA766964-1716-422D-A09E-29426F8EB9D5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Patch_SexToysMasturbation", "Patch_SexToysMasturbation\Patch_SexToysMasturbation.csproj", "{87763712-0536-4D5F-9EAA-520F15D4F84E}"
EndProject
Global
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
		Debug|Any CPU = Debug|Any CPU
		Release|Any CPU = Release|Any CPU
	EndGlobalSection
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
		{71B05D71-67B2-4014-82CD-18C20AC0882F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{71B05D71-67B2-4014-82CD-18C20AC0882F}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{71B05D71-67B2-4014-82CD-18C20AC0882F}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{71B05D71-67B2-4014-82CD-18C20AC0882F}.Release|Any CPU.Build.0 = Release|Any CPU
		{BA766964-1716-422D-A09E-29426F8EB9D5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{BA766964-1716-422D-A09E-29426F8EB9D5}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{BA766964-1716-422D-A09E-29426F8EB9D5}.Release|Any CPU.Build.0 = Release|Any CPU
		{87763712-0536-4D5F-9EAA-520F15D4F84E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{87763712-0536-4D5F-9EAA-520F15D4F84E}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{87763712-0536-4D5F-9EAA-520F15D4F84E}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{87763712-0536-4D5F-9EAA-520F15D4F84E}.Release|Any CPU.Build.0 = Release|Any CPU
	EndGlobalSection
	GlobalSection(SolutionProperties) = preSolution
		HideSolutionNode = FALSE
	EndGlobalSection
	GlobalSection(ExtensibilityGlobals) = postSolution
		SolutionGuid = {7E01292A-D76F-4CA3-AA64-085B84ECD905}
	EndGlobalSection
EndGlobal


code:
# IDE, temp, generated, and other local-only files
.idea/
*.iml
node_modules/
tweego.exe
*.html

* Ignoring working folder for Quin2k
mod/

repo_name: Dualium/degrees

path: .gitignore


code:
<NotepadPlus>
	<UserLang name="Sugarcube4" ext="twee tw" udlVersion="2.1">
		<Settings>
			<Global caseIgnored="no" allowFoldOfComments="no" foldCompact="yes" forcePureLC="0" decimalSeparator="0" />
			<Prefix Keywords1="yes" Keywords2="no" Keywords3="no" Keywords4="no" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" />
		</Settings>
		<KeywordLists>
			<Keywords name="Comments">00 01 02 03/% 03/* 03<!-- 04%/ 04*/ 04--></Keywords>
			<Keywords name="Numbers, prefix1"></Keywords>
			<Keywords name="Numbers, prefix2"></Keywords>
			<Keywords name="Numbers, extras1"></Keywords>
			<Keywords name="Numbers, extras2"></Keywords>
			<Keywords name="Numbers, suffix1"></Keywords>
			<Keywords name="Numbers, suffix2"></Keywords>
			<Keywords name="Numbers, range"></Keywords>
			<Keywords name="Operators1">+ - * / = += -= *= /= ++ -- == != === !== > < >= <= ! && || & | ( )</Keywords>
			<Keywords name="Operators2"></Keywords>
			<Keywords name="Folders in code1, open"><<if</Keywords>
			<Keywords name="Folders in code1, middle"></Keywords>
			<Keywords name="Folders in code1, close"><</if>></Keywords>
			<Keywords name="Folders in code2, open"></Keywords>
			<Keywords name="Folders in code2, middle"></Keywords>
			<Keywords name="Folders in code2, close"></Keywords>
			<Keywords name="Folders in comment, open"></Keywords>
			<Keywords name="Folders in comment, middle"></Keywords>
			<Keywords name="Folders in comment, close"></Keywords>
			<Keywords name="Keywords1">$ _</Keywords>
			<Keywords name="Keywords2"></Keywords>
			<Keywords name="Keywords3"></Keywords>
			<Keywords name="Keywords4"></Keywords>
			<Keywords name="Keywords5"></Keywords>
			<Keywords name="Keywords6"></Keywords>
			<Keywords name="Keywords7"></Keywords>
			<Keywords name="Keywords8"></Keywords>
			<Keywords name="Delimiters">00:: 01 02((EOL)) 03<< 04 05>> 06[[ 07 08]] 09< 10 11> 12'' 13 14'' 15// 16 17// 18@@ 19 20@@ 21[img[ 22 23]]</Keywords>
		</KeywordLists>
		<Styles>
			<WordsStyle name="DEFAULT" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
			<WordsStyle name="COMMENTS" fgColor="808080" bgColor="FFFFFF" fontName="" fontStyle="2" nesting="0" />
			<WordsStyle name="LINE COMMENTS" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
			<WordsStyle name="NUMBERS" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
			<WordsStyle name="KEYWORDS1" fgColor="004080" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" />
			<WordsStyle name="KEYWORDS2" fgColor="8080C0" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
			<WordsStyle name="KEYWORDS3" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
			<WordsStyle name="KEYWORDS4" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
			<WordsStyle name="KEYWORDS5" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
			<WordsStyle name="KEYWORDS6" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
			<WordsStyle name="KEYWORDS7" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
			<WordsStyle name="KEYWORDS8" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
			<WordsStyle name="OPERATORS" fgColor="800040" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" />
			<WordsStyle name="FOLDER IN CODE1" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" />
			<WordsStyle name="FOLDER IN CODE2" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
			<WordsStyle name="FOLDER IN COMMENT" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
			<WordsStyle name="DELIMITERS1" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="5" fontSize="12" nesting="0" />
			<WordsStyle name="DELIMITERS2" fgColor="800080" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="50334724" />
			<WordsStyle name="DELIMITERS3" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="1024" />
			<WordsStyle name="DELIMITERS4" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
			<WordsStyle name="DELIMITERS5" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="32" />
			<WordsStyle name="DELIMITERS6" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="2" nesting="16" />
			<WordsStyle name="DELIMITERS7" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
			<WordsStyle name="DELIMITERS8" fgColor="8080FF" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" />
		</Styles>
	</UserLang>
</NotepadPlus>


code:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="48" height="48" version="1.1" inkscape:version="0.48.0 r9654">
  <defs id="defs4"/>
  <sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="11.313708" inkscape:cx="27.203376" inkscape:cy="26.578528" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="true" inkscape:window-width="1280" inkscape:window-height="968" inkscape:window-x="-4" inkscape:window-y="-4" inkscape:window-maximized="1">
	<inkscape:grid type="xygrid" id="grid2985" empspacing="5" visible="true" enabled="true" snapvisiblegridlinesonly="true"/>
  </sodipodi:namedview>
  <g inkscape:label="Layer 1" inkscape:groupmode="layer" id="layer1" transform="translate(0,-1004.3622)">
	<g id="g3000" transform="translate(-6,1003)">
	  <path sodipodi:nodetypes="ccccc" inkscape:connector-curvature="0" id="path2987" d="m 30,2.3621826 -20,10.0000004 20,10 20,-10 z" style="fill:#f9f9f9;stroke:none"/>
	  <path style="fill:#ececec;stroke:none" d="m 30,22.362183 0,25 20,-10 0,-25 z" id="path2989" inkscape:connector-curvature="0" sodipodi:nodetypes="ccccc"/>
	  <path sodipodi:nodetypes="ccccc" inkscape:connector-curvature="0" id="path2991" d="m 30,22.362183 0,25 -20,-10 0,-25 z" style="fill:#cccccc;stroke:none"/>
	  <path inkscape:connector-curvature="0" id="path2993" d="M 30,2.3749996 10,12.375 l 0,25 20,10 20,-10 0,-25 L 30,2.3749996 z" style="fill:none;stroke:#4d4d4d;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/>
	</g>
  </g>
  <metadata>
	<rdf:RDF>
	  <cc:Work>
		<dc:format>image/svg+xml</dc:format>
		<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
		<cc:license rdf:resource="http://creativecommons.org/licenses/publicdomain/"/>
		<dc:publisher>
		  <cc:Agent rdf:about="http://openclipart.org/">
			<dc:title>Open Clip Art Library</dc:title>
		  </cc:Agent>
		</dc:publisher>
		<dc:title>Sugar Cube icon</dc:title>
		<dc:date>2010-10-10T11:46:52</dc:date>
		<dc:description>A sugar cube.</dc:description>
		<dc:source>http://openclipart.org/detail/89407/sugar-cube-icon-by-jhnri4</dc:source>
		<dc:creator>
		  <cc:Agent>
			<dc:title>jhnri4</dc:title>
		  </cc:Agent>
		</dc:creator>
		<dc:subject>
		  <rdf:Bag>
			<rdf:li>SVG</rdf:li>
			<rdf:li>block</rdf:li>
			<rdf:li>clip art</rdf:li>
			<rdf:li>clipart</rdf:li>
			<rdf:li>cube</rdf:li>
			<rdf:li>icon</rdf:li>
			<rdf:li>sugar</rdf:li>
			<rdf:li>white</rdf:li>
		  </rdf:Bag>
		</dc:subject>
	  </cc:Work>
	  <cc:License rdf:about="http://creativecommons.org/licenses/publicdomain/">
		<cc:permits rdf:resource="http://creativecommons.org/ns#Reproduction"/>
		<cc:permits rdf:resource="http://creativecommons.org/ns#Distribution"/>
		<cc:permits rdf:resource="http://creativecommons.org/ns#DerivativeWorks"/>
	  </cc:License>
	</rdf:RDF>
  </metadata>
</svg>


code:
#!/bin/bash

if [ ! -f "$(command -v tweego)" ]; then
	echo "Cannot find tweego. Please install tweego before compiling."
	exit 1
fi

VERSION="$(git describe --tags --always --dirty)"

TWEEGO_PATH="./StoryFormats" tweego -o "Degrees of Lewdity $VERSION.html" game

path: compile


code:
@set TWEEGO_PATH=%cd%\StoryFormats
@tweego -o "Degrees of Lewdity VERSION.html" game


code:
function colourContainerClasses() {
	var V = State.variables;
	return 'hair-'  + (V.haircolour||'').replace(/ /g,'-') +
		' ' + 'eye-'   + (V.eyecolour||'').replace(/ /g,'-') +
		' ' + 'upper-' + (V.uppercolour||'').replace(/ /g,'-') +
		' ' + 'lower-' + (V.lowercolour||'').replace(/ /g,'-') +
		' ' + 'under-' + (V.undercolour||'').replace(/ /g,'-')
}
window.colourContainerClasses = colourContainerClasses; // export function


code:
:: Widgets Lower Clothing [widget]

<<widget "lowernaked">><<nobr>>
<<lowerstrip>>
<<if $lowertemp is "init">>
<<set $lowertemp to 1>>
<<elseif $lowertemp is 1>>
<<set $lowertemp to 0>>
<</if>>
<<set $lowerclothes to "naked">>
<<set $lowervariable to "naked">>
<<set $lowerintegrity to 0>>
<<set $lowerintegritymax to 0>>
<<set $lowerfabricstrength to 0>>
<<set $lowerreveal to 1000>>
<<set $lowerword to "n">>
<<set $loweronepiece to 0>>
<<set $lowerstate to 0>>
<<set $skirt to 0>>
<<set $skirtdown to 0>>
<<set $lowerstatebase to 0>>
<<set $lowervaginaexposed to 1>>
<<set $loweranusexposed to 1>>
<<set $lowerplural to 0>>
<<set $lowercolour to 0>>
<<set $lowerexposed to 2>>
<<set $lowerexposedbase to 2>>
<<set $lowervaginaexposedbase to 1>>
<<set $loweranusexposedbase to 1>>
<<set $lowertype to "naked">>
<<if $clothingchange isnot 1 and $ruined isnot 1>>
	<<if $upperset is $lowerset>>
	<<set $clothingchange to 1>><<uppernaked>>
	<</if>>
<</if>>
<<set $clothingchange to 0>>
<<set $lowerset to "lower">>
<<set $lowergender to "n">>
<</nobr>><</widget>>

<<widget "lowersundress">><<nobr>>
<<lowerstrip>><<lowerundress>>
<<set $lowerclothes to "sundress skirt">>
<<set $lowervariable to "lowersundress">>
<<set $lowersundressintegritymax to 100>>
<<set $lowerintegritymax to $lowersundressintegritymax>>
<<set $fabricstrength to 30>>
<<set $lowerreveal to 200>>
<<set $lowerword to "a">>
<<set $loweronepiece to 1>>
<<set $lowerstate to "waist">>
<<set $skirt to 1>>
<<set $skirtdown to 1>>
<<set $lowerstatebase to "waist">>
<<set $lowervaginaexposed to 0>>
<<set $loweranusexposed to 0>>
<<set $lowerplural to 0>>
<<if $lowersundressnew is 1>><<set $lowersundressnew to 0>><<set $lowersundressintegrity to $lowersundressintegritymax>>
<</if>>
<<set $lowercolour to $sundresscolour>>
<<set $lowerintegrity to $lowersundressintegrity>>
<<set $lowerexposed to 0>>
<<set $lowerexposedbase to 0>>
<<set $lowervaginaexposedbase to 0>>
<<set $loweranusexposedbase to 0>>
<<set $lowertype to "normal">>
<<if $clothingchange isnot 1>>
	<<if $upperset is $lowerset>>
	<<set $clothingchange to 1>><<upperstrip>><<upperundress>>
	<</if>>
<</if>>
<<set $clothingchange to 0>>
<<set $lowerset to "sundress">>
<<set $lowergender to "f">>
<</nobr>><</widget>>

<<widget "lowerpjs">><<nobr>>
<<lowerstrip>><<lowerundress>>
<<set $lowerclothes to "pyjama bottoms">>
<<set $lowervariable to "lowerpjs">>
<<set $lowerpjsintegritymax to 100>>
<<set $lowerintegritymax to $lowerpjsintegritymax>>
<<set $lowerfabricstrength to 20>>
<<set $lowerreveal to 100>>
<<set $lowerword to "n">>
<<set $loweronepiece to 0>>
<<set $lowerstate to "waist">>
<<set $skirt to 0>>
<<set $skirtdown to 0>>
<<set $lowerstatebase to "waist">>
<<set $lowervaginaexposed to 0>>
<<set $loweranusexposed to 0>>
<<set $lowerplural to 1>>
<<if $lowerpjsnew is 1>><<set $lowerpjsnew to 0>><<set $lowerpjsintegrity to $lowerpjsintegritymax>><<set $lowerpjscolour to either("blue", "white", "red", "green", "black", "pink", "purple", "tangerine", "yellow")>>
<<if $lowerpjscolourchoice isnot 0>>
<<set $lowerpjscolour to $lowerpjscolourchoice>>
<</if>>
<</if>>
<<set $lowercolour to $lowerpjscolour>>
<<set $lowerintegrity to $lowerpjsintegrity>>
<<set $lowerexposed to 0>>
<<set $lowerexposedbase to 0>>
<<set $lowervaginaexposedbase to 0>>
<<set $loweranusexposedbase to 0>>
<<set $lowertype to "sleep">>
<<if $clothingchange isnot 1>>
	<<if $upperset is $lowerset>>
	<<set $clothingchange to 1>><<upperstrip>><<upperundress>>
	<</if>>
<</if>>
<<set $clothingchange to 0>>
<<set $lowerset to "lower">>
<<set $lowergender to "n">>
<</nobr>><</widget>>

<<widget "lowertowel">><<nobr>>
<<lowerstrip>><<lowerundress>>
<<set $lowerclothes to "towel">>
<<set $lowervariable to "lowertowel">>
<<set $lowertowelintegritymax to 10>>
<<set $lowerintegritymax to $lowertowelintegritymax>>
<<set $lowerfabricstrength to 20>>
<<set $lowerreveal to 800>>
<<set $lowerword to "n">>
<<set $loweronepiece to 0>>
<<set $lowerstate to "waist">>
<<set $skirt to 1>>
<<set $skirtdown to 1>>
<<set $lowerstatebase to "waist">>
<<set $lowervaginaexposed to 0>>
<<set $loweranusexposed to 0>>
<<set $lowerplural to 0>>
<<if $lowertowelnew is 1>><<set $lowertowelnew to 0>><<set $lowertowelintegrity to $lowertowelintegritymax>><<set $lowertowelcolour to either("blue", "white", "red", "green", "black", "pink", "purple", "tangerine", "yellow")>>
<<if $lowertowelcolourchoice isnot 0>>
<<set $lowertowelcolour to $lowertowelcolourchoice>>
<<set $lowertowelcolourchoice to 0>>
<</if>>
<</if>>
<<set $lowercolour to $lowertowelcolour>>
<<set $lowerintegrity to $lowertowelintegrity>>
<<set $lowerexposed to 0>>
<<set $lowerexposedbase to 0>>
<<set $lowervaginaexposedbase to 0>>
<<set $loweranusexposedbase to 0>>
<<set $lowertype to "normal">>
<<if $clothingchange isnot 1>>
	<<if $upperset is $lowerset>>
	<<set $clothingchange to 1>><<upperstrip>><<upperundress>>
	<</if>>
<</if>>
<<set $clothingchange to 0>>
<<set $lowerset to "lower">>
<<set $lowergender to "n">>
<</nobr>><</widget>>

<<widget "lowerbikini">><<nobr>>
<<lowerstrip>><<lowerundress>>
<<set $lowerclothes to "bikini bottoms">>
<<set $lowervariable to "lowerbikini">>
<<set $lowerbikiniintegritymax to 20>>
<<set $lowerintegritymax to $lowerbikiniintegritymax>>
<<set $lowerfabricstrength to 20>>
<<set $lowerreveal to 900>>
<<set $lowerword to "n">>
<<set $loweronepiece to 0>>
<<set $lowerstate to "waist">>
<<set $skirt to 0>>
<<set $skirtdown to 0>>
<<set $lowerstatebase to "waist">>
<<set $lowervaginaexposed to 0>>
<<set $loweranusexposed to 0>>
<<set $lowerplural to 1>>
<<if $lowerbikininew is 1>><<set $lowerbikininew to 0>><<set $lowerbikiniintegrity to $lowerbikiniintegritymax>><<set $lowerbikinicolour to either("blue", "white", "red", "green", "black", "pink", "purple", "tangerine", "yellow")>>
<<if $lowerbikinicolourchoice isnot 0>>
<<set $lowerbikinicolour to $lowerbikinicolourchoice>>
<</if>>
<</if>>
<<set $lowercolour to $lowerbikinicolour>>
<<set $lowerintegrity to $lowerbikiniintegrity>>
<<set $lowerexposed to 1>>
<<set $lowerexposedbase to 1>>
<<set $lowervaginaexposedbase to 0>>
<<set $loweranusexposedbase to 0>>
<<set $lowertype to "swim">>
<<if $clothingchange isnot 1>>
	<<if $upperset is $lowerset>>
	<<set $clothingchange to 1>><<upperstrip>><<upperundress>>
	<</if>>
<</if>>
<<set $clothingchange to 0>>
<<set $lowerset to "lower">>
<<if $undertype isnot "chastity">>
<<underundress>>
<</if>>
<<set $lowergender to "f">>
<</nobr>><</widget>>

<<widget "waistapron">><<nobr>>
<<lowerstrip>><<lowerundress>>
<<set $lowerclothes to "waist apron">>
<<set $lowervariable to "waistapron">>
<<set $waistapronintegritymax to 10>>
<<set $lowerintegritymax to $waistapronintegritymax>>
<<set $lowerfabricstrength to 20>>
<<set $lowerreveal to 800>>
<<set $lowerword to "a">>
<<set $loweronepiece to 0>>
<<set $lowerstate to "waist">>
<<set $skirt to 1>>
<<set $skirtdown to 1>>
<<set $lowerstatebase to "waist">>
<<set $lowervaginaexposed to 1>>
<<set $loweranusexposed to 1>>
<<set $lowerplural to 0>>
<<if $waistapronnew is 1>><<set $waistapronnew to 0>><<set $waistapronintegrity to $waistapronintegritymax>><<set $waistaproncolour to either("blue", "white", "red", "green", "black", "pink", "purple", "tangerine", "yellow")>>
<<if $waistaproncolourchoice isnot 0>>
<<set $waistaproncolour to $waistaproncolourchoice>>
<</if>>
<</if>>
<<set $lowercolour to $waistaproncolour>>
<<set $lowerintegrity to $waistapronintegrity>>
<<set $lowerexposed to 1>>
<<set $lowerexposedbase to 1>>
<<set $lowervaginaexposedbase to 1>>
<<set $loweranusexposedbase to 1>>
<<set $lowertype to "normal">>
<<if $clothingchange isnot 1>>
	<<if $upperset is $lowerset>>
	<<set $clothingchange to 1>><<upperstrip>><<upperundress>>
	<</if>>
<</if>>
<<set $clothingchange to 0>>
<<set $lowerset to "lower">>
<<set $lowergender to "n">>
<</nobr>><</widget>>

<<widget "shorts">><<nobr>>
<<lowerstrip>><<lowerundress>>
<<set $lowerclothes to "shorts">>
<<set $lowervariable to "shorts">>
<<set $shortsintegritymax to 120>>
<<set $lowerintegritymax to $shortsintegritymax>>
<<set $lowerfabricstrength to 20>>
<<set $lowerreveal to 300>>
<<set $lowerword to "n">>
<<set $loweronepiece to 0>>
<<set $lowerstate to "waist">>
<<set $skirt to 0>>
<<set $skirtdown to 0>>
<<set $lowerstatebase to "waist">>
<<set $lowervaginaexposed to 0>>
<<set $loweranusexposed to 0>>
<<set $lowerplural to 1>>
<<if $shortsnew is 1>><<set $shortsnew to 0>><<set $shortsintegrity to $shortsintegritymax>><<set $shortscolour to either("blue", "white", "red", "green", "black", "pink", "purple", "tangerine", "yellow")>>
<<if $shortscolourchoice isnot 0>>
<<set $shortscolour to $shortscolourchoice>>
<</if>>
<</if>>
<<set $lowercolour to $shortscolour>>
<<set $lowerintegrity to $shortsintegrity>>
<<set $lowerexposed to 0>>
<<set $lowerexposedbase to 0>>
<<set $lowervaginaexposedbase to 0>>
<<set $loweranusexposedbase to 0>>
<<set $lowertype to "normal">>
<<if $clothingchange isnot 1>>
	<<if $upperset is $lowerset>>
	<<set $clothingchange to 1>><<upperstrip>><<upperundress>>
	<</if>>
<</if>>
<<set $clothingchange to 0>>
<<set $lowerset to "lower">>
<<set $lowergender to "n">>
<</nobr>><</widget>>

<<widget "schoolshorts">><<nobr>>
<<lowerstrip>><<lowerundress>>
<<set $lowerclothes to "school shorts">>
<<set $lowervariable to "schoolshorts">>
<<set $schoolshortsintegritymax to 160>>
<<set $lowerintegritymax to $schoolshortsintegritymax>>
<<set $lowerfabricstrength to 20>>
<<set $lowerreveal to 200>>
<<set $lowerword to "n">>
<<set $loweronepiece to 0>>
<<set $lowerstate to "waist">>
<<set $skirt to 0>>
<<set $skirtdown to 0>>
<<set $lowerstatebase to "waist">>
<<set $lowervaginaexposed to 0>>
<<set $loweranusexposed to 0>>
<<set $lowerplural to 1>>
<<if $schoolshortsnew is 1>><<set $schoolshortsnew to 0>><<set $schoolshortsintegrity to $schoolshortsintegritymax>><<set $schoolshortscolour to either("blue", "white", "red", "green", "black", "pink", "purple", "tangerine", "yellow")>>
<<if $schoolshortscolourchoice isnot 0>>
<<set $schoolshortscolour to $schoolshortscolourchoice>>
<</if>>
<</if>>
<<set $lowercolour to $schoolshortscolour>>
<<set $lowerintegrity to $schoolshortsintegrity>>
<<set $lowerexposed to 0>>
<<set $lowerexposedbase to 0>>
<<set $lowervaginaexposedbase to 0>>
<<set $loweranusexposedbase to 0>>
<<set $lowertype to "school">>
<<if $clothingchange isnot 1>>
	<<if $upperset is $lowerset>>
	<<set $clothingchange to 1>><<upperstrip>><<upperundress>>
	<</if>>
<</if>>
<<set $clothingchange to 0>>
<<set $lowerset to "lower">>
<<set $lowergender to "m">>
<</nobr>><</widget>>

<<widget "schoolskirt">><<nobr>>
<<lowerstrip>><<lowerundress>>
<<set $lowerclothes to "school skirt">>
<<set $lowervariable to "schoolskirt">>
<<set $schoolskirtintegritymax to 160>>
<<set $lowerintegritymax to $schoolskirtintegritymax>>
<<set $lowerfabricstrength to 20>>
<<set $lowerreveal to 200>>
<<set $lowerword to "a">>
<<set $loweronepiece to 0>>
<<set $lowerstate to "waist">>
<<set $skirt to 1>>
<<set $skirtdown to 1>>
<<set $lowerstatebase to "waist">>
<<set $lowervaginaexposed to 0>>
<<set $loweranusexposed to 0>>
<<set $lowerplural to 0>>
<<if $schoolskirtnew is 1>><<set $schoolskirtnew to 0>><<set $schoolskirtintegrity to $schoolskirtintegritymax>><<set $schoolskirtcolour to either("blue", "white", "red", "green", "black", "pink", "purple", "tangerine", "yellow")>>
<<if $schoolskirtcolourchoice isnot 0>>
<<set $schoolskirtcolour to $schoolskirtcolourchoice>>
<</if>>
<</if>>
<<set $lowercolour to $schoolskirtcolour>>
<<set $lowerintegrity to $schoolskirtintegrity>>
<<set $lowerexposed to 0>>
<<set $lowerexposedbase to 0>>
<<set $lowervaginaexposedbase to 0>>
<<set $loweranusexposedbase to 0>>
<<set $lowertype to "school">>
<<if $clothingchange isnot 1>>
	<<if $upperset is $lowerset>>
	<<set $clothingchange to 1>><<upperstrip>><<upperundress>>
	<</if>>
<</if>>
<<set $clothingchange to 0>>
<<set $lowerset to "lower">>
<<set $lowergender to "f">>
<</nobr>><</widget>>

<<widget "lowerschoolswimsuit">><<nobr>>
<<lowerstrip>><<lowerundress>>
<<set $lowerclothes to "school swimsuit bottom">>
<<set $lowervariable to "lowerschoolswimsuit">>
<<set $lowerschoolswimsuitintegritymax to 40>>
<<set $lowerintegritymax to $lowerschoolswimsuitintegritymax>>
<<set $fabricstrength to 30>>
<<set $lowerreveal to 600>>
<<set $lowerword to "a">>
<<set $loweronepiece to 1>>
<<set $lowerstate to "waist">>
<<set $skirt to 0>>
<<set $skirtdown to 0>>
<<set $lowerstatebase to "waist">>
<<set $lowervaginaexposed to 0>>
<<set $loweranusexposed to 0>>
<<set $lowerplural to 0>>
<<if $lowerschoolswimsuitnew is 1>><<set $lowerschoolswimsuitnew to 0>><<set $lowerschoolswimsuitintegrity to $lowerschoolswimsuitintegritymax>>
<</if>>
<<set $lowercolour to $schoolswimsuitcolour>>
<<set $lowerintegrity to $lowerschoolswimsuitintegrity>>
<<set $lowerexposed to 1>>
<<set $lowerexposedbase to 1>>
<<set $lowervaginaexposedbase to 0>>
<<set $loweranusexposedbase to 0>>
<<set $lowertype to "swim">>
<<if $clothingchange isnot 1>>
	<<if $upperset is $lowerset>>
	<<set $clothingchange to 1>><<upperstrip>><<upperundress>>
	<</if>>
<</if>>
<<set $clothingchange to 0>>
<<set $lowerset to "school swimsuit">>
<<if $undertype isnot "chastity">>
<<underundress>>
<</if>>
<<set $lowergender to "f">>
<</nobr>><</widget>>

<<widget "schoolswimshorts">><<nobr>>
<<lowerstrip>><<lowerundress>>
<<set $lowerclothes to "school swim shorts">>
<<set $lowervariable to "schoolswimshorts">>
<<set $schoolswimshortsintegritymax to 40>>
<<set $lowerintegritymax to $schoolswimshortsintegritymax>>
<<set $lowerfabricstrength to 20>>
<<set $lowerreveal to 600>>
<<set $lowerword to "n">>
<<set $loweronepiece to 0>>
<<set $lowerstate to "waist">>
<<set $skirt to 0>>
<<set $skirtdown to 0>>
<<set $lowerstatebase to "waist">>
<<set $lowervaginaexposed to 0>>
<<set $loweranusexposed to 0>>
<<set $lowerplural to 1>>
<<if $schoolswimshortsnew is 1>><<set $schoolswimshortsnew to 0>><<set $schoolswimshortsintegrity to $schoolswimshortsintegritymax>><<set $schoolswimshortscolour to either("blue", "white", "red", "green", "black", "pink", "purple", "tangerine", "yellow")>>
<<if $schoolswimshortscolourchoice isnot 0>>
<<set $schoolswimshortscolour to $schoolswimshortscolourchoice>>
<</if>>
<</if>>
<<set $lowercolour to $schoolswimshortscolour>>
<<set $lowerintegrity to $schoolswimshortsintegrity>>
<<set $lowerexposed to 1>>
<<set $lowerexposedbase to 1>>
<<set $lowervaginaexposedbase to 0>>
<<set $loweranusexposedbase to 0>>
<<set $lowertype to "swim">>
<<if $clothingchange isnot 1>>
	<<if $upperset is $lowerset>>
	<<set $clothingchange to 1>><<upperstrip>><<upperundress>>
	<</if>>
<</if>>
<<set $clothingchange to 0>>
<<set $lowerset to "lower">>
<<if $undertype isnot "chastity">>
<<underundress>>
<</if>>
<<set $lowergender to "m">>
<</nobr>><</widget>>

<<widget "lowerplant">><<nobr>>
<<lowerstrip>><<lowerundress>>
<<set $lowerclothes to "plant skirt">>
<<set $lowervariable to "lowerplant">>
<<set $lowerplantintegritymax to 10>>
<<set $lowerintegritymax to $lowerplantintegritymax>>
<<set $lowerfabricstrength to 20>>
<<set $lowerreveal to 900>>
<<set $lowerword to "a">>
<<set $loweronepiece to 0>>
<<set $lowerstate to "waist">>
<<set $skirt to 1>>
<<set $skirtdown to 1>>
<<set $lowerstatebase to "waist">>
<<set $lowervaginaexposed to 1>>
<<set $loweranusexposed to 1>>
<<set $lowerplural to 0>>
<<if $lowerplantnew is 1>><<set $lowerplantnew to 0>><<set $lowerplantintegrity to $lowerplantintegritymax>><<set $lowerplantcolour to "green">>
<</if>>
<<set $lowercolour to $lowerplantcolour>>
<<set $lowerintegrity to $lowerplantintegrity>>
<<set $lowerexposed to 1>>
<<set $lowerexposedbase to 1>>
<<set $lowervaginaexposedbase to 1>>
<<set $loweranusexposedbase to 1>>
<<set $lowertype to "swim">>
<<if $clothingchange isnot 1>>
	<<if $upperset is $lowerset>>
	<<set $clothingchange to 1>><<upperstrip>><<upperundress>>
	<</if>>
<</if>>
<<set $clothingchange to 0>>
<<set $lowerset to "lower">>
<<if $undertype isnot "chastity">>
<<underundress>>
<</if>>
<<set $lowergender to "n">>
<</nobr>><</widget>>

<<widget "lowereveninggown">><<nobr>>
<<lowerstrip>><<lowerundress>>
<<set $lowerclothes to "evening gown skirt">>
<<set $lowervariable to "lowereveninggown">>
<<set $lowereveninggownintegritymax to 200>>
<<set $lowerintegritymax to $lowereveninggownintegritymax>>
<<set $fabricstrength to 30>>
<<set $lowerreveal to 200>>
<<set $lowerword to "a">>
<<set $loweronepiece to 1>>
<<set $lowerstate to "waist">>
<<set $skirt to 1>>
<<set $skirtdown to 1>>
<<set $lowerstatebase to "waist">>
<<set $lowervaginaexposed to 0>>
<<set $loweranusexposed to 0>>
<<set $lowerplural to 0>>
<<if $lowereveninggownnew is 1>><<set $lowereveninggownnew to 0>><<set $lowereveninggownintegrity to $lowereveninggownintegritymax>>
<</if>>
<<set $lowercolour to $eveninggowncolour>>
<<set $lowerintegrity to $lowereveninggownintegrity>>
<<set $lowerexposed to 0>>
<<set $lowerexposedbase to 0>>
<<set $lowervaginaexposedbase to 0>>
<<set $loweranusexposedbase to 0>>
<<set $lowertype to "normal">>
<<if $clothingchange isnot 1>>
	<<if $upperset is $lowerset>>
	<<set $clothingchange to 1>><<upperstrip>><<upperundress>>
	<</if>>
<</if>>
<<set $clothingchange to 0>>
<<set $lowerset to "evening gown">>
<<set $lowergender to "f">>
<</nobr>><</widget>>


code:
:: Widgets Under Clothing [widget]

<<widget "undernaked">><<nobr>>
	<<if $undertype isnot "chastity">>
<<understrip>>
<<if $undertemp is "init">>
<<set $undertemp to 1>>
<<elseif $undertemp is 1>>
<<set $undertemp to 0>>
<</if>>
<<set $underclothes to "naked">>
<<set $undervariable to "naked">>
<<set $underintegrity to 0>>
<<set $underintegritymax to 0>>
<<set $underfabricstrength to 0>>
<<set $underreveal to 1000>>
<<set $underword to "n">>
<<set $understate to 0>>
<<set $understatebase to 0>>
<<set $undervaginaexposed to 1>>
<<set $underanusexposed to 1>>
<<set $underplural to 0>>
<<set $undercolour to 0>>
<<set $underexposed to 1>>
<<set $underexposedbase to 1>>
<<set $undervaginaexposedbase to 1>>
<<set $underanusexposedbase to 1>>
<<set $undertype to "naked">>
<<set $undergender to "n">>
	<</if>>
<</nobr>><</widget>>

<<widget "plainpanties">><<nobr>>
	<<if $undertype isnot "chastity">>
<<understrip>><<underundress>>
<<set $underclothes to "plain panties">>
<<set $undervariable to "plainpanties">>
<<set $plainpantiesintegritymax to 100>>
<<set $underintegritymax to $plainpantiesintegritymax>>
<<set $underfabricstrength to 15>>
<<set $underreveal to 200>>
<<set $underword to "n">>
<<set $understate to "waist">>
<<set $understatebase to "waist">>
<<set $undervaginaexposed to 0>>
<<set $underanusexposed to 0>>
<<set $underplural to 1>>
<<if $plainpantiesnew is 1>><<set $plainpantiesnew to 0>><<set $plainpantiesintegrity to $plainpantiesintegritymax>><<set $plainpantiescolour to either("blue", "white", "red", "green", "black", "pink", "purple", "tangerine", "yellow")>>
<<if $plainpantiescolourchoice isnot 0>>
<<set $plainpantiescolour to $plainpantiescolourchoice>>
<</if>>
<</if>>
<<set $undercolour to $plainpantiescolour>>
<<set $underintegrity to $plainpantiesintegrity>>
<<set $underexposed to 0>>
<<set $underexposedbase to 0>>
<<set $undervaginaexposedbase to 0>>
<<set $underanusexposedbase to 0>>
<<set $undertype to "normal">>
<<if $lowertype is "swim">>
	<<if $upperset is $lowerset>>
	<<uppernaked>>
	<</if>>
<<lowerundress>>
<</if>>
<<set $undergender to "f">>
	<</if>>
<</nobr>><</widget>>

<<widget "lacepanties">><<nobr>>
	<<if $undertype isnot "chastity">>
<<understrip>><<underundress>>
<<set $underclothes to "lace panties">>
<<set $undervariable to "lacepanties">>
<<set $lacepantiesintegritymax to 60>>
<<set $underintegritymax to $lacepantiesintegritymax>>
<<set $underfabricstrength to 15>>
<<set $underreveal to 400>>
<<set $underword to "n">>
<<set $understate to "waist">>
<<set $understatebase to "waist">>
<<set $undervaginaexposed to 0>>
<<set $underanusexposed to 0>>
<<set $underplural to 1>>
<<if $lacepantiesnew is 1>><<set $lacepantiesnew to 0>><<set $lacepantiesintegrity to $lacepantiesintegritymax>><<set $lacepantiescolour to either("blue", "white", "red", "green", "black", "pink", "purple", "tangerine", "yellow")>>
<<if $lacepantiescolourchoice isnot 0>>
<<set $lacepantiescolour to $lacepantiescolourchoice>>
<</if>>
<</if>>
<<set $undercolour to $lacepantiescolour>>
<<set $underintegrity to $lacepantiesintegrity>>
<<set $underexposed to 0>>
<<set $underexposedbase to 0>>
<<set $undervaginaexposedbase to 0>>
<<set $underanusexposedbase to 0>>
<<set $undertype to "normal">>
<<if $lowertype is "swim">>
	<<if $upperset is $lowerset>>
	<<uppernaked>>
	<</if>>
<<lowerundress>>
<</if>>
<<set $undergender to "f">>
	<</if>>
<</nobr>><</widget>>

<<widget "yfronts">><<nobr>>
	<<if $undertype isnot "chastity">>
<<understrip>><<underundress>>
<<set $underclothes to "Y fronts">>
<<set $undervariable to "yfronts">>
<<set $yfrontsintegritymax to 100>>
<<set $underintegritymax to $yfrontsintegritymax>>
<<set $underfabricstrength to 15>>
<<set $underreveal to 200>>
<<set $underword to "n">>
<<set $understate to "waist">>
<<set $understatebase to "waist">>
<<set $undervaginaexposed to 0>>
<<set $underanusexposed to 0>>
<<set $underplural to 1>>
<<if $yfrontsnew is 1>><<set $yfrontsnew to 0>><<set $yfrontsintegrity to $yfrontsintegritymax>><<set $yfrontscolour to either("blue", "white", "red", "green", "black", "pink", "purple", "tangerine", "yellow")>>
<<if $yfrontscolourchoice isnot 0>>
<<set $yfrontscolour to $yfrontscolourchoice>>
<</if>>
<</if>>
<<set $undercolour to $yfrontscolour>>
<<set $underintegrity to $yfrontsintegrity>>
<<set $underexposed to 0>>
<<set $underexposedbase to 0>>
<<set $undervaginaexposedbase to 0>>
<<set $underanusexposedbase to 0>>
<<set $undertype to "normal">>
<<if $lowertype is "swim">>
	<<if $upperset is $lowerset>>
	<<uppernaked>>
	<</if>>
<<lowerundress>>
<</if>>
<<set $undergender to "m">>
	<</if>>
<</nobr>><</widget>>

<<widget "chastitybelt">><<nobr>>
	<<if $undertype isnot "chastity">>
<<understrip>><<underundress>>
<<set $underclothes to "chastity belt">>
<<set $undervariable to "chastitybelt">>
<<set $chastitybeltintegritymax to 2000>>
<<set $underintegritymax to $chastitybeltintegritymax>>
<<set $underfabricstrength to 15>>
<<set $underreveal to 1000>>
<<set $underword to "a">>
<<set $understate to "chastity">>
<<set $understatebase to "chastity">>
<<set $undervaginaexposed to 0>>
<<set $undervaginaexposedbase to 0>>
<<if $analshield is 1>>
<<set $underanusexposed to 0>>
<<set $underanusexposedbase to 0>>
<<else>>
<<set $underanusexposed to 1>>
<<set $underanusexposedbase to 1>>
<</if>>
<<set $underplural to 0>>
<<if $chastitybeltnew is 1>><<set $chastitybeltnew to 0>><<set $chastitybeltintegrity to $chastitybeltintegritymax>>
<</if>>
<<set $undercolour to "restrictive">>
<<set $underintegrity to $chastitybeltintegrity>>
<<set $underexposed to 1>>
<<set $underexposedbase to 1>>
<<set $undertype to "chastity">>
<<set $undergender to "n">>
	<</if>>
<</nobr>><</widget>>

<<widget "tights">><<nobr>>
	<<if $undertype isnot "chastity">>
<<understrip>><<underundress>>
<<set $underclothes to "tights">>
<<set $undervariable to "tights">>
<<set $tightsintegritymax to 120>>
<<set $underintegritymax to $tightsintegritymax>>
<<set $underfabricstrength to 5>>
<<set $underreveal to 800>>
<<set $underword to "n">>
<<set $understate to "waist">>
<<set $understatebase to "waist">>
<<set $undervaginaexposed to 0>>
<<set $underanusexposed to 0>>
<<set $underplural to 1>>
<<if $tightsnew is 1>><<set $tightsnew to 0>><<set $tightsintegrity to $tightsintegritymax>><<set $tightscolour to "sheer">>
<<if $tightscolourchoice isnot 0>>
<<set $tightscolour to $tightscolourchoice>>
<</if>>
<</if>>
<<set $undercolour to $tightscolour>>
<<set $underintegrity to $tightsintegrity>>
<<set $underexposed to 1>>
<<set $underexposedbase to 1>>
<<set $undervaginaexposedbase to 0>>
<<set $underanusexposedbase to 0>>
<<set $undertype to "normal">>
<<if $lowertype is "swim">>
	<<if $upperset is $lowerset>>
	<<uppernaked>>
	<</if>>
<<lowerundress>>
<</if>>
<<set $undergender to "f">>
	<</if>>
<</nobr>><</widget>>