mirror of
				https://github.com/vegapnk/RJW-Genes.git
				synced 2024-08-15 00:23:31 +00:00 
			
		
		
		
	resizing age slider
This commit is contained in:
		
							parent
							
								
									35fbe09ab7
								
							
						
					
					
						commit
						60eef21c0e
					
				
					 13 changed files with 17 additions and 35 deletions
				
			
		| 
						 | 
				
			
			@ -17,10 +17,7 @@ namespace RJW_Genes
 | 
			
		|||
    public abstract class Gene_GenitaliaResizingGene : RJW_Gene
 | 
			
		||||
    {
 | 
			
		||||
 | 
			
		||||
        /// <summary>
 | 
			
		||||
        /// The age (in years) at which the Pawns Genes will take effect, resizing their genitalia. 
 | 
			
		||||
        /// </summary>
 | 
			
		||||
        public const int RESIZING_AGE = 20; 
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
        /// <summary>
 | 
			
		||||
        /// Whether or not the gene was already applied. 
 | 
			
		||||
| 
						 | 
				
			
			@ -33,7 +30,7 @@ namespace RJW_Genes
 | 
			
		|||
        public override void PostMake()
 | 
			
		||||
        {
 | 
			
		||||
            base.PostMake();
 | 
			
		||||
            if (pawn.ageTracker.AgeBiologicalYears >= RESIZING_AGE)
 | 
			
		||||
            if (pawn.ageTracker.AgeBiologicalYears >= RJW_Genes_Settings.rjw_genes_resizing_age)
 | 
			
		||||
            {
 | 
			
		||||
                Resize();
 | 
			
		||||
                ResizingWasApplied = true;
 | 
			
		||||
| 
						 | 
				
			
			@ -43,7 +40,7 @@ namespace RJW_Genes
 | 
			
		|||
        public override void PostAdd()
 | 
			
		||||
        {
 | 
			
		||||
            base.PostAdd();
 | 
			
		||||
            if (pawn.ageTracker.AgeBiologicalYears >= RESIZING_AGE)
 | 
			
		||||
            if (pawn.ageTracker.AgeBiologicalYears >= RJW_Genes_Settings.rjw_genes_resizing_age)
 | 
			
		||||
            {
 | 
			
		||||
                Resize();
 | 
			
		||||
                ResizingWasApplied = true;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -16,7 +16,7 @@ namespace RJW_Genes
 | 
			
		|||
 | 
			
		||||
        static void Postfix(Pawn ___pawn, int birthdayAge)
 | 
			
		||||
        {
 | 
			
		||||
            if (birthdayAge >= Gene_GenitaliaResizingGene.RESIZING_AGE)
 | 
			
		||||
            if (birthdayAge >= RJW_Genes_Settings.rjw_genes_resizing_age)
 | 
			
		||||
            {
 | 
			
		||||
                foreach(Gene_GenitaliaResizingGene gene in GeneUtility.GetGenitaliaResizingGenes(___pawn))
 | 
			
		||||
                {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										
											BIN
										
									
								
								Source/RJW.dll
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Source/RJW.dll
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								Source/RJWSexperience.dll
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Source/RJWSexperience.dll
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
						 | 
				
			
			@ -158,6 +158,8 @@
 | 
			
		|||
  </ItemGroup>
 | 
			
		||||
  <ItemGroup>
 | 
			
		||||
    <Content Include="GeneDefs_GenitaliaTypeEndogenes.xml" />
 | 
			
		||||
    <Content Include="RJW.dll" />
 | 
			
		||||
    <Content Include="RJWSexperience.dll" />
 | 
			
		||||
  </ItemGroup>
 | 
			
		||||
  <ItemGroup>
 | 
			
		||||
    <Reference Include="0Harmony, Version=2.2.2.0, Culture=neutral, processorArchitecture=MSIL">
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,6 +1,7 @@
 | 
			
		|||
using System;
 | 
			
		||||
using Verse;
 | 
			
		||||
using UnityEngine;
 | 
			
		||||
using RimWorld;
 | 
			
		||||
 | 
			
		||||
namespace RJW_Genes
 | 
			
		||||
{
 | 
			
		||||
| 
						 | 
				
			
			@ -16,25 +17,15 @@ namespace RJW_Genes
 | 
			
		|||
            listing_Standard.maxOneColumn = true;
 | 
			
		||||
            listing_Standard.ColumnWidth = rect.width / 2.05f;
 | 
			
		||||
            listing_Standard.Begin(rect);
 | 
			
		||||
            listing_Standard.Gap(24f);
 | 
			
		||||
            listing_Standard.Gap(24f); 
 | 
			
		||||
            listing_Standard.Label("Genitalia resizing age" + ": " +
 | 
			
		||||
                Math.Round((double)(RJW_Genes_Settings.rjw_genes_resizing_age), 0).ToString() , -1f, "years.");
 | 
			
		||||
            RJW_Genes_Settings.rjw_genes_resizing_age = listing_Standard.Slider(RJW_Genes_Settings.rjw_genes_resizing_age, 18f, 100f);
 | 
			
		||||
           
 | 
			
		||||
            listing_Standard.Label("Fertilin-Gain from Animals" + ": " +
 | 
			
		||||
                Math.Round((double)(RJW_Genes_Settings.rjw_genes_fertilin_from_animals_factor * 100f), 0).ToString() + "%", -1f, "of fertilin gained (compared to human-baseline).");
 | 
			
		||||
               Math.Round((double)(RJW_Genes_Settings.rjw_genes_fertilin_from_animals_factor * 100f), 0).ToString() + "%", -1f, "of fertilin gained (compared to human-baseline).");
 | 
			
		||||
            RJW_Genes_Settings.rjw_genes_fertilin_from_animals_factor = listing_Standard.Slider(RJW_Genes_Settings.rjw_genes_fertilin_from_animals_factor, 0f, 3f);
 | 
			
		||||
 | 
			
		||||
            listing_Standard.Gap(5f);
 | 
			
		||||
            listing_Standard.CheckboxLabeled("Sexdemon Visits", ref rjw_genes_sexdemon_visit, "If enabled, incubi and succubi can spawn in through an event.", 0f, 1f);
 | 
			
		||||
            if (rjw_genes_sexdemon_visit)
 | 
			
		||||
            {
 | 
			
		||||
                listing_Standard.Gap(3f);
 | 
			
		||||
                listing_Standard.CheckboxLabeled("  Size matters", ref rjw_genes_sexdemon_join_size_matters, "Incubi and succubi will consider size/tightness of partners genital for deciding if they want to join", 0f, 1f);
 | 
			
		||||
                listing_Standard.Gap(3f);
 | 
			
		||||
                listing_Standard.CheckboxLabeled("  Sexdemon groups", ref rjw_genes_sexdemon_visit_groups, "Multiple sexdemons can spawn during a event", 0f, 1f);
 | 
			
		||||
                listing_Standard.Gap(3f);
 | 
			
		||||
                listing_Standard.CheckboxLabeled("  Succubi", ref rjw_genes_sexdemon_visit_succubi, "Allow incubi to spawn through this even", 0f, 1f);
 | 
			
		||||
                listing_Standard.Gap(3f);
 | 
			
		||||
                listing_Standard.CheckboxLabeled("  Incubi", ref rjw_genes_sexdemon_visit_incubi, "Allow incubi to spawn through this even", 0f, 1f);
 | 
			
		||||
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            listing_Standard.Gap(5f);
 | 
			
		||||
            listing_Standard.CheckboxLabeled("generous-donor cheatmode", ref rjw_genes_generous_donor_cheatmode, "When enabled, pawns with the 'generous donor' are not drained and not fertilin exhausted. Hence they can fuel succubi and incubi non-stop. This makes them drastically easier to keep, and you should not do it.", 0f, 1f);
 | 
			
		||||
| 
						 | 
				
			
			@ -47,27 +38,19 @@ namespace RJW_Genes
 | 
			
		|||
        public override void ExposeData()
 | 
			
		||||
        {
 | 
			
		||||
            base.ExposeData();
 | 
			
		||||
            Scribe_Values.Look<float>(ref RJW_Genes_Settings.rjw_genes_resizing_age, "rjw_genes_resizing_age", RJW_Genes_Settings.rjw_genes_resizing_age, true);
 | 
			
		||||
            Scribe_Values.Look<float>(ref RJW_Genes_Settings.rjw_genes_fertilin_from_animals_factor, "rjw_genes_fertilin_from_animals_factor", RJW_Genes_Settings.rjw_genes_fertilin_from_animals_factor, true);
 | 
			
		||||
            Scribe_Values.Look<bool>(ref RJW_Genes_Settings.rjw_genes_detailed_debug, "rjw_genes_detailed_debug", RJW_Genes_Settings.rjw_genes_detailed_debug, true);
 | 
			
		||||
 | 
			
		||||
            Scribe_Values.Look<bool>(ref RJW_Genes_Settings.rjw_genes_sexdemon_visit, "rjw_genes_sexdemon_visit", RJW_Genes_Settings.rjw_genes_sexdemon_visit, true);
 | 
			
		||||
            Scribe_Values.Look<bool>(ref RJW_Genes_Settings.rjw_genes_sexdemon_join_size_matters, "rjw_genes_sexdemon_join_size_matters", RJW_Genes_Settings.rjw_genes_sexdemon_join_size_matters, true);
 | 
			
		||||
            Scribe_Values.Look<bool>(ref RJW_Genes_Settings.rjw_genes_sexdemon_visit_groups, "rjw_genes_sexdemon_groups", RJW_Genes_Settings.rjw_genes_sexdemon_visit_groups, true);
 | 
			
		||||
            Scribe_Values.Look<bool>(ref RJW_Genes_Settings.rjw_genes_sexdemon_visit_succubi, "rjw_genes_sexdemon_succubi", RJW_Genes_Settings.rjw_genes_sexdemon_visit_succubi, true);
 | 
			
		||||
            Scribe_Values.Look<bool>(ref RJW_Genes_Settings.rjw_genes_sexdemon_visit_incubi, "rjw_genes_sexdemon_incubi", RJW_Genes_Settings.rjw_genes_sexdemon_visit_incubi, true);
 | 
			
		||||
 | 
			
		||||
                   
 | 
			
		||||
            Scribe_Values.Look<bool>(ref RJW_Genes_Settings.rjw_genes_generous_donor_cheatmode, "rjw_genes_generous_donor_cheatmode", RJW_Genes_Settings.rjw_genes_generous_donor_cheatmode, true);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public static bool rjw_genes_detailed_debug = false;
 | 
			
		||||
        public static float rjw_genes_fertilin_from_animals_factor = 0.1f;
 | 
			
		||||
        public static float rjw_genes_resizing_age = 20;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        public static bool rjw_genes_sexdemon_visit = true;
 | 
			
		||||
        public static bool rjw_genes_sexdemon_join_size_matters = true;
 | 
			
		||||
        public static bool rjw_genes_sexdemon_visit_groups = true;
 | 
			
		||||
        public static bool rjw_genes_sexdemon_visit_succubi = true;
 | 
			
		||||
        public static bool rjw_genes_sexdemon_visit_incubi = true;
 | 
			
		||||
 | 
			
		||||
        public static bool rjw_genes_generous_donor_cheatmode = false;
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue