This commit is contained in:
moreoreganostodump 2021-07-05 00:06:31 +09:00
parent 96bca993c7
commit 6d6546a071
7 changed files with 15 additions and 11 deletions

View File

@ -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.4.0</version> <version>1.0.4.2</version>
<dependencies> <dependencies>
</dependencies> </dependencies>
<incompatibleWith /> <incompatibleWith />

Binary file not shown.

View File

@ -1,10 +1,14 @@
Version 1.0.4.2
- fixed errors on hybrid custom
- fixed errors on pregnancy
Version 1.0.4.1 Version 1.0.4.1
- fixed errors when the race mods are uninstalled - fixed errors when the race mods are uninstalled
- minor bug fixes - minor bug fixes
- removed mechanoids from hybrid table - removed mechanoids from hybrid table
- increased probability weight range of custom hybrid - increased probability weight range of custom hybrid
- breasts size increase gradually after pregnancy about one cup - breasts size increase gradually after pregnancy about one cup
Version 1.0.4.0 Version 1.0.4.0
- minor bug fixes - minor bug fixes
- cums will get maximum thickness initially and become thinner gradually - cums will get maximum thickness initially and become thinner gradually

View File

@ -490,10 +490,10 @@ namespace RJW_Menstruation
{ {
PawnKindDef res = null; PawnKindDef res = null;
Pawn opposite = second; Pawn opposite = second;
HybridInformations info = Configurations.HybridOverride.FirstOrDefault(x => x.defName == first.def.defName && x.hybridExtension.Exists(y => y.defName == second.def.defName)); HybridInformations info = Configurations.HybridOverride.FirstOrDefault(x => x.defName == first.def?.defName && (x.hybridExtension?.Exists(y => y.defName == second.def?.defName) ?? false));
if (info == null) if (info == null)
{ {
info = Configurations.HybridOverride.FirstOrDefault(x => x.defName == second.def.defName && x.hybridExtension.Exists(y => y.defName == first.def.defName)); info = Configurations.HybridOverride.FirstOrDefault(x => x.defName == second.def?.defName && (x.hybridExtension?.Exists(y => y.defName == first.def?.defName) ?? false));
opposite = first; opposite = first;
} }

View File

@ -34,7 +34,7 @@ namespace RJW_Menstruation
public class HybridExtension public class HybridExtension
{ {
public Dictionary<string, float> hybridInfo; public Dictionary<string, float> hybridInfo = new Dictionary<string, float>();
public ThingDef thingDef; public ThingDef thingDef;
public HybridExtension() { } public HybridExtension() { }
@ -60,7 +60,6 @@ namespace RJW_Menstruation
public void LoadDataFromXmlCustom(XmlNode xmlRoot) public void LoadDataFromXmlCustom(XmlNode xmlRoot)
{ {
hybridInfo = new Dictionary<string, float>();
DirectXmlCrossRefLoader.RegisterObjectWantsCrossRef(this, "thingDef", xmlRoot.Name); DirectXmlCrossRefLoader.RegisterObjectWantsCrossRef(this, "thingDef", xmlRoot.Name);
XmlNodeList childNodes = xmlRoot.ChildNodes; XmlNodeList childNodes = xmlRoot.ChildNodes;

View File

@ -140,7 +140,7 @@ namespace RJW_Menstruation
Rect outRect = new Rect(inRect.x, inRect.y + 30f, inRect.width, inRect.height - 30f); Rect outRect = new Rect(inRect.x, inRect.y + 30f, inRect.width, inRect.height - 30f);
Rect mainRect = new Rect(inRect.x, inRect.y + 30f, inRect.width - 30f, Math.Max(24f*Configurations.HybridOverride.Count(),10f)); Rect mainRect = new Rect(inRect.x, inRect.y + 30f, inRect.width - 30f, Math.Max(24f*Configurations.HybridOverride?.Count() ?? 1,10f));
Listing_Standard listmain = new Listing_Standard(); Listing_Standard listmain = new Listing_Standard();
listmain.BeginScrollView(outRect, ref scroll, ref mainRect); listmain.BeginScrollView(outRect, ref scroll, ref mainRect);
@ -336,12 +336,12 @@ namespace RJW_Menstruation
float additionalHeight = 0f; float additionalHeight = 0f;
if (!info.hybridExtension.NullOrEmpty()) foreach(HybridExtensionExposable e in info.hybridExtension) if (!info.hybridExtension.NullOrEmpty()) foreach(HybridExtensionExposable e in info.hybridExtension)
{ {
additionalHeight += e.hybridInfo.Count() * rowH; additionalHeight += e.hybridInfo?.Count() ?? 1 * rowH;
} }
Rect outRect = new Rect(inRect.x, inRect.y + 30f, inRect.width, inRect.height - 30f); Rect outRect = new Rect(inRect.x, inRect.y + 30f, inRect.width, inRect.height - 30f);
Rect mainRect = new Rect(inRect.x, inRect.y + 30f, inRect.width - 30f, rowH * info.hybridExtension.Count() + additionalHeight); Rect mainRect = new Rect(inRect.x, inRect.y + 30f, inRect.width - 30f, rowH * info.hybridExtension?.Count() ?? 1 + additionalHeight);
Listing_Standard listmain = new Listing_Standard(); Listing_Standard listmain = new Listing_Standard();
listmain.BeginScrollView(outRect, ref scroll, ref mainRect); listmain.BeginScrollView(outRect, ref scroll, ref mainRect);
@ -351,7 +351,7 @@ namespace RJW_Menstruation
{ {
foreach (HybridExtensionExposable extension in info.hybridExtension) foreach (HybridExtensionExposable extension in info.hybridExtension)
{ {
DoRow(listmain.GetRect(rowH + rowH * extension.hybridInfo.Count()), extension); DoRow(listmain.GetRect(rowH + rowH * extension.hybridInfo?.Count() ?? 1), extension);
} }
} }

View File

@ -184,7 +184,8 @@ namespace RJW_Menstruation
if (!h.babies.NullOrEmpty()) return h.babies.First(); if (!h.babies.NullOrEmpty()) return h.babies.First();
else else
{ {
Log.Error("Baby not exist: baby was not created or removed"); Log.Error("Baby not exist: baby was not created or removed. Remove pregnancy.");
pawn.health.RemoveHediff(hediff);
return null; return null;
} }
} }