diff --git a/About/Manifest.xml b/About/Manifest.xml index 8a1e65c..1eb72ec 100644 --- a/About/Manifest.xml +++ b/About/Manifest.xml @@ -1,7 +1,7 @@ RJW Menstruation - 1.0.1.4 + 1.0.1.5 diff --git a/Assemblies/RJW_Menstruation.dll b/Assemblies/RJW_Menstruation.dll index a6dd840..21b75d8 100644 Binary files a/Assemblies/RJW_Menstruation.dll and b/Assemblies/RJW_Menstruation.dll differ diff --git a/Defs/DNADef/DNADefs.xml b/Defs/DNADef/DNADefs.xml index 8439f3e..09b3a1c 100644 --- a/Defs/DNADef/DNADefs.xml +++ b/Defs/DNADef/DNADefs.xml @@ -1,13 +1,14 @@  + + + Human Fetus/Fetus_Default - (255,255,255,255) - 0.2 - + 0.2 +--> - + \ No newline at end of file diff --git a/Defs/ThingDefs/Apparel_Absorbers.xml b/Defs/ThingDefs/Apparel_Absorbers.xml index 8378937..4fb8c1f 100644 --- a/Defs/ThingDefs/Apparel_Absorbers.xml +++ b/Defs/ThingDefs/Apparel_Absorbers.xml @@ -12,6 +12,7 @@ Never false + Sellable 20 0.01 @@ -79,6 +80,7 @@ Never false + None 20 0.05 @@ -132,6 +134,7 @@ Never false + Sellable 40 0.02 @@ -197,6 +200,7 @@ Never false + None 40 0.10 diff --git a/Patches/PawnModExtentions.xml b/Patches/PawnModExtentions.xml new file mode 100644 index 0000000..6429120 --- /dev/null +++ b/Patches/PawnModExtentions.xml @@ -0,0 +1,37 @@ + + + + + + + Defs/ThingDef[defName="Human"] + + +
  • + Fetus/Fetus_Default + (255,255,255,255) + 0.2 +
  • +
    +
    +
    + + + + + + +
    \ No newline at end of file diff --git a/changelogs.txt b/changelogs.txt index fea5726..1bd3c55 100644 --- a/changelogs.txt +++ b/changelogs.txt @@ -1,7 +1,11 @@ +Version 1.0.1.5 + - DNADef is obsoleted and replaced to ModExtention Version 1.0.1.4 - fixed bugs that in period hediff not disappear in time - 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 - requires RJW 4.6.1 or later - max absorbable statbase added to vanilla fabrics. diff --git a/source/RJW_Menstruation/RJW_Menstruation/Cum.cs b/source/RJW_Menstruation/RJW_Menstruation/Cum.cs index 705314a..ba82d72 100644 --- a/source/RJW_Menstruation/RJW_Menstruation/Cum.cs +++ b/source/RJW_Menstruation/RJW_Menstruation/Cum.cs @@ -5,6 +5,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using Verse; +using RimWorld; using UnityEngine; using rjw; @@ -37,23 +38,23 @@ namespace RJW_Menstruation } private Color customColor; - public DNADef DNA + public PawnDNAModExtention DNA { get { if (DNAcache == null) { - DNAcache = DefDatabase.GetNamedSilentFail(pawn?.def.defName ?? "Human"); + DNAcache = pawn.def.GetModExtension(); if (DNAcache == null) { - DNAcache = VariousDefOf.HumanDNA; + DNAcache = ThingDefOf.Human.GetModExtension(); } return DNAcache; } else return DNAcache; } } - private DNADef DNAcache = null; + private PawnDNAModExtention DNAcache = null; public ThingDef FilthDef { get @@ -124,7 +125,6 @@ namespace RJW_Menstruation public void ExposeData() { 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 fertvolume, "fertvolume", fertvolume, true); Scribe_Values.Look(ref notcumthickness, "notcumthickness", notcumthickness, true); diff --git a/source/RJW_Menstruation/RJW_Menstruation/DNADef.cs b/source/RJW_Menstruation/RJW_Menstruation/DNADef.cs deleted file mode 100644 index 65f4d80..0000000 --- a/source/RJW_Menstruation/RJW_Menstruation/DNADef.cs +++ /dev/null @@ -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; - - } - - - - - - - -} diff --git a/source/RJW_Menstruation/RJW_Menstruation/HediffComp_Menstruation.cs b/source/RJW_Menstruation/RJW_Menstruation/HediffComp_Menstruation.cs index 233b72f..dbcd3f9 100644 --- a/source/RJW_Menstruation/RJW_Menstruation/HediffComp_Menstruation.cs +++ b/source/RJW_Menstruation/RJW_Menstruation/HediffComp_Menstruation.cs @@ -1065,16 +1065,6 @@ namespace RJW_Menstruation return amount; } - private string FilthLabelMaker(List labels) - { - string res = ""; - foreach (string label in labels) - { - res += label; - } - - return res; - } diff --git a/source/RJW_Menstruation/RJW_Menstruation/RJW_Menstruation.csproj b/source/RJW_Menstruation/RJW_Menstruation/RJW_Menstruation.csproj index 9bed9ae..dbb1a2f 100644 --- a/source/RJW_Menstruation/RJW_Menstruation/RJW_Menstruation.csproj +++ b/source/RJW_Menstruation/RJW_Menstruation/RJW_Menstruation.csproj @@ -58,7 +58,6 @@ - diff --git a/source/RJW_Menstruation/RJW_Menstruation/Things.cs b/source/RJW_Menstruation/RJW_Menstruation/Things.cs index de3d22e..cb54869 100644 --- a/source/RJW_Menstruation/RJW_Menstruation/Things.cs +++ b/source/RJW_Menstruation/RJW_Menstruation/Things.cs @@ -10,6 +10,14 @@ using UnityEngine; 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 { diff --git a/source/RJW_Menstruation/RJW_Menstruation/Utility.cs b/source/RJW_Menstruation/RJW_Menstruation/Utility.cs index 35c1a82..51ffbf0 100644 --- a/source/RJW_Menstruation/RJW_Menstruation/Utility.cs +++ b/source/RJW_Menstruation/RJW_Menstruation/Utility.cs @@ -149,7 +149,7 @@ namespace RJW_Menstruation else if (hediff is Hediff_BasePregnancy) { Hediff_BasePregnancy h = (Hediff_BasePregnancy)hediff; - string fetustex = DefDatabase.GetNamedSilentFail(h.babies.First().def.defName)?.fetusTexPath ?? "Fetus/Fetus_Default"; + string fetustex = h.babies.First().def.GetModExtension().fetusTexPath ?? "Fetus/Fetus_Default"; if (h.GestationProgress < 0.2f) icon = comp.wombTex + "_Implanted"; else if (h.GestationProgress < 0.3f) icon += "Fetus/Fetus_Early00"; else if (h.GestationProgress < 0.4f) icon += fetustex + "00"; diff --git a/source/RJW_Menstruation/RJW_Menstruation/VariousDefOf.cs b/source/RJW_Menstruation/RJW_Menstruation/VariousDefOf.cs index f05c781..050790f 100644 --- a/source/RJW_Menstruation/RJW_Menstruation/VariousDefOf.cs +++ b/source/RJW_Menstruation/RJW_Menstruation/VariousDefOf.cs @@ -26,7 +26,7 @@ namespace RJW_Menstruation public static readonly HediffDef Hediff_MenstrualCramp = DefDatabase.GetNamed("Hediff_MenstrualCramp"); public static readonly HediffDef Hediff_Climacteric = DefDatabase.GetNamed("Hediff_Climacteric"); public static readonly HediffDef Hediff_Menopause = DefDatabase.GetNamed("Hediff_Menopause"); - public static readonly DNADef HumanDNA = DefDatabase.GetNamed("Human"); + //public static readonly DNADef HumanDNA = DefDatabase.GetNamed("Human"); public static readonly StatDef MaxAbsorbable = DefDatabase.GetNamed("MaxAbsorbable"); public static readonly PawnRelationDef Relation_birthgiver = DefDatabase.AllDefs.FirstOrDefault(d => d.defName == "RJW_Sire"); public static readonly PawnRelationDef Relation_spawn = DefDatabase.AllDefs.FirstOrDefault(d => d.defName == "RJW_Pup");