mirror of
				https://gitgud.io/AbstractConcept/overt-underwear.git
				synced 2024-08-15 03:19:13 +00:00 
			
		
		
		
	v1.0.0
This commit is contained in:
		
						commit
						545cb16d50
					
				
					 30 changed files with 491 additions and 0 deletions
				
			
		
							
								
								
									
										
											BIN
										
									
								
								1.4/Assemblies/Overt-Underwear.dll
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								1.4/Assemblies/Overt-Underwear.dll
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										34
									
								
								About/About.xml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										34
									
								
								About/About.xml
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,34 @@
 | 
			
		|||
<?xml version="1.0" encoding="utf-8"?>
 | 
			
		||||
 | 
			
		||||
<ModMetaData>
 | 
			
		||||
	<name>Overt Underwear</name>
 | 
			
		||||
	<author>AbstractConcept</author>
 | 
			
		||||
	<supportedVersions>
 | 
			
		||||
		<li>1.4</li>
 | 
			
		||||
	</supportedVersions>
 | 
			
		||||
	<packageId>abscon.overt.underwear</packageId>
 | 
			
		||||
	<modDependencies>
 | 
			
		||||
		<li>
 | 
			
		||||
			<packageId>brrainz.harmony</packageId>
 | 
			
		||||
			<displayName>Harmony</displayName>
 | 
			
		||||
			<steamWorkshopUrl>steam://url/CommunityFilePage/2009463077</steamWorkshopUrl>
 | 
			
		||||
			<downloadUrl>https://github.com/pardeike/HarmonyRimWorld/releases/latest</downloadUrl>
 | 
			
		||||
		</li>
 | 
			
		||||
		<li>
 | 
			
		||||
			<packageId>rim.job.world</packageId>
 | 
			
		||||
			<displayName>RimJobWorld</displayName>
 | 
			
		||||
			<downloadUrl>https://www.loverslab.com/topic/110270-mod-rimjobworld/</downloadUrl>
 | 
			
		||||
		</li>	
 | 
			
		||||
	</modDependencies>
 | 
			
		||||
	<loadAfter>
 | 
			
		||||
		<li>UnlimitedHugs.HugsLib</li>
 | 
			
		||||
		<li>brrainz.harmony</li>
 | 
			
		||||
		<li>rim.job.world</li>	
 | 
			
		||||
	</loadAfter>
 | 
			
		||||
	<description>
 | 
			
		||||
This mod makes people a little more conscious about whether their underwear is showing. How people feel about their current state of dress can be modified using the Underwear precept included in this mod - exhibitionists do like to show off their underwear, however!
 | 
			
		||||
 | 
			
		||||
This mod does not add any new apparel. You will require either Underwhere mod and/or S16's extension mod to benefit from this mod - the the scantier underwear from these mods have also been modified so that they only cover / protect the genitals and chest instead of the legs and torso.
 | 
			
		||||
	</description>
 | 
			
		||||
</ModMetaData>
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										2
									
								
								About/Changelog_v1.0.0.txt
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								About/Changelog_v1.0.0.txt
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,2 @@
 | 
			
		|||
v1.0.0
 | 
			
		||||
- Initial release
 | 
			
		||||
							
								
								
									
										5
									
								
								About/Manifest.xml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								About/Manifest.xml
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,5 @@
 | 
			
		|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 | 
			
		||||
<Manifest>
 | 
			
		||||
	<version>1.0.0</version>
 | 
			
		||||
    <downloadUri>https://gitgud.io/AbstractConcept/overt-underwear</downloadUri>
 | 
			
		||||
</Manifest>
 | 
			
		||||
							
								
								
									
										45
									
								
								Defs/PreceptDefs/PreceptDef_Underwear.xml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										45
									
								
								Defs/PreceptDefs/PreceptDef_Underwear.xml
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,45 @@
 | 
			
		|||
<?xml version="1.0" encoding="utf-8" ?>
 | 
			
		||||
<Defs>
 | 
			
		||||
 | 
			
		||||
	<!-- Issues -->
 | 
			
		||||
	<IssueDef>
 | 
			
		||||
		<defName>Underwear</defName>
 | 
			
		||||
		<label>underwear</label>
 | 
			
		||||
		<iconPath>UI/Issues/Underwear</iconPath>
 | 
			
		||||
	</IssueDef>
 | 
			
		||||
 | 
			
		||||
	<!-- Precepts -->	
 | 
			
		||||
	<PreceptDef>
 | 
			
		||||
		<defName>Underwear_Disapproved</defName>
 | 
			
		||||
		<issue>Underwear</issue>
 | 
			
		||||
		<label>disapproved</label>
 | 
			
		||||
		<description>Underwear is horribly constricting and should not be worn if it can be avoided.</description>
 | 
			
		||||
		<impact>Low</impact>
 | 
			
		||||
		<displayOrderInIssue>30</displayOrderInIssue>
 | 
			
		||||
		<displayOrderInImpact>1000</displayOrderInImpact>
 | 
			
		||||
		<defaultSelectionWeight>5</defaultSelectionWeight>
 | 
			
		||||
	</PreceptDef>
 | 
			
		||||
	
 | 
			
		||||
	<PreceptDef>
 | 
			
		||||
		<defName>Underwear_MustBeConcealed</defName>
 | 
			
		||||
		<issue>Underwear</issue>
 | 
			
		||||
		<label>must be concealed</label>
 | 
			
		||||
		<description>Worn underwear should be hidden under other clothes.</description>
 | 
			
		||||
		<impact>Low</impact>
 | 
			
		||||
		<displayOrderInIssue>20</displayOrderInIssue>
 | 
			
		||||
		<displayOrderInImpact>1000</displayOrderInImpact>
 | 
			
		||||
		<defaultSelectionWeight>100</defaultSelectionWeight>
 | 
			
		||||
	</PreceptDef>
 | 
			
		||||
	
 | 
			
		||||
	<PreceptDef>
 | 
			
		||||
		<defName>Underwear_CanBeVisible</defName>
 | 
			
		||||
		<issue>Underwear</issue>
 | 
			
		||||
		<label>can be visible</label>
 | 
			
		||||
		<description>Having underwear visible to others is not a concern.</description>
 | 
			
		||||
		<impact>Low</impact>
 | 
			
		||||
		<displayOrderInIssue>10</displayOrderInIssue>
 | 
			
		||||
		<displayOrderInImpact>1000</displayOrderInImpact>
 | 
			
		||||
		<defaultSelectionWeight>20</defaultSelectionWeight>
 | 
			
		||||
	</PreceptDef>
 | 
			
		||||
 | 
			
		||||
</Defs>
 | 
			
		||||
							
								
								
									
										32
									
								
								Defs/ThoughtDefs/ThoughtDefsUnderwear.xml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										32
									
								
								Defs/ThoughtDefs/ThoughtDefsUnderwear.xml
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,32 @@
 | 
			
		|||
<?xml version="1.0" encoding="utf-8" ?>
 | 
			
		||||
<Defs>
 | 
			
		||||
 | 
			
		||||
  <ThoughtDef>
 | 
			
		||||
    <defName>UnderwearThoughts</defName>
 | 
			
		||||
    <workerClass>Overt_Underwear.ThoughtWorker_Underwear</workerClass>
 | 
			
		||||
    <validWhileDespawned>true</validWhileDespawned>
 | 
			
		||||
    <stages>
 | 
			
		||||
      <li>
 | 
			
		||||
        <label>forced to wear underwear</label>
 | 
			
		||||
        <description>Urgh, it's so uncomfortable!</description>
 | 
			
		||||
        <baseMoodEffect>-3</baseMoodEffect>
 | 
			
		||||
      </li>
 | 
			
		||||
	  <li>
 | 
			
		||||
        <label>exposed underwear</label>
 | 
			
		||||
        <description>People can see my underwear, it's embarassing!</description>
 | 
			
		||||
        <baseMoodEffect>-2</baseMoodEffect>
 | 
			
		||||
      </li>
 | 
			
		||||
	  <li>
 | 
			
		||||
        <label>visible underwear</label>
 | 
			
		||||
        <description>So what if my underwear is showing? People need to grow up.</description>
 | 
			
		||||
        <baseMoodEffect>0</baseMoodEffect>
 | 
			
		||||
      </li>
 | 
			
		||||
	  <li>
 | 
			
		||||
        <label>faunting underwear</label>
 | 
			
		||||
        <description>My underwear is on display... How risque!</description>
 | 
			
		||||
        <baseMoodEffect>1</baseMoodEffect>
 | 
			
		||||
      </li>
 | 
			
		||||
    </stages>
 | 
			
		||||
  </ThoughtDef>
 | 
			
		||||
  
 | 
			
		||||
</Defs>
 | 
			
		||||
							
								
								
									
										32
									
								
								Patches/UnderWhereBodyPartGroups.xml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										32
									
								
								Patches/UnderWhereBodyPartGroups.xml
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,32 @@
 | 
			
		|||
<?xml version="1.0" encoding="utf-8" ?>
 | 
			
		||||
<Patch>
 | 
			
		||||
	<Operation Class="PatchOperationFindMod">
 | 
			
		||||
		<mods>
 | 
			
		||||
			<li>UnderWhere</li>
 | 
			
		||||
		</mods>
 | 
			
		||||
		<match Class="PatchOperationSequence">
 | 
			
		||||
			<success>Normal</success>
 | 
			
		||||
			<operations>
 | 
			
		||||
 | 
			
		||||
				<li Class="PatchOperationReplace">
 | 
			
		||||
					<xpath>Defs/ThingDef/apparel[layers/li="Underwear" and not(layers/li="UnderwearTop")]/bodyPartGroups</xpath>
 | 
			
		||||
					<value>
 | 
			
		||||
						<bodyPartGroups>
 | 
			
		||||
							<li>GenitalsBPG</li>
 | 
			
		||||
						</bodyPartGroups>
 | 
			
		||||
					</value>
 | 
			
		||||
				</li>
 | 
			
		||||
				
 | 
			
		||||
				<li Class="PatchOperationReplace">
 | 
			
		||||
					<xpath>Defs/ThingDef/apparel[layers/li="UnderwearTop" and not(layers/li="Underwear")]/bodyPartGroups</xpath>
 | 
			
		||||
					<value>
 | 
			
		||||
						<bodyPartGroups>
 | 
			
		||||
							<li>ChestBPG</li>
 | 
			
		||||
						</bodyPartGroups>
 | 
			
		||||
					</value>
 | 
			
		||||
				</li>
 | 
			
		||||
 | 
			
		||||
			</operations>
 | 
			
		||||
		</match>	
 | 
			
		||||
	</Operation>
 | 
			
		||||
</Patch>
 | 
			
		||||
							
								
								
									
										23
									
								
								Patches/s16ClothingBodyPartGroups.xml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								Patches/s16ClothingBodyPartGroups.xml
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,23 @@
 | 
			
		|||
<?xml version="1.0" encoding="utf-8" ?>
 | 
			
		||||
<Patch>
 | 
			
		||||
	<Operation Class="PatchOperationFindMod">
 | 
			
		||||
		<mods>
 | 
			
		||||
			<li>S16's Extension</li>
 | 
			
		||||
		</mods>
 | 
			
		||||
		<match Class="PatchOperationSequence">
 | 
			
		||||
			<success>Always</success>
 | 
			
		||||
			<operations>
 | 
			
		||||
 | 
			
		||||
				<li Class="PatchOperationReplace">
 | 
			
		||||
					<xpath>Defs/ThingDef/thingCategories[li="S16_Underwear"]/../apparel/bodyPartGroups</xpath>
 | 
			
		||||
					<value>
 | 
			
		||||
						<bodyPartGroups>
 | 
			
		||||
							<li>GenitalsBPG</li>
 | 
			
		||||
						</bodyPartGroups>
 | 
			
		||||
					</value>
 | 
			
		||||
				</li>
 | 
			
		||||
				
 | 
			
		||||
			</operations>
 | 
			
		||||
		</match>	
 | 
			
		||||
	</Operation>
 | 
			
		||||
</Patch>
 | 
			
		||||
							
								
								
									
										
											BIN
										
									
								
								Source/.vs/SourceCode/v16/.suo
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Source/.vs/SourceCode/v16/.suo
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										21
									
								
								Source/Scripts/Patches/HarmonyPatch_PatchAll.cs
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								Source/Scripts/Patches/HarmonyPatch_PatchAll.cs
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,21 @@
 | 
			
		|||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Linq;
 | 
			
		||||
using System.Text;
 | 
			
		||||
using System.Threading.Tasks;
 | 
			
		||||
using Verse;
 | 
			
		||||
using HarmonyLib;
 | 
			
		||||
using System.Reflection;
 | 
			
		||||
 | 
			
		||||
namespace Overt_Underwear
 | 
			
		||||
{
 | 
			
		||||
    [StaticConstructorOnStartup]
 | 
			
		||||
    public static class Harmony_PatchAll
 | 
			
		||||
    {
 | 
			
		||||
        static Harmony_PatchAll()
 | 
			
		||||
        {
 | 
			
		||||
            Harmony harmony = new Harmony("Overt_Underwear");
 | 
			
		||||
            harmony.PatchAll(Assembly.GetExecutingAssembly());
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										101
									
								
								Source/Scripts/Patches/HarmonyPatch_ThoughtWorkers.cs
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										101
									
								
								Source/Scripts/Patches/HarmonyPatch_ThoughtWorkers.cs
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,101 @@
 | 
			
		|||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Linq;
 | 
			
		||||
using RimWorld;
 | 
			
		||||
using Verse;
 | 
			
		||||
using HarmonyLib;
 | 
			
		||||
 | 
			
		||||
namespace Overt_Underwear
 | 
			
		||||
{	
 | 
			
		||||
	[HarmonyPatch(typeof(ThoughtWorker_Precept_GroinChestHairOrFaceUncovered), "HasUncoveredGroinChestHairOrFace")]
 | 
			
		||||
	public static class HarmonyPatch_ThoughtWorker_Precept_GroinChestHairOrFaceUncovered
 | 
			
		||||
	{
 | 
			
		||||
		public static void Postfix(ref bool __result, Pawn p)
 | 
			
		||||
		{
 | 
			
		||||
			if (__result == false) return;
 | 
			
		||||
 | 
			
		||||
			Pawn pawn = p;
 | 
			
		||||
 | 
			
		||||
			if (pawn?.apparel == null)
 | 
			
		||||
			{ __result = false; return; }
 | 
			
		||||
 | 
			
		||||
			if (pawn.apparel.WornApparel.NullOrEmpty())
 | 
			
		||||
			{ __result = true; return; }
 | 
			
		||||
 | 
			
		||||
			bool fullHeadCovered = pawn.apparel.WornApparel.Any(x => x.def.apparel.bodyPartGroups.Contains(BodyPartGroupDefOf.FullHead));
 | 
			
		||||
			bool groinCovered = pawn.apparel.WornApparel.Any(x => x.def.apparel.bodyPartGroups.Contains(BodyPartGroupDefOf.Legs) || x.def.apparel.bodyPartGroups.Contains(ModBodyPartGroupDefOf.GenitalsBPG));
 | 
			
		||||
			bool chestCovered = pawn.apparel.WornApparel.Any(x => x.def.apparel.bodyPartGroups.Contains(BodyPartGroupDefOf.Torso) || x.def.apparel.bodyPartGroups.Contains(ModBodyPartGroupDefOf.ChestBPG));
 | 
			
		||||
			bool faceCovered = fullHeadCovered || pawn.apparel.WornApparel.Any(x => x.def.apparel.bodyPartGroups.Contains(BodyPartGroupDefOf.Eyes));
 | 
			
		||||
			bool hairCovered = fullHeadCovered || pawn.apparel.WornApparel.Any(x => x.def.apparel.bodyPartGroups.Contains(BodyPartGroupDefOf.UpperHead));
 | 
			
		||||
 | 
			
		||||
			__result = !(groinCovered && chestCovered && faceCovered && hairCovered);
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	[HarmonyPatch(typeof(ThoughtWorker_Precept_GroinChestOrHairUncovered), "HasUncoveredGroinChestOrHair")]
 | 
			
		||||
	public static class HarmonyPatch_ThoughtWorker_Precept_GroinChestOrHairUncovered
 | 
			
		||||
	{
 | 
			
		||||
		public static void Postfix(ref bool __result, Pawn p)
 | 
			
		||||
		{
 | 
			
		||||
			if (__result == false) return;
 | 
			
		||||
 | 
			
		||||
			Pawn pawn = p;
 | 
			
		||||
 | 
			
		||||
			if (pawn?.apparel == null)
 | 
			
		||||
			{ __result = false; return; }
 | 
			
		||||
 | 
			
		||||
			if (pawn.apparel.WornApparel.NullOrEmpty())
 | 
			
		||||
			{ __result = true; return; }
 | 
			
		||||
 | 
			
		||||
			bool fullHeadCovered = pawn.apparel.WornApparel.Any(x => x.def.apparel.bodyPartGroups.Contains(BodyPartGroupDefOf.FullHead));
 | 
			
		||||
			bool groinCovered = pawn.apparel.WornApparel.Any(x => x.def.apparel.bodyPartGroups.Contains(BodyPartGroupDefOf.Legs) || x.def.apparel.bodyPartGroups.Contains(ModBodyPartGroupDefOf.GenitalsBPG));
 | 
			
		||||
			bool chestCovered = pawn.apparel.WornApparel.Any(x => x.def.apparel.bodyPartGroups.Contains(BodyPartGroupDefOf.Torso) || x.def.apparel.bodyPartGroups.Contains(ModBodyPartGroupDefOf.ChestBPG));
 | 
			
		||||
			bool hairCovered = fullHeadCovered || pawn.apparel.WornApparel.Any(x => x.def.apparel.bodyPartGroups.Contains(BodyPartGroupDefOf.UpperHead));
 | 
			
		||||
 | 
			
		||||
			__result = !(groinCovered && chestCovered && hairCovered);
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	[HarmonyPatch(typeof(ThoughtWorker_Precept_GroinOrChestUncovered), "HasUncoveredGroinOrChest")]
 | 
			
		||||
	public static class HarmonyPatch_ThoughtWorker_Precept_HasUncoveredGroinOrChest
 | 
			
		||||
	{
 | 
			
		||||
		public static void Postfix(ref bool __result, Pawn p)
 | 
			
		||||
		{
 | 
			
		||||
			if (__result == false) return;
 | 
			
		||||
 | 
			
		||||
			Pawn pawn = p;
 | 
			
		||||
 | 
			
		||||
			if (pawn?.apparel == null)
 | 
			
		||||
			{ __result = false; return; }
 | 
			
		||||
 | 
			
		||||
			if (pawn.apparel.WornApparel.NullOrEmpty())
 | 
			
		||||
			{ __result = true; return; }
 | 
			
		||||
 | 
			
		||||
			bool groinCovered = pawn.apparel.WornApparel.Any(x => x.def.apparel.bodyPartGroups.Contains(BodyPartGroupDefOf.Legs) || x.def.apparel.bodyPartGroups.Contains(ModBodyPartGroupDefOf.GenitalsBPG));
 | 
			
		||||
			bool chestCovered = pawn.apparel.WornApparel.Any(x => x.def.apparel.bodyPartGroups.Contains(BodyPartGroupDefOf.Torso) || x.def.apparel.bodyPartGroups.Contains(ModBodyPartGroupDefOf.ChestBPG));
 | 
			
		||||
 | 
			
		||||
			__result = !(groinCovered && chestCovered);
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	[HarmonyPatch(typeof(ThoughtWorker_Precept_GroinUncovered), "HasUncoveredGroin")]
 | 
			
		||||
	public static class HarmonyPatch_ThoughtWorker_Precept_GroinUncovered
 | 
			
		||||
	{
 | 
			
		||||
		public static void Postfix(ref bool __result, Pawn p)
 | 
			
		||||
		{
 | 
			
		||||
			if (__result == false) return;
 | 
			
		||||
 | 
			
		||||
			Pawn pawn = p;
 | 
			
		||||
 | 
			
		||||
			if (pawn?.apparel == null)
 | 
			
		||||
			{ __result = false; return; }
 | 
			
		||||
 | 
			
		||||
			if (pawn.apparel.WornApparel.NullOrEmpty())
 | 
			
		||||
			{ __result = true; return; }
 | 
			
		||||
 | 
			
		||||
			bool groinCovered = pawn.apparel.WornApparel.Any(x => x.def.apparel.bodyPartGroups.Contains(BodyPartGroupDefOf.Legs) || x.def.apparel.bodyPartGroups.Contains(ModBodyPartGroupDefOf.GenitalsBPG));
 | 
			
		||||
 | 
			
		||||
			__result = !groinCovered;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										32
									
								
								Source/Scripts/ThoughtWorkers/ThoughtWorker_Underwear.cs
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										32
									
								
								Source/Scripts/ThoughtWorkers/ThoughtWorker_Underwear.cs
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,32 @@
 | 
			
		|||
using System;
 | 
			
		||||
using RimWorld;
 | 
			
		||||
using Verse;
 | 
			
		||||
using rjw;
 | 
			
		||||
 | 
			
		||||
namespace Overt_Underwear
 | 
			
		||||
{
 | 
			
		||||
	public class ThoughtWorker_Underwear : ThoughtWorker
 | 
			
		||||
	{
 | 
			
		||||
		public static ThoughtState CurrentThoughtState(Pawn pawn)
 | 
			
		||||
		{
 | 
			
		||||
			if (xxx.has_quirk(pawn, "Exhibitionist") || pawn?.ideo?.Ideo.HasPrecept(ModPreceptDefOf.Exhibitionism_Approved) == true) return ThoughtState.ActiveAtStage(3); // Joy
 | 
			
		||||
			if (pawn?.ideo?.Ideo.HasPrecept(ModPreceptDefOf.Underwear_CanBeVisible) == true) return ThoughtState.ActiveAtStage(2); // Indifference		
 | 
			
		||||
 | 
			
		||||
			return ThoughtState.ActiveAtStage(1); // Shame
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		protected override ThoughtState CurrentStateInternal(Pawn pawn)
 | 
			
		||||
		{
 | 
			
		||||
			if (pawn?.apparel?.WornApparel == null || pawn.apparel.WornApparel.NullOrEmpty()) return false;
 | 
			
		||||
 | 
			
		||||
			bool wearingUnderwear = pawn.apparel.WornApparel.Any(x => x.def.apparel.bodyPartGroups.Contains(ModBodyPartGroupDefOf.GenitalsBPG) && x.def.apparel.bodyPartGroups.Contains(BodyPartGroupDefOf.Legs) == false);
 | 
			
		||||
			bool wearingUnderwearTop = pawn.apparel.WornApparel.Any(x => x.def.apparel.bodyPartGroups.Contains(ModBodyPartGroupDefOf.ChestBPG) && x.def.apparel.bodyPartGroups.Contains(BodyPartGroupDefOf.Torso) == false);
 | 
			
		||||
 | 
			
		||||
			if (pawn?.ideo?.Ideo.HasPrecept(ModPreceptDefOf.Underwear_Disapproved) == true && (wearingUnderwear || wearingUnderwearTop)) return ThoughtState.ActiveAtStage(0);
 | 
			
		||||
			if (wearingUnderwear && pawn.apparel.WornApparel.Any(x => x.def.apparel.bodyPartGroups.Contains(BodyPartGroupDefOf.Legs)) == false) return CurrentThoughtState(pawn);
 | 
			
		||||
			if (wearingUnderwearTop && pawn.apparel.WornApparel.Any(x => x.def.apparel.bodyPartGroups.Contains(BodyPartGroupDefOf.Torso)) == false) return CurrentThoughtState(pawn); 
 | 
			
		||||
 | 
			
		||||
			return ThoughtState.Inactive;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										22
									
								
								Source/Scripts/Utilities/ModDefOf.cs
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								Source/Scripts/Utilities/ModDefOf.cs
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,22 @@
 | 
			
		|||
using Verse;
 | 
			
		||||
using RimWorld;
 | 
			
		||||
 | 
			
		||||
namespace Overt_Underwear
 | 
			
		||||
{
 | 
			
		||||
    [DefOf]
 | 
			
		||||
    public static class ModBodyPartGroupDefOf
 | 
			
		||||
    {
 | 
			
		||||
        public static BodyPartGroupDef GenitalsBPG;
 | 
			
		||||
        public static BodyPartGroupDef AnusBPG;
 | 
			
		||||
        public static BodyPartGroupDef ChestBPG;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    [DefOf]
 | 
			
		||||
    public static class ModPreceptDefOf
 | 
			
		||||
    {        
 | 
			
		||||
        public static PreceptDef Exhibitionism_Approved;
 | 
			
		||||
        public static PreceptDef Underwear_Disapproved;
 | 
			
		||||
        public static PreceptDef Underwear_MustBeConcealed;
 | 
			
		||||
        public static PreceptDef Underwear_CanBeVisible;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										76
									
								
								Source/SourceCode.csproj
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										76
									
								
								Source/SourceCode.csproj
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,76 @@
 | 
			
		|||
<?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>{AC00E678-E117-4BC2-8C3E-DA26509E2F6D}</ProjectGuid>
 | 
			
		||||
    <OutputType>Library</OutputType>
 | 
			
		||||
    <RootNamespace>Overt_Underwear</RootNamespace>
 | 
			
		||||
    <AssemblyName>Overt-Underwear</AssemblyName>
 | 
			
		||||
    <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
 | 
			
		||||
    <FileAlignment>512</FileAlignment>
 | 
			
		||||
    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
 | 
			
		||||
    <Deterministic>true</Deterministic>
 | 
			
		||||
  </PropertyGroup>
 | 
			
		||||
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
 | 
			
		||||
    <PlatformTarget>AnyCPU</PlatformTarget>
 | 
			
		||||
    <DebugSymbols>true</DebugSymbols>
 | 
			
		||||
    <DebugType>full</DebugType>
 | 
			
		||||
    <Optimize>false</Optimize>
 | 
			
		||||
    <OutputPath>..\1.4\Assemblies\</OutputPath>
 | 
			
		||||
    <DefineConstants>DEBUG;TRACE</DefineConstants>
 | 
			
		||||
    <ErrorReport>prompt</ErrorReport>
 | 
			
		||||
    <WarningLevel>4</WarningLevel>
 | 
			
		||||
  </PropertyGroup>
 | 
			
		||||
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
 | 
			
		||||
    <PlatformTarget>AnyCPU</PlatformTarget>
 | 
			
		||||
    <DebugType>pdbonly</DebugType>
 | 
			
		||||
    <Optimize>true</Optimize>
 | 
			
		||||
    <OutputPath>bin\Release\</OutputPath>
 | 
			
		||||
    <DefineConstants>TRACE</DefineConstants>
 | 
			
		||||
    <ErrorReport>prompt</ErrorReport>
 | 
			
		||||
    <WarningLevel>4</WarningLevel>
 | 
			
		||||
  </PropertyGroup>
 | 
			
		||||
  <PropertyGroup>
 | 
			
		||||
    <StartupObject />
 | 
			
		||||
  </PropertyGroup>
 | 
			
		||||
  <ItemGroup>
 | 
			
		||||
    <Compile Include="Scripts\Patches\HarmonyPatch_PatchAll.cs" />
 | 
			
		||||
    <Compile Include="Scripts\Patches\HarmonyPatch_ThoughtWorkers.cs" />
 | 
			
		||||
    <Compile Include="Scripts\ThoughtWorkers\ThoughtWorker_Underwear.cs" />
 | 
			
		||||
    <Compile Include="Scripts\Utilities\ModDefOf.cs" />
 | 
			
		||||
  </ItemGroup>
 | 
			
		||||
  <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.4\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="Rimworld-Animations">
 | 
			
		||||
      <HintPath>..\..\rimworld-animations-master\1.4\Assemblies\Rimworld-Animations.dll</HintPath>
 | 
			
		||||
      <Private>False</Private>
 | 
			
		||||
    </Reference>
 | 
			
		||||
    <Reference Include="RJW">
 | 
			
		||||
      <HintPath>..\..\RJW\1.4\Assemblies\RJW.dll</HintPath>
 | 
			
		||||
      <Private>False</Private>
 | 
			
		||||
    </Reference>
 | 
			
		||||
    <Reference Include="System" />
 | 
			
		||||
    <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>
 | 
			
		||||
  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
 | 
			
		||||
</Project>
 | 
			
		||||
							
								
								
									
										25
									
								
								Source/SourceCode.sln
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								Source/SourceCode.sln
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,25 @@
 | 
			
		|||
 | 
			
		||||
Microsoft Visual Studio Solution File, Format Version 12.00
 | 
			
		||||
# Visual Studio Version 16
 | 
			
		||||
VisualStudioVersion = 16.0.30011.22
 | 
			
		||||
MinimumVisualStudioVersion = 10.0.40219.1
 | 
			
		||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SourceCode", "SourceCode.csproj", "{AC00E678-E117-4BC2-8C3E-DA26509E2F6D}"
 | 
			
		||||
EndProject
 | 
			
		||||
Global
 | 
			
		||||
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 | 
			
		||||
		Debug|Any CPU = Debug|Any CPU
 | 
			
		||||
		Release|Any CPU = Release|Any CPU
 | 
			
		||||
	EndGlobalSection
 | 
			
		||||
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
 | 
			
		||||
		{AC00E678-E117-4BC2-8C3E-DA26509E2F6D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 | 
			
		||||
		{AC00E678-E117-4BC2-8C3E-DA26509E2F6D}.Debug|Any CPU.Build.0 = Debug|Any CPU
 | 
			
		||||
		{AC00E678-E117-4BC2-8C3E-DA26509E2F6D}.Release|Any CPU.ActiveCfg = Release|Any CPU
 | 
			
		||||
		{AC00E678-E117-4BC2-8C3E-DA26509E2F6D}.Release|Any CPU.Build.0 = Release|Any CPU
 | 
			
		||||
	EndGlobalSection
 | 
			
		||||
	GlobalSection(SolutionProperties) = preSolution
 | 
			
		||||
		HideSolutionNode = FALSE
 | 
			
		||||
	EndGlobalSection
 | 
			
		||||
	GlobalSection(ExtensibilityGlobals) = postSolution
 | 
			
		||||
		SolutionGuid = {F81BB2E3-A87F-4B5D-974E-E42884E9B8B6}
 | 
			
		||||
	EndGlobalSection
 | 
			
		||||
EndGlobal
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1 @@
 | 
			
		|||
6e370cfc279d578a4af85250025d7591e85c908b
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,12 @@
 | 
			
		|||
C:\Program Files (x86)\Steam\SteamApps\common\RimWorld\Mods\privacy-please-abscon\1.4\Assemblies\Privacy-Please.dll
 | 
			
		||||
C:\Program Files (x86)\Steam\SteamApps\common\RimWorld\Mods\privacy-please-abscon\1.4\Assemblies\Privacy-Please.pdb
 | 
			
		||||
C:\Program Files (x86)\Steam\SteamApps\common\RimWorld\Mods\privacy-please-abscon\Source\obj\Debug\AbsCon_PrivacyPlease.csprojAssemblyReference.cache
 | 
			
		||||
C:\Program Files (x86)\Steam\SteamApps\common\RimWorld\Mods\privacy-please-abscon\Source\obj\Debug\AbsCon_PrivacyPlease.csproj.CoreCompileInputs.cache
 | 
			
		||||
C:\Program Files (x86)\Steam\SteamApps\common\RimWorld\Mods\privacy-please-abscon\Source\obj\Debug\Privacy-Please.dll
 | 
			
		||||
C:\Program Files (x86)\Steam\SteamApps\common\RimWorld\Mods\privacy-please-abscon\Source\obj\Debug\Privacy-Please.pdb
 | 
			
		||||
C:\Program Files (x86)\Steam\SteamApps\common\RimWorld\Mods\privacy-please\Source\obj\Debug\AbsCon_PrivacyPlease.csprojAssemblyReference.cache
 | 
			
		||||
C:\Program Files (x86)\Steam\SteamApps\common\RimWorld\Mods\privacy-please\Source\obj\Debug\AbsCon_PrivacyPlease.csproj.CoreCompileInputs.cache
 | 
			
		||||
C:\Program Files (x86)\Steam\SteamApps\common\RimWorld\Mods\privacy-please\Source\obj\Debug\Privacy-Please.dll
 | 
			
		||||
C:\Program Files (x86)\Steam\SteamApps\common\RimWorld\Mods\privacy-please\Source\obj\Debug\Privacy-Please.pdb
 | 
			
		||||
C:\Program Files (x86)\Steam\SteamApps\common\RimWorld\Mods\privacy-please\1.4\Assemblies\Privacy-Please.dll
 | 
			
		||||
C:\Program Files (x86)\Steam\SteamApps\common\RimWorld\Mods\privacy-please\1.4\Assemblies\Privacy-Please.pdb
 | 
			
		||||
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								Source/obj/Debug/DesignTimeResolveAssemblyReferences.cache
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Source/obj/Debug/DesignTimeResolveAssemblyReferences.cache
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								Source/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Source/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								Source/obj/Debug/Overt-Underwear.dll
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Source/obj/Debug/Overt-Underwear.dll
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								Source/obj/Debug/Overt-Underwear.pdb
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Source/obj/Debug/Overt-Underwear.pdb
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
						 | 
				
			
			@ -0,0 +1 @@
 | 
			
		|||
8263062e6a99f43c12969425daafb3f9676b8c24
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,8 @@
 | 
			
		|||
C:\Program Files (x86)\Steam\SteamApps\common\RimWorld\Mods\privacy-please-abscon\Source\obj\Debug\Privacy-Please.csprojAssemblyReference.cache
 | 
			
		||||
C:\Program Files (x86)\Steam\SteamApps\common\RimWorld\Mods\privacy-please-abscon\Source\obj\Debug\Privacy-Please.csproj.CoreCompileInputs.cache
 | 
			
		||||
C:\Program Files (x86)\Steam\SteamApps\common\RimWorld\Mods\privacy-please-abscon\1.3\Assemblies\Privacy-Please.dll
 | 
			
		||||
C:\Program Files (x86)\Steam\SteamApps\common\RimWorld\Mods\privacy-please-abscon\1.3\Assemblies\Privacy-Please.pdb
 | 
			
		||||
C:\Program Files (x86)\Steam\SteamApps\common\RimWorld\Mods\privacy-please-abscon\Source\obj\Debug\Privacy-Please.dll
 | 
			
		||||
C:\Program Files (x86)\Steam\SteamApps\common\RimWorld\Mods\privacy-please-abscon\Source\obj\Debug\Privacy-Please.pdb
 | 
			
		||||
C:\Program Files (x86)\Steam\SteamApps\common\RimWorld\Mods\privacy-please-abscon\1.4\Assemblies\Privacy-Please.dll
 | 
			
		||||
C:\Program Files (x86)\Steam\SteamApps\common\RimWorld\Mods\privacy-please-abscon\1.4\Assemblies\Privacy-Please.pdb
 | 
			
		||||
							
								
								
									
										
											BIN
										
									
								
								Source/obj/Debug/Privacy-Please.csprojAssemblyReference.cache
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Source/obj/Debug/Privacy-Please.csprojAssemblyReference.cache
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								Source/obj/Debug/Source.csprojAssemblyReference.cache
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Source/obj/Debug/Source.csprojAssemblyReference.cache
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
						 | 
				
			
			@ -0,0 +1 @@
 | 
			
		|||
c76312a3c6f5397c7387ef63ef7fd9552414f409
 | 
			
		||||
							
								
								
									
										18
									
								
								Source/obj/Debug/SourceCode.csproj.FileListAbsolute.txt
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								Source/obj/Debug/SourceCode.csproj.FileListAbsolute.txt
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,18 @@
 | 
			
		|||
C:\Program Files (x86)\Steam\SteamApps\common\RimWorld\Mods\privacy-please\1.4\Assemblies\Privacy-Please.dll
 | 
			
		||||
C:\Program Files (x86)\Steam\SteamApps\common\RimWorld\Mods\privacy-please\1.4\Assemblies\Privacy-Please.pdb
 | 
			
		||||
C:\Program Files (x86)\Steam\SteamApps\common\RimWorld\Mods\privacy-please\Source\obj\Debug\SourceCode.csproj.CoreCompileInputs.cache
 | 
			
		||||
C:\Program Files (x86)\Steam\SteamApps\common\RimWorld\Mods\privacy-please\Source\obj\Debug\Privacy-Please.dll
 | 
			
		||||
C:\Program Files (x86)\Steam\SteamApps\common\RimWorld\Mods\privacy-please\Source\obj\Debug\Privacy-Please.pdb
 | 
			
		||||
C:\Program Files (x86)\Steam\SteamApps\common\RimWorld\Mods\privacy-please\Source\obj\Debug\SourceCode.csprojAssemblyReference.cache
 | 
			
		||||
C:\Program Files (x86)\Steam\SteamApps\common\RimWorld\Mods\exposed\Source\obj\Debug\SourceCode.csprojAssemblyReference.cache
 | 
			
		||||
C:\Program Files (x86)\Steam\SteamApps\common\RimWorld\Mods\exposed\Source\obj\Debug\SourceCode.csproj.CoreCompileInputs.cache
 | 
			
		||||
C:\Program Files (x86)\Steam\SteamApps\common\RimWorld\Mods\exposed\1.4\Assemblies\Overt-Underwear.dll
 | 
			
		||||
C:\Program Files (x86)\Steam\SteamApps\common\RimWorld\Mods\exposed\1.4\Assemblies\Overt-Underwear.pdb
 | 
			
		||||
C:\Program Files (x86)\Steam\SteamApps\common\RimWorld\Mods\exposed\Source\obj\Debug\Overt-Underwear.dll
 | 
			
		||||
C:\Program Files (x86)\Steam\SteamApps\common\RimWorld\Mods\exposed\Source\obj\Debug\Overt-Underwear.pdb
 | 
			
		||||
C:\Program Files (x86)\Steam\SteamApps\common\RimWorld\Mods\overt-underwear\1.4\Assemblies\Overt-Underwear.dll
 | 
			
		||||
C:\Program Files (x86)\Steam\SteamApps\common\RimWorld\Mods\overt-underwear\1.4\Assemblies\Overt-Underwear.pdb
 | 
			
		||||
C:\Program Files (x86)\Steam\SteamApps\common\RimWorld\Mods\overt-underwear\Source\obj\Debug\SourceCode.csprojAssemblyReference.cache
 | 
			
		||||
C:\Program Files (x86)\Steam\SteamApps\common\RimWorld\Mods\overt-underwear\Source\obj\Debug\SourceCode.csproj.CoreCompileInputs.cache
 | 
			
		||||
C:\Program Files (x86)\Steam\SteamApps\common\RimWorld\Mods\overt-underwear\Source\obj\Debug\Overt-Underwear.dll
 | 
			
		||||
C:\Program Files (x86)\Steam\SteamApps\common\RimWorld\Mods\overt-underwear\Source\obj\Debug\Overt-Underwear.pdb
 | 
			
		||||
							
								
								
									
										
											BIN
										
									
								
								Source/obj/Debug/SourceCode.csprojAssemblyReference.cache
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Source/obj/Debug/SourceCode.csprojAssemblyReference.cache
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								Textures/UI/Issues/Underwear.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Textures/UI/Issues/Underwear.png
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 14 KiB  | 
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue