Use hediff info in GUI instead of separate strings

This commit is contained in:
amevarashi 2022-06-29 20:59:41 +05:00
parent cbd8ffd203
commit 340d35476a
4 changed files with 5 additions and 19 deletions

View File

@ -79,7 +79,7 @@
<HediffDef ParentName="DrugToleranceBase">
<defName>CumTolerance</defName>
<label>cum addictiveness</label>
<description>cum addictiveness.</description>
<description>More likely to get addicted to cum.</description>
<isBad>false</isBad>
<comps>
<li Class="HediffCompProperties_SeverityPerDay">

View File

@ -45,10 +45,6 @@
<RS_Normal>Normal</RS_Normal>
<RS_Necrophile>Necrophile</RS_Necrophile>
<RS_SexSkill>Sex skill</RS_SexSkill>
<RS_CumAddiction>Cum addiction</RS_CumAddiction>
<RS_CumAddiction_Tooltip>Addicted to cum.</RS_CumAddiction_Tooltip>
<RS_CumAddictiveness>Cum addictiveness</RS_CumAddictiveness>
<RS_CumAddictiveness_Tooltip>More likely to get addicted to cum.</RS_CumAddictiveness_Tooltip>
<RS_NumofTimes>times</RS_NumofTimes>
<RS_Ago>ago</RS_Ago>
<RS_LastSex>last sex</RS_LastSex>

View File

@ -49,10 +49,6 @@ namespace RJWSexperience
public static readonly string RS_Interspecies = "RS_Interspecies".Translate();
public static readonly string RS_Necrophile = "RS_Necrophile".Translate();
public static readonly string RS_SexSkill = "RS_SexSkill".Translate();
public static readonly string RS_CumAddiction = "RS_CumAddiction".Translate();
public static readonly string RS_CumAddiction_Tooltip = "RS_CumAddiction_Tooltip".Translate();
public static readonly string RS_CumAddictiveness = "RS_CumAddictiveness".Translate();
public static readonly string RS_CumAddictiveness_Tooltip = "RS_CumAddictiveness_Tooltip".Translate();
public static readonly string RS_NumofTimes = "RS_NumofTimes".Translate();
public static readonly string RS_Ago = "RS_Ago".Translate();
public static readonly string RS_LastSex = "RS_LastSex".Translate();

View File

@ -420,24 +420,18 @@ namespace RJWSexperience.SexHistory.UI
FillableBarLabeled(listmain.GetRect(FONTHEIGHT), String.Format(Keyed.RS_Cum_Swallowed + ": {0} mL, {1} " + Keyed.RS_NumofTimes, p, pawn.records.GetValue(VariousDefOf.NumofEatenCum)), p / 1000, Texture2D.linearGrayTexture, Texture2D.blackTexture);
listmain.Gap(1f);
Hediff addiction = pawn.health.hediffSet.GetFirstHediffOfDef(VariousDefOf.CumAddiction);
Hediff addiction = pawn.health.hediffSet.GetFirstHediffOfDef(VariousDefOf.CumAddiction)
?? pawn.health.hediffSet.GetFirstHediffOfDef(VariousDefOf.CumTolerance);
if (addiction != null)
{
p = addiction.Severity;
FillableBarLabeled(listmain.GetRect(FONTHEIGHT), String.Format(Keyed.RS_CumAddiction + ": {0:P2}", p), p, Texture2D.linearGrayTexture, Texture2D.blackTexture, Keyed.RS_CumAddiction_Tooltip);
listmain.Gap(1f);
}
else if ((addiction = pawn.health.hediffSet.GetFirstHediffOfDef(VariousDefOf.CumTolerance)) != null)
{
p = addiction.Severity;
FillableBarLabeled(listmain.GetRect(FONTHEIGHT), String.Format(Keyed.RS_CumAddictiveness + ": {0:P}", p), p, Texture2D.linearGrayTexture, Texture2D.blackTexture, Keyed.RS_CumAddictiveness_Tooltip);
listmain.Gap(1f);
FillableBarLabeled(listmain.GetRect(FONTHEIGHT), $"{addiction.Label}: {p.ToStringPercent()}", p, Texture2D.linearGrayTexture, Texture2D.blackTexture, addiction.GetTooltip(pawn, false));
}
else
{
listmain.GetRect(FONTHEIGHT);
listmain.Gap(1f);
}
listmain.Gap(1f);
p = history.RapedCount;
tmp = listmain.GetRect(FONTHEIGHT);