mirror of
				https://github.com/amevarashi/RJW-Sexperience.git
				synced 2024-08-14 23:54:08 +00:00 
			
		
		
		
	Merged Size Matters in
This commit is contained in:
		
						commit
						032619890d
					
				
					 7 changed files with 323 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -0,0 +1,31 @@
 | 
			
		|||
using RimWorld;
 | 
			
		||||
using rjw;
 | 
			
		||||
using Verse;
 | 
			
		||||
 | 
			
		||||
namespace RJWSexperience.Ideology
 | 
			
		||||
{
 | 
			
		||||
    public class ThoughtWorker_Precept_GenitalSize_Approved : ThoughtWorker_Precept
 | 
			
		||||
    {
 | 
			
		||||
        protected override ThoughtState ShouldHaveThought(Pawn p)
 | 
			
		||||
        {
 | 
			
		||||
            // We have 5 stages, which map directly to genitalia severity:
 | 
			
		||||
            // Micro(<0.2), Small(>0.2&&<0.4), Normal(>0.4&&<0.6), Big(>0.6&&<0.8), Huge(>0.8)
 | 
			
		||||
            if (p != null && Genital_Helper.get_AllPartsHediffList(p).Count > 0)
 | 
			
		||||
            {
 | 
			
		||||
                float best_size = IdeoUtility.getGenitalSize(p);
 | 
			
		||||
                if (best_size < 0.2f)
 | 
			
		||||
                    return ThoughtState.ActiveAtStage(0);
 | 
			
		||||
                else if (best_size < 0.4f)
 | 
			
		||||
                    return ThoughtState.ActiveAtStage(1);
 | 
			
		||||
                else if (best_size < 0.6f)
 | 
			
		||||
                    return ThoughtState.ActiveAtStage(2);
 | 
			
		||||
                else if (best_size < 0.8f)
 | 
			
		||||
                    return ThoughtState.ActiveAtStage(3);
 | 
			
		||||
                else if (best_size > 0.8f)
 | 
			
		||||
                    return ThoughtState.ActiveAtStage(4);
 | 
			
		||||
            }
 | 
			
		||||
            // This might can happen if the pawn has no genitalia ... maybe?
 | 
			
		||||
            return ThoughtState.Inactive;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,29 @@
 | 
			
		|||
using RimWorld;
 | 
			
		||||
using rjw;
 | 
			
		||||
using Verse;
 | 
			
		||||
 | 
			
		||||
namespace RJWSexperience.Ideology
 | 
			
		||||
{
 | 
			
		||||
    public class ThoughtWorker_Precept_GenitalSize_Approved_Social : ThoughtWorker_Precept_Social
 | 
			
		||||
    {
 | 
			
		||||
 | 
			
		||||
        // Important Note: For the Social Worker, we measure otherPawns genitalia 
 | 
			
		||||
        protected override ThoughtState ShouldHaveThought(Pawn p, Pawn otherPawn)
 | 
			
		||||
        {
 | 
			
		||||
            // We have 3 stages, which map directly to genitalia severity:
 | 
			
		||||
            // Unfavorable(<0.4), Normal(>0.4&&<0.6), Favorable(>0.6)
 | 
			
		||||
            if (otherPawn != null && Genital_Helper.get_AllPartsHediffList(otherPawn).Count > 0)
 | 
			
		||||
            {
 | 
			
		||||
                float best_size = IdeoUtility.getGenitalSize(otherPawn);
 | 
			
		||||
                if (best_size < 0.4f)
 | 
			
		||||
                    return ThoughtState.ActiveAtStage(0);
 | 
			
		||||
                else if (best_size < 0.6f)
 | 
			
		||||
                    return ThoughtState.ActiveAtStage(1);
 | 
			
		||||
                else if (best_size > 0.6f)
 | 
			
		||||
                    return ThoughtState.ActiveAtStage(2);
 | 
			
		||||
            }
 | 
			
		||||
            // This might can happen if the pawn has no genitalia ... maybe?
 | 
			
		||||
            return ThoughtState.Inactive;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,32 @@
 | 
			
		|||
using RimWorld;
 | 
			
		||||
using rjw;
 | 
			
		||||
using Verse;
 | 
			
		||||
 | 
			
		||||
namespace RJWSexperience.Ideology
 | 
			
		||||
{
 | 
			
		||||
    public class ThoughtWorker_Precept_GenitalSize_Disapproved : ThoughtWorker_Precept
 | 
			
		||||
    {
 | 
			
		||||
        protected override ThoughtState ShouldHaveThought(Pawn p)
 | 
			
		||||
        {
 | 
			
		||||
            // We have 5 stages, which map directly to genitalia severity:
 | 
			
		||||
            // Micro(<0.2), Small(>0.2&&<0.4), Normal(>0.4&&<0.6), Big(>0.6&&<0.8), Huge(>0.8)
 | 
			
		||||
            if (p != null && Genital_Helper.get_AllPartsHediffList(p).Count > 0)
 | 
			
		||||
            {
 | 
			
		||||
                float best_size = IdeoUtility.getGenitalSize(p);
 | 
			
		||||
                if (best_size < 0.2f)
 | 
			
		||||
                    return ThoughtState.ActiveAtStage(0);
 | 
			
		||||
                else if (best_size < 0.4f)
 | 
			
		||||
                    return ThoughtState.ActiveAtStage(1);
 | 
			
		||||
                else if (best_size < 0.6f)
 | 
			
		||||
                    return ThoughtState.ActiveAtStage(2);
 | 
			
		||||
                else if (best_size < 0.8f)
 | 
			
		||||
                    return ThoughtState.ActiveAtStage(3);
 | 
			
		||||
                else if (best_size > 0.8f)
 | 
			
		||||
                    return ThoughtState.ActiveAtStage(4);
 | 
			
		||||
            }
 | 
			
		||||
            // This might can happen if the pawn has no genitalia ... maybe?
 | 
			
		||||
            return ThoughtState.Inactive;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,28 @@
 | 
			
		|||
using RimWorld;
 | 
			
		||||
using rjw;
 | 
			
		||||
using Verse;
 | 
			
		||||
 | 
			
		||||
namespace RJWSexperience.Ideology
 | 
			
		||||
{
 | 
			
		||||
    public class ThoughtWorker_Precept_GenitalSize_Disapproved_Social : ThoughtWorker_Precept_Social
 | 
			
		||||
    {
 | 
			
		||||
            // Important Note: For the Social Worker, we measure otherPawns genitalia 
 | 
			
		||||
            protected override ThoughtState ShouldHaveThought(Pawn p, Pawn otherPawn)
 | 
			
		||||
            {
 | 
			
		||||
                // We have 3 stages, which map directly to genitalia severity:
 | 
			
		||||
                // Unfavorable(<0.4), Normal(>0.4&&<0.6), Favorable(>0.6)
 | 
			
		||||
                if (otherPawn != null && Genital_Helper.get_AllPartsHediffList(otherPawn).Count > 0)
 | 
			
		||||
                {
 | 
			
		||||
                    float best_size = IdeoUtility.getGenitalSize(otherPawn);
 | 
			
		||||
                    if (best_size < 0.4f)
 | 
			
		||||
                        return ThoughtState.ActiveAtStage(0);
 | 
			
		||||
                    else if (best_size < 0.6f)
 | 
			
		||||
                        return ThoughtState.ActiveAtStage(1);
 | 
			
		||||
                    else if (best_size > 0.6f)
 | 
			
		||||
                        return ThoughtState.ActiveAtStage(2);
 | 
			
		||||
                }
 | 
			
		||||
                // This might can happen if the pawn has no genitalia ... maybe?
 | 
			
		||||
                return ThoughtState.Inactive;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			@ -1,5 +1,9 @@
 | 
			
		|||
using RimWorld;
 | 
			
		||||
<<<<<<< HEAD
 | 
			
		||||
using System;
 | 
			
		||||
=======
 | 
			
		||||
using rjw;
 | 
			
		||||
>>>>>>> SizeMattersPrecept
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Linq;
 | 
			
		||||
using Verse;
 | 
			
		||||
| 
						 | 
				
			
			@ -68,4 +72,28 @@ namespace RJWSexperience.Ideology
 | 
			
		|||
			}
 | 
			
		||||
		}
 | 
			
		||||
    }
 | 
			
		||||
		public static float getGenitalSize(Pawn p)
 | 
			
		||||
		{
 | 
			
		||||
			if (p == null)
 | 
			
		||||
				return 0f;
 | 
			
		||||
 | 
			
		||||
			// Iff the pawn has multiple genitalia, the "best" is picked (the biggest penis or tightest vagina)
 | 
			
		||||
			float best_seen_size = 0f;
 | 
			
		||||
			foreach (Hediff part in rjw.Genital_Helper.get_AllPartsHediffList(p))
 | 
			
		||||
			{
 | 
			
		||||
				// Only check for Vaginas and Penises, not for Anus or for things not categorized as primary sexual parts
 | 
			
		||||
				if (Genital_Helper.is_penis(part) || Genital_Helper.is_vagina(part))
 | 
			
		||||
				{
 | 
			
		||||
					best_seen_size = part.Severity > best_seen_size ? part.Severity : best_seen_size;
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
			// For Women, the scale is inversed.
 | 
			
		||||
			if (p.gender == Gender.Female)
 | 
			
		||||
				return 1 - best_seen_size;
 | 
			
		||||
 | 
			
		||||
			return best_seen_size;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -74,5 +74,8 @@ namespace RJWSexperience.Ideology
 | 
			
		|||
        [MayRequireIdeology] public static readonly PreceptDef Necrophilia_Approved = DefDatabase<PreceptDef>.GetNamed("Necrophilia_Approved");
 | 
			
		||||
        [MayRequireIdeology] public static readonly PreceptDef Proselyzing_By_Orgasm = DefDatabase<PreceptDef>.GetNamed("Proselyzing_By_Orgasm");
 | 
			
		||||
        [MayRequireIdeology] public static readonly PreceptDef Proselyzing_By_Sex = DefDatabase<PreceptDef>.GetNamed("Proselyzing_By_Sex");
 | 
			
		||||
        [MayRequireIdeology] public static readonly PreceptDef GenitalSize_Approved = DefDatabase<PreceptDef>.GetNamed("GenitalSize_Approved");
 | 
			
		||||
        [MayRequireIdeology] public static readonly PreceptDef GenitalSize_Disapproved = DefDatabase<PreceptDef>.GetNamed("GenitalSize_Disapproved");
 | 
			
		||||
        [MayRequireIdeology] public static readonly PreceptDef GenitalSize_NoRules = DefDatabase<PreceptDef>.GetNamed("GenitalSize_NoRules");
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -0,0 +1,172 @@
 | 
			
		|||
<?xml version="1.0" encoding="utf-8" ?>
 | 
			
		||||
<Defs>
 | 
			
		||||
 | 
			
		||||
  <!-- Issues -->
 | 
			
		||||
  <IssueDef>
 | 
			
		||||
    <defName>GenitalSize</defName>
 | 
			
		||||
    <label>Size Matters</label>
 | 
			
		||||
    <iconPath>UI/Memes/SexualDissolutely</iconPath>
 | 
			
		||||
  </IssueDef>
 | 
			
		||||
 | 
			
		||||
  <!-- Precepts Male -->
 | 
			
		||||
 | 
			
		||||
  <PreceptDef>
 | 
			
		||||
    <defName>GenitalSize_Big_Better</defName>
 | 
			
		||||
    <issue>GenitalSize</issue>
 | 
			
		||||
    <description>The size matters.</description>
 | 
			
		||||
    <label>Bigger = Better</label>
 | 
			
		||||
    <impact>High</impact>
 | 
			
		||||
    <displayOrderInIssue>20</displayOrderInIssue>
 | 
			
		||||
    <displayOrderInImpact>200</displayOrderInImpact>
 | 
			
		||||
    <comps>
 | 
			
		||||
      <li Class="PreceptComp_SituationalThought">
 | 
			
		||||
        <thought>GenitalSize_Approved</thought>
 | 
			
		||||
      </li>
 | 
			
		||||
      <li Class="PreceptComp_SituationalThought">
 | 
			
		||||
        <thought>GenitalSize_Approved_Social</thought>
 | 
			
		||||
      </li>
 | 
			
		||||
    </comps>
 | 
			
		||||
  </PreceptDef>
 | 
			
		||||
 | 
			
		||||
  <PreceptDef>
 | 
			
		||||
    <defName>GenitalSize_NoRules</defName>
 | 
			
		||||
    <issue>GenitalSize</issue>
 | 
			
		||||
    <description>The size is unimportant.</description>
 | 
			
		||||
    <label>No Rules</label>
 | 
			
		||||
    <impact>High</impact>
 | 
			
		||||
    <displayOrderInIssue>10</displayOrderInIssue>
 | 
			
		||||
    <displayOrderInImpact>100</displayOrderInImpact>
 | 
			
		||||
    <comps>
 | 
			
		||||
    </comps>
 | 
			
		||||
  </PreceptDef>
 | 
			
		||||
 | 
			
		||||
  <PreceptDef>
 | 
			
		||||
    <defName>GenitalSize_Smaller_Better</defName>
 | 
			
		||||
    <issue>GenitalSize</issue>
 | 
			
		||||
    <description>The greeks actually believed, that a big genital is an animalistic feature. Important members are known for their small genitals.</description>
 | 
			
		||||
    <label>Smaller = Better</label>
 | 
			
		||||
    <impact>High</impact>
 | 
			
		||||
    <displayOrderInIssue>30</displayOrderInIssue>
 | 
			
		||||
    <displayOrderInImpact>200</displayOrderInImpact>
 | 
			
		||||
    <comps>
 | 
			
		||||
      <li Class="PreceptComp_SituationalThought">
 | 
			
		||||
        <thought>GenitalSize_Disapproved</thought>
 | 
			
		||||
      </li>
 | 
			
		||||
      <li Class="PreceptComp_SituationalThought">
 | 
			
		||||
        <thought>GenitalSize_Disapproved_Social</thought>
 | 
			
		||||
      </li>
 | 
			
		||||
    </comps>
 | 
			
		||||
  </PreceptDef>
 | 
			
		||||
 | 
			
		||||
  <!-- Thoughts - Mood -->
 | 
			
		||||
 | 
			
		||||
  <ThoughtDef>
 | 
			
		||||
    <defName>GenitalSize_Approved</defName>
 | 
			
		||||
		<thoughtClass>Thought_Situational</thoughtClass>
 | 
			
		||||
    <workerClass>RJWSexperience.Ideology.ThoughtWorker_Precept_GenitalSize_Approved</workerClass>
 | 
			
		||||
    <stages>
 | 
			
		||||
      <li>
 | 
			
		||||
        <label>Despised Genitalsize</label>
 | 
			
		||||
        <description>I ... I am okay the way I am!</description>
 | 
			
		||||
        <baseMoodEffect>-10</baseMoodEffect>
 | 
			
		||||
      </li>
 | 
			
		||||
      <li>
 | 
			
		||||
        <label>Unwanted Genitalsize</label>
 | 
			
		||||
        <description>I think I am below average.</description>
 | 
			
		||||
        <baseMoodEffect>-5</baseMoodEffect>
 | 
			
		||||
      </li>
 | 
			
		||||
      <li>
 | 
			
		||||
        <label>Normal Genitals</label>
 | 
			
		||||
        <description>I guess I am the average.</description>
 | 
			
		||||
        <baseMoodEffect>0</baseMoodEffect>
 | 
			
		||||
      </li>
 | 
			
		||||
      <li>
 | 
			
		||||
        <label>Appreciated Genitals</label>
 | 
			
		||||
        <description>I think I am above average.</description>
 | 
			
		||||
        <baseMoodEffect>+5</baseMoodEffect>
 | 
			
		||||
      </li>
 | 
			
		||||
      <li>
 | 
			
		||||
        <label>Venerated Genitals</label>
 | 
			
		||||
        <description>Don't want to be the elephant in the room, but parts of me are.</description>
 | 
			
		||||
        <baseMoodEffect>+10</baseMoodEffect>
 | 
			
		||||
      </li>
 | 
			
		||||
    </stages>
 | 
			
		||||
  </ThoughtDef>
 | 
			
		||||
 | 
			
		||||
  <ThoughtDef>
 | 
			
		||||
    <defName>GenitalSize_Disapproved</defName>
 | 
			
		||||
    <workerClass>RJWSexperience.Ideology.ThoughtWorker_Precept_GenitalSize_Disapproved</workerClass>
 | 
			
		||||
		<thoughtClass>Thought_Situational</thoughtClass>
 | 
			
		||||
    <stages>
 | 
			
		||||
      <li>
 | 
			
		||||
        <label>Venerated Genitals</label>
 | 
			
		||||
        <description>I do not need great genitals, as I am a being of supreme intellect and grace.</description>
 | 
			
		||||
        <baseMoodEffect>+10</baseMoodEffect>
 | 
			
		||||
      </li>
 | 
			
		||||
      <li>
 | 
			
		||||
        <label>Appreciated Genitals</label>
 | 
			
		||||
        <description>I think I am below average.</description>
 | 
			
		||||
        <baseMoodEffect>+5</baseMoodEffect>
 | 
			
		||||
      </li>
 | 
			
		||||
      <li>
 | 
			
		||||
        <label>Normal Genitals</label>
 | 
			
		||||
        <description>I guess I am the average.</description>
 | 
			
		||||
        <baseMoodEffect>0</baseMoodEffect>
 | 
			
		||||
      </li>
 | 
			
		||||
      <li>
 | 
			
		||||
        <label>Unwanted Genitals</label>
 | 
			
		||||
        <description>I think I am above average.</description>
 | 
			
		||||
        <baseMoodEffect>-5</baseMoodEffect>
 | 
			
		||||
      </li>
 | 
			
		||||
      <li>
 | 
			
		||||
        <label>Despised Genitals</label>
 | 
			
		||||
        <description>I am closer to an animal, than to a human. Why did I have to be born this way? </description>
 | 
			
		||||
        <baseMoodEffect>-10</baseMoodEffect>
 | 
			
		||||
      </li>
 | 
			
		||||
    </stages>
 | 
			
		||||
  </ThoughtDef>
 | 
			
		||||
 | 
			
		||||
  <!-- Social-Thoughts (Opinion)-->
 | 
			
		||||
  
 | 
			
		||||
  <ThoughtDef>
 | 
			
		||||
    <defName>GenitalSize_Approved_Social</defName>
 | 
			
		||||
    <workerClass>RJWSexperience.Ideology.ThoughtWorker_Precept_GenitalSize_Approved_Social</workerClass>
 | 
			
		||||
		<thoughtClass>Thought_SituationalSocial</thoughtClass>
 | 
			
		||||
    <stages>
 | 
			
		||||
      <li>
 | 
			
		||||
        <label>Unwanted Genitals</label>
 | 
			
		||||
        <baseOpinionOffset>-5</baseOpinionOffset>
 | 
			
		||||
      </li>
 | 
			
		||||
      <li>
 | 
			
		||||
        <label>Normal Genitals</label>
 | 
			
		||||
        <baseOpinionOffset>0</baseOpinionOffset>
 | 
			
		||||
      </li>
 | 
			
		||||
      <li>
 | 
			
		||||
        <label>Favorable Genitals</label>
 | 
			
		||||
        <baseOpinionOffset>+5</baseOpinionOffset>
 | 
			
		||||
      </li>
 | 
			
		||||
    </stages>
 | 
			
		||||
  </ThoughtDef>
 | 
			
		||||
 | 
			
		||||
  
 | 
			
		||||
  <ThoughtDef>
 | 
			
		||||
    <defName>GenitalSize_Disapproved_Social</defName>
 | 
			
		||||
    <workerClass>RJWSexperience.Ideology.ThoughtWorker_Precept_GenitalSize_Disapproved_Social</workerClass>
 | 
			
		||||
		<thoughtClass>Thought_SituationalSocial</thoughtClass>
 | 
			
		||||
    <stages>
 | 
			
		||||
      <li>
 | 
			
		||||
        <label>Unwanted Genitals</label>
 | 
			
		||||
        <baseOpinionOffset>-5</baseOpinionOffset>
 | 
			
		||||
      </li>
 | 
			
		||||
      <li>
 | 
			
		||||
        <label>Normal Genitals</label>
 | 
			
		||||
        <baseOpinionOffset>0</baseOpinionOffset>
 | 
			
		||||
      </li>
 | 
			
		||||
      <li>
 | 
			
		||||
        <label>Favorable Genitals</label>
 | 
			
		||||
        <baseOpinionOffset>+5</baseOpinionOffset>
 | 
			
		||||
      </li>
 | 
			
		||||
    </stages>
 | 
			
		||||
  </ThoughtDef>
 | 
			
		||||
  
 | 
			
		||||
</Defs>
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue