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"?>
|
||||
<Manifest>
|
||||
<identifier>RJW Menstruation</identifier>
|
||||
<version>1.0.1.4</version>
|
||||
<version>1.0.1.5</version>
|
||||
<dependencies>
|
||||
</dependencies>
|
||||
<incompatibleWith />
|
||||
|
|
Binary file not shown.
|
@ -1,12 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
|
||||
<Defs>
|
||||
<!-- Obsoleted
|
||||
<RJW_Menstruation.DNADef>
|
||||
<defName>Human</defName> <!-- write race defName -->
|
||||
<defName>Human</defName>
|
||||
<label>human fetus</label>
|
||||
<fetusTexPath>Fetus/Fetus_Default</fetusTexPath>
|
||||
<cumColor>(255,255,255,255)</cumColor> <!-- RGBA -->
|
||||
<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>
|
||||
<cumThickness>0.2</cumThickness>
|
||||
-->
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
</graphicData>
|
||||
<tickerType>Never</tickerType>
|
||||
<smeltable>false</smeltable>
|
||||
<tradeability>Sellable</tradeability>
|
||||
<statBases>
|
||||
<MaxHitPoints>20</MaxHitPoints>
|
||||
<Mass>0.01</Mass>
|
||||
|
@ -79,6 +80,7 @@
|
|||
</graphicData>
|
||||
<tickerType>Never</tickerType>
|
||||
<smeltable>false</smeltable>
|
||||
<tradeability>None</tradeability>
|
||||
<statBases>
|
||||
<MaxHitPoints>20</MaxHitPoints>
|
||||
<Mass>0.05</Mass>
|
||||
|
@ -132,6 +134,7 @@
|
|||
</graphicData>
|
||||
<tickerType>Never</tickerType>
|
||||
<smeltable>false</smeltable>
|
||||
<tradeability>Sellable</tradeability>
|
||||
<statBases>
|
||||
<MaxHitPoints>40</MaxHitPoints>
|
||||
<Mass>0.02</Mass>
|
||||
|
@ -197,6 +200,7 @@
|
|||
</graphicData>
|
||||
<tickerType>Never</tickerType>
|
||||
<smeltable>false</smeltable>
|
||||
<tradeability>None</tradeability>
|
||||
<statBases>
|
||||
<MaxHitPoints>40</MaxHitPoints>
|
||||
<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
|
||||
- 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.
|
||||
|
|
|
@ -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<DNADef>.GetNamedSilentFail(pawn?.def.defName ?? "Human");
|
||||
DNAcache = pawn.def.GetModExtension<PawnDNAModExtention>();
|
||||
if (DNAcache == null)
|
||||
{
|
||||
DNAcache = VariousDefOf.HumanDNA;
|
||||
DNAcache = ThingDefOf.Human.GetModExtension<PawnDNAModExtention>();
|
||||
}
|
||||
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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
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="Cum.cs" />
|
||||
<Compile Include="Dialog_WombStatus.cs" />
|
||||
<Compile Include="DNADef.cs" />
|
||||
<Compile Include="DrugOutcomDoers.cs" />
|
||||
<Compile Include="FilthMaker_Colored.cs" />
|
||||
<Compile Include="HARCompatibility.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
|
||||
{
|
||||
|
|
|
@ -149,7 +149,7 @@ namespace RJW_Menstruation
|
|||
else if (hediff is Hediff_BasePregnancy)
|
||||
{
|
||||
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";
|
||||
else if (h.GestationProgress < 0.3f) icon += "Fetus/Fetus_Early00";
|
||||
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_Climacteric = DefDatabase<HediffDef>.GetNamed("Hediff_Climacteric");
|
||||
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 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");
|
||||
|
|
Loading…
Reference in a new issue