mirror of
https://gitgud.io/lutepickle/rjw_menstruation.git
synced 2026-08-22 03:35:10 +00:00
Compare commits
3 commits
217352cb36
...
222507ad2f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
222507ad2f | ||
|
|
5c83c807a3 | ||
|
|
ab957c790b |
4 changed files with 49 additions and 36 deletions
|
|
@ -1971,7 +1971,7 @@ namespace RJW_Menstruation
|
|||
}
|
||||
}
|
||||
|
||||
protected float InterspeciesImplantFactor(Pawn fertilizer)
|
||||
public float InterspeciesImplantFactor(Pawn fertilizer)
|
||||
{
|
||||
if (fertilizer.def.defName == Pawn.def.defName) return 1.0f;
|
||||
else
|
||||
|
|
|
|||
|
|
@ -32,9 +32,6 @@ namespace RJW_Menstruation
|
|||
private Texture2D anal;
|
||||
private Color cumcolor;
|
||||
|
||||
private static GUIStyle fontstylecenter = null;
|
||||
private static GUIStyle fontstyleright = null;
|
||||
private static GUIStyle fontstyleleft = null;
|
||||
private static GUIStyle boxstyle = null;
|
||||
private static GUIStyle buttonstyle = null;
|
||||
|
||||
|
|
@ -140,9 +137,6 @@ namespace RJW_Menstruation
|
|||
public override void PreOpen()
|
||||
{
|
||||
base.PreOpen();
|
||||
if (fontstylecenter == null) fontstylecenter = new GUIStyle() { alignment = TextAnchor.MiddleCenter };
|
||||
if (fontstyleright == null) fontstyleright = new GUIStyle() { alignment = TextAnchor.MiddleRight };
|
||||
if (fontstyleleft == null) fontstyleleft = new GUIStyle() { alignment = TextAnchor.MiddleLeft };
|
||||
if (boxstyle == null) boxstyle = new GUIStyle(GUI.skin.textArea);
|
||||
if (buttonstyle == null) buttonstyle = new GUIStyle(GUI.skin.button);
|
||||
}
|
||||
|
|
@ -158,8 +152,6 @@ namespace RJW_Menstruation
|
|||
buttonstyle.hover = buttonstyle.normal;
|
||||
boxstyle.border.left = 4; boxstyle.border.right = 4; boxstyle.border.bottom = 4; boxstyle.border.top = 4;
|
||||
|
||||
fontstyleleft.normal.textColor = Color.white;
|
||||
|
||||
float preginfoheight = 0f;
|
||||
Hediff hediff = comp.Pregnancy;
|
||||
if (hediff != null && Utility.ShowFetusImage(hediff))
|
||||
|
|
@ -174,22 +166,24 @@ namespace RJW_Menstruation
|
|||
{
|
||||
string feinfo = PregnancyCommon.GetBabyInfo(m.babies);
|
||||
string fainfo = PregnancyCommon.GetFatherInfo(m.babies, m.pawn, m.is_parent_known) + " ";
|
||||
TextAnchor faAnchor;
|
||||
if (feinfo.Length + fainfo.Length > 45)
|
||||
{
|
||||
preginfoheight = fontheight + 2;
|
||||
buttonstyle.alignment = TextAnchor.UpperLeft;
|
||||
fontstyleright.alignment = TextAnchor.LowerRight;
|
||||
faAnchor = TextAnchor.LowerRight;
|
||||
}
|
||||
else
|
||||
{
|
||||
preginfoheight = fontheight;
|
||||
buttonstyle.alignment = TextAnchor.MiddleLeft;
|
||||
|
||||
faAnchor = TextAnchor.MiddleRight;
|
||||
}
|
||||
Rect preginfo = new Rect(0f, mainRect.yMax - wombRectHeight - 2, wombRectWidth, preginfoheight);
|
||||
fontstyleright.normal.textColor = Color.white;
|
||||
GUI.Box(preginfo, feinfo, buttonstyle);
|
||||
GUI.Label(preginfo, fainfo, fontstyleright);
|
||||
Text.Anchor = faAnchor;
|
||||
Widgets.Label(preginfo, fainfo);
|
||||
GenUI.ResetLabelAlign();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -202,8 +196,6 @@ namespace RJW_Menstruation
|
|||
{
|
||||
preginfoheight = fontheight;
|
||||
Rect preginfo = new Rect(0f, mainRect.yMax - wombRectHeight - 2, wombRectWidth, preginfoheight);
|
||||
fontstyleright.normal.textColor = Color.white;
|
||||
fontstyleright.alignment = TextAnchor.MiddleRight;
|
||||
buttonstyle.alignment = TextAnchor.MiddleLeft;
|
||||
|
||||
string father;
|
||||
|
|
@ -214,7 +206,9 @@ namespace RJW_Menstruation
|
|||
father = b.father.LabelShort;
|
||||
|
||||
GUI.Box(preginfo, b.babies.Count + " " + fetus.def.label + " " + Translations.Dialog_WombInfo02, buttonstyle);
|
||||
GUI.Label(preginfo, Translations.Dialog_WombInfo03 + ": " + father + " ", fontstyleright);
|
||||
Text.Anchor = TextAnchor.MiddleRight;
|
||||
Widgets.Label(preginfo, Translations.Dialog_WombInfo03 + ": " + father + " ");
|
||||
GenUI.ResetLabelAlign();
|
||||
}
|
||||
}
|
||||
else if (hediff is HediffWithParents p)
|
||||
|
|
@ -234,23 +228,26 @@ namespace RJW_Menstruation
|
|||
fainfo = Translations.Dialog_WombInfo03 + ": " + father + " ";
|
||||
}
|
||||
|
||||
TextAnchor faAnchor;
|
||||
|
||||
if (feinfo.Length + fainfo.Length > 45)
|
||||
{
|
||||
preginfoheight = fontheight + 2;
|
||||
buttonstyle.alignment = TextAnchor.UpperLeft;
|
||||
fontstyleright.alignment = TextAnchor.LowerRight;
|
||||
faAnchor = TextAnchor.LowerRight;
|
||||
}
|
||||
else
|
||||
{
|
||||
preginfoheight = fontheight;
|
||||
buttonstyle.alignment = TextAnchor.MiddleLeft;
|
||||
|
||||
faAnchor = TextAnchor.MiddleRight;
|
||||
}
|
||||
|
||||
Rect preginfo = new Rect(0f, mainRect.yMax - wombRectHeight - 2, wombRectWidth, preginfoheight);
|
||||
fontstyleright.normal.textColor = Color.white;
|
||||
GUI.Box(preginfo, feinfo, buttonstyle);
|
||||
GUI.Label(preginfo, fainfo, fontstyleright);
|
||||
Text.Anchor = faAnchor;
|
||||
Widgets.Label(preginfo, fainfo);
|
||||
GenUI.ResetLabelAlign();
|
||||
}
|
||||
}
|
||||
else cum = ContentFinder<Texture2D>.Get(("Womb/Empty"), true);
|
||||
|
|
@ -268,11 +265,13 @@ namespace RJW_Menstruation
|
|||
{
|
||||
naked = !naked;
|
||||
}
|
||||
Rect pawnLabelRect = new Rect(0, pawnRectHeight, pawnRectWidth, fontheight - 10);
|
||||
Rect pawnLabel2Rect = new Rect(0, pawnRectHeight + fontheight - 10, pawnRectWidth, fontheight - 10);
|
||||
fontstylecenter.normal.textColor = pawn.DrawColor;
|
||||
GUI.Label(pawnLabelRect, pawn.Name?.ToStringFull ?? pawn.Label, fontstylecenter);
|
||||
if (pawn.story != null) GUI.Label(pawnLabel2Rect, pawn.ageTracker.AgeBiologicalYears + ", " + pawn.story.Title, fontstylecenter);
|
||||
string pawnLabel = pawn.Name?.ToStringFull ?? pawn.Label;
|
||||
if (pawn.story != null) pawnLabel += "\n" + pawn.ageTracker.AgeBiologicalYears + ", " + pawn.story.Title;
|
||||
Rect pawnLabelRect = new Rect(0, pawnRectHeight, pawnRectWidth, Text.CalcHeight(pawnLabel, pawnRectWidth));
|
||||
GUI.color = pawn.DrawColor;
|
||||
Text.Anchor = TextAnchor.UpperCenter;
|
||||
Widgets.Label(pawnLabelRect, pawnLabel);
|
||||
GenUI.ResetLabelAlign();
|
||||
GUI.color = Color.white;
|
||||
|
||||
|
||||
|
|
@ -305,12 +304,14 @@ namespace RJW_Menstruation
|
|||
TooltipHandler.TipRegion(wombInfoRect, comp.GetCurStageDesc);
|
||||
|
||||
|
||||
fontstyleright.normal.textColor = Color.red;
|
||||
fontstyleright.alignment = TextAnchor.MiddleRight;
|
||||
GUI.color = Color.red;
|
||||
Text.Anchor = TextAnchor.MiddleRight;
|
||||
//if (comp.GetFertilization) GUI.Label(wombInfoRect, Translations.Dialog_WombInfo05 + " ", fontstyleright);
|
||||
//else if (comp.GetEggFertilizing) GUI.Label(wombInfoRect, Translations.Dialog_WombInfo06 + " ", fontstyleright);
|
||||
//else if (comp.GetEgg) GUI.Label(wombInfoRect, Translations.Dialog_WombInfo07 + " ", fontstyleright);
|
||||
GUI.Label(wombInfoRect, comp.GetFertilizingInfo + " ", fontstyleright);
|
||||
Widgets.Label(wombInfoRect, comp.GetFertilizingInfo + " ");
|
||||
GenUI.ResetLabelAlign();
|
||||
GUI.color = Color.white;
|
||||
|
||||
|
||||
//Widgets.Label(wombInfoRect,Translations.Dialog_WombInfo01 + ": " + comp.GetCurStageLabel);
|
||||
|
|
@ -385,9 +386,11 @@ namespace RJW_Menstruation
|
|||
|
||||
private void DrawVagina(Rect rect, HediffComp_Menstruation comp)
|
||||
{
|
||||
string vaginaLabel = pawn.GetVaginaLabel();
|
||||
string anusLabel = pawn.GetAnusLabel();
|
||||
Rect genitalIconRect = new Rect(rect.x, rect.y + fontheight, genitalRectWidth, genitalRectHeight);
|
||||
Rect genitalVaginaLabelRect = new Rect(rect.x, rect.y + 10f, genitalRectWidth, fontheight);
|
||||
Rect genitalAnusLabelRect = new Rect(rect.x, rect.y + fontheight + genitalRectHeight, genitalRectWidth, fontheight);
|
||||
Rect genitalVaginaLabelRect = rect.TopPartPixels(Text.CalcHeight(vaginaLabel, genitalRectWidth));
|
||||
Rect genitalAnusLabelRect = rect.BottomPartPixels(Text.CalcHeight(anusLabel, genitalRectWidth));
|
||||
|
||||
vagina = pawn.GetGenitalIcon(comp);
|
||||
anal = pawn.GetAnalIcon(comp);
|
||||
|
|
@ -400,14 +403,18 @@ namespace RJW_Menstruation
|
|||
GUI.DrawTexture(genitalIconRect, vagina, ScaleMode.ScaleToFit);
|
||||
|
||||
GUI.color = Color.white;
|
||||
GUI.Label(genitalVaginaLabelRect, pawn.GetVaginaLabel(), fontstylecenter);
|
||||
GUI.Label(genitalAnusLabelRect, pawn.GetAnusLabel(), fontstylecenter);
|
||||
Text.Anchor = TextAnchor.MiddleCenter;
|
||||
Widgets.Label(genitalVaginaLabelRect, vaginaLabel);
|
||||
Text.Anchor = TextAnchor.LowerCenter;
|
||||
Widgets.Label(genitalAnusLabelRect, anusLabel);
|
||||
GenUI.ResetLabelAlign();
|
||||
}
|
||||
|
||||
private void DrawBreast(Rect rect)
|
||||
{
|
||||
string breastLabel = pawn.GetBreastLabel();
|
||||
Rect BreastIconRect = new Rect(rect.x, rect.y + fontheight, breastRectWidth, breastRectHeight);
|
||||
Rect BreastLabelRect = new Rect(rect.x, rect.y, breastRectWidth, fontheight);
|
||||
Rect BreastLabelRect = rect.TopPartPixels(Text.CalcHeight(breastLabel, breastRectWidth));
|
||||
Rect MilkGaugeRect = new Rect(rect.x, rect.yMax, breastRectWidth, 20f);
|
||||
|
||||
GUI.color = new Color(1.00f, 0.47f, 0.47f, 1);
|
||||
|
|
@ -419,7 +426,9 @@ namespace RJW_Menstruation
|
|||
|
||||
|
||||
GUI.color = Color.white;
|
||||
GUI.Label(BreastLabelRect, pawn.GetBreastLabel(), fontstylecenter);
|
||||
Text.Anchor = TextAnchor.MiddleCenter;
|
||||
Widgets.Label(BreastLabelRect, breastLabel);
|
||||
GenUI.ResetLabelAlign();
|
||||
|
||||
pawn.DrawMilkBars(MilkGaugeRect);
|
||||
|
||||
|
|
@ -469,7 +478,9 @@ namespace RJW_Menstruation
|
|||
private void FillableBarLabeled(Rect rect, string label, float fillPercent, Texture2D filltexture, Texture2D bgtexture, string tooltip = null)
|
||||
{
|
||||
Widgets.FillableBar(rect, Math.Min(fillPercent, 1.0f), filltexture, bgtexture, true);
|
||||
GUI.Label(rect, label, fontstyleleft);
|
||||
Text.Anchor = TextAnchor.MiddleLeft;
|
||||
Widgets.Label(rect, label);
|
||||
GenUI.ResetLabelAlign();
|
||||
Widgets.DrawHighlightIfMouseover(rect);
|
||||
if (tooltip != null) TooltipHandler.TipRegion(rect, tooltip);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<Manifest>
|
||||
<identifier>RJW Menstruation</identifier>
|
||||
<version>1.6.2.4</version>
|
||||
<version>1.6.2.5</version>
|
||||
<dependencies>
|
||||
</dependencies>
|
||||
<incompatibleWith />
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
Version 1.6.2.5
|
||||
|
||||
Version 1.6.2.4
|
||||
- Fix error on startup and missing womb status in RJW tab with RJW 6.1.4.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue