mirror of
https://gitgud.io/lutepickle/rjw_menstruation.git
synced 2024-08-14 22:46:52 +00:00
Hide name if parent unknown
This commit is contained in:
parent
b0984f6d61
commit
a884ab2652
4 changed files with 25 additions and 19 deletions
|
@ -27,6 +27,7 @@
|
|||
<Dialog_WombInfo09></Dialog_WombInfo09>
|
||||
<Dialog_DoCleanWomb_Tooltip>Gather cums into bucket</Dialog_DoCleanWomb_Tooltip>
|
||||
<Dialog_DontCleanWomb_Tooltip>Store cums in womb</Dialog_DontCleanWomb_Tooltip>
|
||||
<Dialog_FatherUnknown>Unknown</Dialog_FatherUnknown>
|
||||
|
||||
<Option1_Label_1>enable womb icon</Option1_Label_1>
|
||||
<Option1_Label_2>enable button in health tab</Option1_Label_2>
|
||||
|
|
|
@ -87,26 +87,25 @@ namespace RJW_Menstruation
|
|||
|
||||
public string GetFatherInfo()
|
||||
{
|
||||
if (babies.NullOrEmpty())
|
||||
return "Null";
|
||||
|
||||
string res = Translations.Dialog_WombInfo03 + ": ";
|
||||
if (!babies.NullOrEmpty())
|
||||
|
||||
if (!is_parent_known && Configurations.InfoDetail != Configurations.DetailLevel.All)
|
||||
return res + Translations.Dialog_FatherUnknown;
|
||||
|
||||
var babiesdistinct = babies.Distinct(new FatherComparer(pawn));
|
||||
int iteration = 0;
|
||||
foreach (Pawn baby in babiesdistinct)
|
||||
{
|
||||
|
||||
var babiesdistinct = babies.Distinct(new FatherComparer(pawn));
|
||||
int iteration = 0;
|
||||
foreach (Pawn baby in babiesdistinct)
|
||||
{
|
||||
if (iteration > 0) res += ", ";
|
||||
res += Utility.GetFather(baby, pawn)?.LabelShort ?? "Unknown";
|
||||
iteration++;
|
||||
}
|
||||
return res;
|
||||
if (iteration > 0) res += ", ";
|
||||
res += Utility.GetFather(baby, pawn)?.LabelShort ?? Translations.Dialog_FatherUnknown;
|
||||
iteration++;
|
||||
}
|
||||
return "Null";
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private void HumanlikeBirth(Pawn baby, List<Pawn> siblings)
|
||||
{
|
||||
Pawn mother = pawn; Pawn father = Utility.GetFather(baby, pawn);
|
||||
|
|
|
@ -21,6 +21,7 @@ namespace RJW_Menstruation
|
|||
public static readonly string Button_MilkTooltip = "Button_MilkTooltip".Translate();
|
||||
public static readonly string Dialog_DoCleanWomb_Tooltip = "Dialog_DoCleanWomb_Tooltip".Translate();
|
||||
public static readonly string Dialog_DontCleanWomb_Tooltip = "Dialog_DontCleanWomb_Tooltip".Translate();
|
||||
public static readonly string Dialog_FatherUnknown = "Dialog_FatherUnknown".Translate();
|
||||
|
||||
public static readonly string Dialog_WombInfo01 = "Dialog_WombInfo01".Translate();
|
||||
public static readonly string Dialog_WombInfo02 = "Dialog_WombInfo02".Translate();
|
||||
|
|
|
@ -191,17 +191,22 @@ namespace RJW_Menstruation
|
|||
Pawn fetus = pawn.GetFetus();
|
||||
if (fetus != null && Utility.ShowFetusInfo())
|
||||
{
|
||||
|
||||
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;
|
||||
|
||||
GUI.Box(preginfo, b.babies.Count + " " + fetus.def.label + " " + Translations.Dialog_WombInfo02, buttonstyle);
|
||||
GUI.Label(preginfo, Translations.Dialog_WombInfo03 + ": " + b.father.LabelShort + " ", fontstyleright);
|
||||
}
|
||||
string father;
|
||||
|
||||
if (!b.is_parent_known && Configurations.InfoDetail != Configurations.DetailLevel.All)
|
||||
father = Translations.Dialog_FatherUnknown;
|
||||
else
|
||||
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);
|
||||
}
|
||||
}
|
||||
else cum = ContentFinder<Texture2D>.Get(("Womb/Empty"), true);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue