mirror of
				https://gitgud.io/lutepickle/rjw_menstruation.git
				synced 2024-08-14 22:46:52 +00:00 
			
		
		
		
	DNADef has been obsoleted
This commit is contained in:
		
							parent
							
								
									8d54a63532
								
							
						
					
					
						commit
						3fa9d46256
					
				
					 13 changed files with 68 additions and 56 deletions
				
			
		| 
						 | 
					@ -1,7 +1,7 @@
 | 
				
			||||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 | 
					<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 | 
				
			||||||
<Manifest>
 | 
					<Manifest>
 | 
				
			||||||
	<identifier>RJW Menstruation</identifier>
 | 
						<identifier>RJW Menstruation</identifier>
 | 
				
			||||||
	<version>1.0.1.4</version>
 | 
						<version>1.0.1.5</version>
 | 
				
			||||||
	<dependencies>
 | 
						<dependencies>
 | 
				
			||||||
	</dependencies>
 | 
						</dependencies>
 | 
				
			||||||
	<incompatibleWith />
 | 
						<incompatibleWith />
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
										
											Binary file not shown.
										
									
								
							| 
						 | 
					@ -1,12 +1,13 @@
 | 
				
			||||||
<?xml version="1.0" encoding="utf-8" ?>
 | 
					<?xml version="1.0" encoding="utf-8" ?>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<Defs>
 | 
					<Defs>
 | 
				
			||||||
 | 
					<!-- Obsoleted
 | 
				
			||||||
  <RJW_Menstruation.DNADef>
 | 
					  <RJW_Menstruation.DNADef>
 | 
				
			||||||
    <defName>Human</defName> <!-- write race defName -->
 | 
					    <defName>Human</defName>
 | 
				
			||||||
    <label>human fetus</label>
 | 
					    <label>human fetus</label>
 | 
				
			||||||
	<fetusTexPath>Fetus/Fetus_Default</fetusTexPath>
 | 
						<fetusTexPath>Fetus/Fetus_Default</fetusTexPath>
 | 
				
			||||||
	<cumColor>(255,255,255,255)</cumColor> <!-- RGBA -->
 | 
						<cumThickness>0.2</cumThickness> 
 | 
				
			||||||
	<cumThickness>0.2</cumThickness> <!-- 1.0 = never natural flow out. if this value get over 1.0, cum will propagation self in womb -->
 | 
					-->
 | 
				
			||||||
  </RJW_Menstruation.DNADef>
 | 
					 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -12,6 +12,7 @@
 | 
				
			||||||
    </graphicData>
 | 
					    </graphicData>
 | 
				
			||||||
    <tickerType>Never</tickerType>
 | 
					    <tickerType>Never</tickerType>
 | 
				
			||||||
    <smeltable>false</smeltable>
 | 
					    <smeltable>false</smeltable>
 | 
				
			||||||
 | 
						<tradeability>Sellable</tradeability>
 | 
				
			||||||
    <statBases>
 | 
					    <statBases>
 | 
				
			||||||
      <MaxHitPoints>20</MaxHitPoints>
 | 
					      <MaxHitPoints>20</MaxHitPoints>
 | 
				
			||||||
      <Mass>0.01</Mass>
 | 
					      <Mass>0.01</Mass>
 | 
				
			||||||
| 
						 | 
					@ -79,6 +80,7 @@
 | 
				
			||||||
    </graphicData>
 | 
					    </graphicData>
 | 
				
			||||||
    <tickerType>Never</tickerType>
 | 
					    <tickerType>Never</tickerType>
 | 
				
			||||||
    <smeltable>false</smeltable>
 | 
					    <smeltable>false</smeltable>
 | 
				
			||||||
 | 
						<tradeability>None</tradeability>
 | 
				
			||||||
    <statBases>
 | 
					    <statBases>
 | 
				
			||||||
      <MaxHitPoints>20</MaxHitPoints>
 | 
					      <MaxHitPoints>20</MaxHitPoints>
 | 
				
			||||||
      <Mass>0.05</Mass>
 | 
					      <Mass>0.05</Mass>
 | 
				
			||||||
| 
						 | 
					@ -132,6 +134,7 @@
 | 
				
			||||||
    </graphicData>
 | 
					    </graphicData>
 | 
				
			||||||
    <tickerType>Never</tickerType>
 | 
					    <tickerType>Never</tickerType>
 | 
				
			||||||
    <smeltable>false</smeltable>
 | 
					    <smeltable>false</smeltable>
 | 
				
			||||||
 | 
						<tradeability>Sellable</tradeability>
 | 
				
			||||||
    <statBases>
 | 
					    <statBases>
 | 
				
			||||||
      <MaxHitPoints>40</MaxHitPoints>
 | 
					      <MaxHitPoints>40</MaxHitPoints>
 | 
				
			||||||
      <Mass>0.02</Mass>
 | 
					      <Mass>0.02</Mass>
 | 
				
			||||||
| 
						 | 
					@ -197,6 +200,7 @@
 | 
				
			||||||
    </graphicData>
 | 
					    </graphicData>
 | 
				
			||||||
    <tickerType>Never</tickerType>
 | 
					    <tickerType>Never</tickerType>
 | 
				
			||||||
    <smeltable>false</smeltable>
 | 
					    <smeltable>false</smeltable>
 | 
				
			||||||
 | 
						<tradeability>None</tradeability>
 | 
				
			||||||
    <statBases>
 | 
					    <statBases>
 | 
				
			||||||
      <MaxHitPoints>40</MaxHitPoints>
 | 
					      <MaxHitPoints>40</MaxHitPoints>
 | 
				
			||||||
      <Mass>0.10</Mass>
 | 
					      <Mass>0.10</Mass>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										37
									
								
								Patches/PawnModExtentions.xml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										37
									
								
								Patches/PawnModExtentions.xml
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,37 @@
 | 
				
			||||||
 | 
					<?xml version="1.0" encoding="UTF-8"?>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<!--
 | 
				
			||||||
 | 
						<Operation Class="PatchOperationAdd">
 | 
				
			||||||
 | 
							<xpath>Defs/ThingDef[defName="Race's defName"]</xpath>
 | 
				
			||||||
 | 
							<value>
 | 
				
			||||||
 | 
								<modExtensions>
 | 
				
			||||||
 | 
									<li Class="RJW_Menstruation.PawnDNAModExtention">
 | 
				
			||||||
 | 
										<fetusTexPath>Fetus/Fetus_Default</fetusTexPath>
 | 
				
			||||||
 | 
										<cumColor>(255,255,255,255)</cumColor>
 | 
				
			||||||
 | 
										<cumThickness>0.2</cumThickness> 
 | 
				
			||||||
 | 
									</li>
 | 
				
			||||||
 | 
								</modExtensions>
 | 
				
			||||||
 | 
							</value>
 | 
				
			||||||
 | 
						</Operation>
 | 
				
			||||||
 | 
					-->
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<Patch>
 | 
				
			||||||
 | 
						<Operation Class="PatchOperationAdd">
 | 
				
			||||||
 | 
							<xpath>Defs/ThingDef[defName="Human"]</xpath>
 | 
				
			||||||
 | 
							<value>
 | 
				
			||||||
 | 
								<modExtensions>
 | 
				
			||||||
 | 
									<li Class="RJW_Menstruation.PawnDNAModExtention">
 | 
				
			||||||
 | 
										<fetusTexPath>Fetus/Fetus_Default</fetusTexPath>
 | 
				
			||||||
 | 
										<cumColor>(255,255,255,255)</cumColor> 
 | 
				
			||||||
 | 
										<cumThickness>0.2</cumThickness> 
 | 
				
			||||||
 | 
									</li>
 | 
				
			||||||
 | 
								</modExtensions>
 | 
				
			||||||
 | 
							</value>
 | 
				
			||||||
 | 
						</Operation>
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
					</Patch>
 | 
				
			||||||
| 
						 | 
					@ -1,7 +1,11 @@
 | 
				
			||||||
 | 
					Version 1.0.1.5
 | 
				
			||||||
 | 
					 - DNADef is obsoleted and replaced to ModExtention
 | 
				
			||||||
Version 1.0.1.4
 | 
					Version 1.0.1.4
 | 
				
			||||||
 - fixed bugs that in period hediff not disappear in time
 | 
					 - fixed bugs that in period hediff not disappear in time
 | 
				
			||||||
 - fixed enable menopause setting was not saved
 | 
					 - fixed enable menopause setting was not saved
 | 
				
			||||||
 - now cum filth is generated as a single mixture filth
 | 
					 - now cum filths are generated as a single mixture filth
 | 
				
			||||||
 | 
					 - dirty tampons and wet pads are now untradable
 | 
				
			||||||
 | 
					 - DNAdef is obsoleted and replaced with modextention
 | 
				
			||||||
Version 1.0.1.3
 | 
					Version 1.0.1.3
 | 
				
			||||||
 - requires RJW 4.6.1 or later
 | 
					 - requires RJW 4.6.1 or later
 | 
				
			||||||
 - max absorbable statbase added to vanilla fabrics.
 | 
					 - max absorbable statbase added to vanilla fabrics.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -5,6 +5,7 @@ using System.Linq;
 | 
				
			||||||
using System.Text;
 | 
					using System.Text;
 | 
				
			||||||
using System.Threading.Tasks;
 | 
					using System.Threading.Tasks;
 | 
				
			||||||
using Verse;
 | 
					using Verse;
 | 
				
			||||||
 | 
					using RimWorld;
 | 
				
			||||||
using UnityEngine;
 | 
					using UnityEngine;
 | 
				
			||||||
using rjw;
 | 
					using rjw;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -37,23 +38,23 @@ namespace RJW_Menstruation
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        private Color customColor;
 | 
					        private Color customColor;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        public DNADef DNA
 | 
					        public PawnDNAModExtention DNA
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            get
 | 
					            get
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                if (DNAcache == null)
 | 
					                if (DNAcache == null)
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    DNAcache = DefDatabase<DNADef>.GetNamedSilentFail(pawn?.def.defName ?? "Human");
 | 
					                    DNAcache = pawn.def.GetModExtension<PawnDNAModExtention>();
 | 
				
			||||||
                    if (DNAcache == null)
 | 
					                    if (DNAcache == null)
 | 
				
			||||||
                    {
 | 
					                    {
 | 
				
			||||||
                        DNAcache = VariousDefOf.HumanDNA;
 | 
					                        DNAcache = ThingDefOf.Human.GetModExtension<PawnDNAModExtention>();
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
                    return DNAcache;
 | 
					                    return DNAcache;
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
                else return DNAcache;
 | 
					                else return DNAcache;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        private DNADef DNAcache = null;
 | 
					        private PawnDNAModExtention DNAcache = null;
 | 
				
			||||||
        public ThingDef FilthDef
 | 
					        public ThingDef FilthDef
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            get
 | 
					            get
 | 
				
			||||||
| 
						 | 
					@ -124,7 +125,6 @@ namespace RJW_Menstruation
 | 
				
			||||||
        public void ExposeData()
 | 
					        public void ExposeData()
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            Scribe_References.Look(ref pawn, "pawn", true);
 | 
					            Scribe_References.Look(ref pawn, "pawn", true);
 | 
				
			||||||
            Scribe_Defs.Look(ref DNAcache, "DNAcache");
 | 
					 | 
				
			||||||
            Scribe_Values.Look(ref volume, "volume", volume, true);
 | 
					            Scribe_Values.Look(ref volume, "volume", volume, true);
 | 
				
			||||||
            Scribe_Values.Look(ref fertvolume, "fertvolume", fertvolume, true);
 | 
					            Scribe_Values.Look(ref fertvolume, "fertvolume", fertvolume, true);
 | 
				
			||||||
            Scribe_Values.Look(ref notcumthickness, "notcumthickness", notcumthickness, true);
 | 
					            Scribe_Values.Look(ref notcumthickness, "notcumthickness", notcumthickness, true);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,31 +0,0 @@
 | 
				
			||||||
using System;
 | 
					 | 
				
			||||||
using System.Collections.Generic;
 | 
					 | 
				
			||||||
using System.Linq;
 | 
					 | 
				
			||||||
using System.Text;
 | 
					 | 
				
			||||||
using System.Threading.Tasks;
 | 
					 | 
				
			||||||
using Verse;
 | 
					 | 
				
			||||||
using RimWorld;
 | 
					 | 
				
			||||||
using UnityEngine;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
namespace RJW_Menstruation
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	public class DNADef : Def
 | 
					 | 
				
			||||||
	{
 | 
					 | 
				
			||||||
		//public bool IsNone => string.IsNullOrEmpty(defName);
 | 
					 | 
				
			||||||
		//public static readonly DNADef None = new DNADef();
 | 
					 | 
				
			||||||
	
 | 
					 | 
				
			||||||
		public string fetusTexPath;
 | 
					 | 
				
			||||||
		public ColorInt cumColor;
 | 
					 | 
				
			||||||
		public Color CumColor => cumColor.ToColor;
 | 
					 | 
				
			||||||
		public float cumThickness = 0f;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1065,16 +1065,6 @@ namespace RJW_Menstruation
 | 
				
			||||||
            return amount;
 | 
					            return amount;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        private string FilthLabelMaker(List<string> labels)
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
            string res = "";
 | 
					 | 
				
			||||||
            foreach (string label in labels)
 | 
					 | 
				
			||||||
            {
 | 
					 | 
				
			||||||
                res += label;
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            return res;
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -58,7 +58,6 @@
 | 
				
			||||||
    <Compile Include="Configurations.cs" />
 | 
					    <Compile Include="Configurations.cs" />
 | 
				
			||||||
    <Compile Include="Cum.cs" />
 | 
					    <Compile Include="Cum.cs" />
 | 
				
			||||||
    <Compile Include="Dialog_WombStatus.cs" />
 | 
					    <Compile Include="Dialog_WombStatus.cs" />
 | 
				
			||||||
    <Compile Include="DNADef.cs" />
 | 
					 | 
				
			||||||
    <Compile Include="DrugOutcomDoers.cs" />
 | 
					    <Compile Include="DrugOutcomDoers.cs" />
 | 
				
			||||||
    <Compile Include="FilthMaker_Colored.cs" />
 | 
					    <Compile Include="FilthMaker_Colored.cs" />
 | 
				
			||||||
    <Compile Include="HARCompatibility.cs" />
 | 
					    <Compile Include="HARCompatibility.cs" />
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,6 +10,14 @@ using UnityEngine;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace RJW_Menstruation
 | 
					namespace RJW_Menstruation
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
					    public class PawnDNAModExtention : DefModExtension
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        public string fetusTexPath;
 | 
				
			||||||
 | 
					        public ColorInt cumColor;
 | 
				
			||||||
 | 
					        public Color CumColor => cumColor.ToColor;
 | 
				
			||||||
 | 
					        public float cumThickness = 0f;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public class AbsorberModExtention : DefModExtension
 | 
					    public class AbsorberModExtention : DefModExtension
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -149,7 +149,7 @@ namespace RJW_Menstruation
 | 
				
			||||||
            else if (hediff is Hediff_BasePregnancy)
 | 
					            else if (hediff is Hediff_BasePregnancy)
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                Hediff_BasePregnancy h = (Hediff_BasePregnancy)hediff;
 | 
					                Hediff_BasePregnancy h = (Hediff_BasePregnancy)hediff;
 | 
				
			||||||
                string fetustex = DefDatabase<DNADef>.GetNamedSilentFail(h.babies.First().def.defName)?.fetusTexPath ?? "Fetus/Fetus_Default";
 | 
					                string fetustex = h.babies.First().def.GetModExtension<PawnDNAModExtention>().fetusTexPath ?? "Fetus/Fetus_Default";
 | 
				
			||||||
                if (h.GestationProgress < 0.2f) icon = comp.wombTex + "_Implanted";
 | 
					                if (h.GestationProgress < 0.2f) icon = comp.wombTex + "_Implanted";
 | 
				
			||||||
                else if (h.GestationProgress < 0.3f) icon += "Fetus/Fetus_Early00";
 | 
					                else if (h.GestationProgress < 0.3f) icon += "Fetus/Fetus_Early00";
 | 
				
			||||||
                else if (h.GestationProgress < 0.4f) icon += fetustex + "00";
 | 
					                else if (h.GestationProgress < 0.4f) icon += fetustex + "00";
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -26,7 +26,7 @@ namespace RJW_Menstruation
 | 
				
			||||||
        public static readonly HediffDef Hediff_MenstrualCramp = DefDatabase<HediffDef>.GetNamed("Hediff_MenstrualCramp");
 | 
					        public static readonly HediffDef Hediff_MenstrualCramp = DefDatabase<HediffDef>.GetNamed("Hediff_MenstrualCramp");
 | 
				
			||||||
        public static readonly HediffDef Hediff_Climacteric = DefDatabase<HediffDef>.GetNamed("Hediff_Climacteric");
 | 
					        public static readonly HediffDef Hediff_Climacteric = DefDatabase<HediffDef>.GetNamed("Hediff_Climacteric");
 | 
				
			||||||
        public static readonly HediffDef Hediff_Menopause = DefDatabase<HediffDef>.GetNamed("Hediff_Menopause");
 | 
					        public static readonly HediffDef Hediff_Menopause = DefDatabase<HediffDef>.GetNamed("Hediff_Menopause");
 | 
				
			||||||
        public static readonly DNADef HumanDNA = DefDatabase<DNADef>.GetNamed("Human");
 | 
					        //public static readonly DNADef HumanDNA = DefDatabase<DNADef>.GetNamed("Human");
 | 
				
			||||||
        public static readonly StatDef MaxAbsorbable = DefDatabase<StatDef>.GetNamed("MaxAbsorbable");
 | 
					        public static readonly StatDef MaxAbsorbable = DefDatabase<StatDef>.GetNamed("MaxAbsorbable");
 | 
				
			||||||
        public static readonly PawnRelationDef Relation_birthgiver = DefDatabase<PawnRelationDef>.AllDefs.FirstOrDefault(d => d.defName == "RJW_Sire");
 | 
					        public static readonly PawnRelationDef Relation_birthgiver = DefDatabase<PawnRelationDef>.AllDefs.FirstOrDefault(d => d.defName == "RJW_Sire");
 | 
				
			||||||
        public static readonly PawnRelationDef Relation_spawn = DefDatabase<PawnRelationDef>.AllDefs.FirstOrDefault(d => d.defName == "RJW_Pup");
 | 
					        public static readonly PawnRelationDef Relation_spawn = DefDatabase<PawnRelationDef>.AllDefs.FirstOrDefault(d => d.defName == "RJW_Pup");
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue