Remove HistoryUtility.GetPartnerHistory

This commit is contained in:
amevarashi 2022-05-14 19:02:43 +05:00
parent 0c7a762b9e
commit 257d86a416
4 changed files with 54 additions and 70 deletions

View File

@ -85,7 +85,7 @@ namespace RJWSexperience
{
if (pawn.IsVirgin())
{
SexPartnerHistory history = pawn.GetPartnerHistory();
SexPartnerHistory history = pawn.TryGetComp<SexPartnerHistory>();
history?.RecordFirst(partner, props);
if (RJWUtility.RemoveVirginTrait(pawn, partner, props))
{

View File

@ -20,7 +20,7 @@ namespace RJWSexperience
foreach (Gizmo gizmo in gizmos)
yield return gizmo;
SexPartnerHistory history = pawn.GetPartnerHistory();
SexPartnerHistory history = pawn.TryGetComp<SexPartnerHistory>();
if (history != null)
yield return history.Gizmo;
}

View File

@ -160,7 +160,7 @@ namespace RJWSexperience
if (partner != null)
{
SexPartnerHistory pawnshistory = pawn.TryGetComp<SexPartnerHistory>();
pawnshistory?.RecordHistory(partner, props);
pawnshistory?.RecordSex(partner, props);
}
}
@ -169,7 +169,7 @@ namespace RJWSexperience
if (partner != null)
{
SexPartnerHistory pawnshistory = pawn.TryGetComp<SexPartnerHistory>();
pawnshistory?.RecordSatisfactionHistory(partner, props, satisfaction);
pawnshistory?.RecordSatisfaction(partner, props, satisfaction);
}
}

View File

@ -1,12 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using RimWorld;
using UnityEngine;
using Verse;
using rjw;
using UnityEngine;
namespace RJWSexperience
{
@ -26,8 +19,8 @@ namespace RJWSexperience
public static readonly Texture2D Nurgle = SolidColorMaterials.NewSolidColorTexture(0.6f, 0.83f, 0.35f, 1.0f);
public static readonly Texture2D Partners = SolidColorMaterials.NewSolidColorTexture(0.843f, 0.474f, 0.6f, 1.0f);
public static readonly Texture2D TotalSex = SolidColorMaterials.NewSolidColorTexture(0.878f, 0.674f, 0.411f, 1.0f);
public static readonly Texture2D Satisfaction = SolidColorMaterials.NewSolidColorTexture(0.325f, 0.815f, 0.729f,1.0f);
public static readonly Color HistoryColor = new Color(0.9f,0.5f,0.5f);
public static readonly Texture2D Satisfaction = SolidColorMaterials.NewSolidColorTexture(0.325f, 0.815f, 0.729f, 1.0f);
public static readonly Color HistoryColor = new Color(0.9f, 0.5f, 0.5f);
public static readonly Texture2D[] SextypeColor = new Texture2D[]
{
@ -56,18 +49,9 @@ namespace RJWSexperience
public static readonly Texture2D[] PassionBG = new Texture2D[]
{
Texture2D.blackTexture, //None = 0,
SolidColorMaterials.NewSolidColorTexture(0.800f, 0.800f, 0.800f, 1.0f), //Minor = 1,
SolidColorMaterials.NewSolidColorTexture(1.000f, 0.875f, 0.000f, 1.0f) //Major = 2,
};
public static SexPartnerHistory GetPartnerHistory(this Pawn pawn)
{
return pawn.TryGetComp<SexPartnerHistory>();
}
}
}