mirror of
https://github.com/amevarashi/RJW-Sexperience.git
synced 2024-08-14 23:54:08 +00:00
Rename SexPartnerHistory to SexHistoryComp
This commit is contained in:
parent
b4231341ff
commit
5130c70655
7 changed files with 16 additions and 18 deletions
|
@ -85,7 +85,7 @@ namespace RJWSexperience
|
|||
{
|
||||
if (pawn.IsVirgin())
|
||||
{
|
||||
SexPartnerHistory history = pawn.TryGetComp<SexPartnerHistory>();
|
||||
SexHistoryComp history = pawn.TryGetComp<SexHistoryComp>();
|
||||
history?.RecordFirst(partner, props);
|
||||
if (RJWUtility.RemoveVirginTrait(pawn, partner, props))
|
||||
{
|
||||
|
|
|
@ -25,7 +25,7 @@ namespace RJWSexperience
|
|||
|
||||
private static void InjectComp(List<ThingDef> PawnDefs)
|
||||
{
|
||||
CompProperties comp = new CompProperties(typeof(SexPartnerHistory));
|
||||
CompProperties comp = new CompProperties(typeof(SexHistoryComp));
|
||||
if (!PawnDefs.NullOrEmpty()) foreach(ThingDef def in PawnDefs)
|
||||
{
|
||||
def.comps.Add(comp);
|
||||
|
|
|
@ -20,7 +20,7 @@ namespace RJWSexperience
|
|||
foreach (Gizmo gizmo in gizmos)
|
||||
yield return gizmo;
|
||||
|
||||
SexPartnerHistory history = pawn.TryGetComp<SexPartnerHistory>();
|
||||
SexHistoryComp history = pawn.TryGetComp<SexHistoryComp>();
|
||||
if (history != null)
|
||||
yield return history.Gizmo;
|
||||
}
|
||||
|
|
|
@ -71,7 +71,7 @@
|
|||
<Compile Include="SexHistory\RecordRandomizer.cs" />
|
||||
<Compile Include="RJWUtility.cs" />
|
||||
<Compile Include="SexHistory\HistoryUtility.cs" />
|
||||
<Compile Include="SexHistory\SexPartnerHistory.cs" />
|
||||
<Compile Include="SexHistory\SexHistoryComp.cs" />
|
||||
<Compile Include="SexHistory\SexPartnerHistoryRecord.cs" />
|
||||
<Compile Include="PawnRelationWorker_Bastard.cs" />
|
||||
<Compile Include="Keyed.cs" />
|
||||
|
|
|
@ -159,7 +159,7 @@ namespace RJWSexperience
|
|||
{
|
||||
if (partner != null)
|
||||
{
|
||||
SexPartnerHistory pawnshistory = pawn.TryGetComp<SexPartnerHistory>();
|
||||
SexHistoryComp pawnshistory = pawn.TryGetComp<SexHistoryComp>();
|
||||
pawnshistory?.RecordSex(partner, props);
|
||||
}
|
||||
}
|
||||
|
@ -168,7 +168,7 @@ namespace RJWSexperience
|
|||
{
|
||||
if (partner != null)
|
||||
{
|
||||
SexPartnerHistory pawnshistory = pawn.TryGetComp<SexPartnerHistory>();
|
||||
SexHistoryComp pawnshistory = pawn.TryGetComp<SexHistoryComp>();
|
||||
pawnshistory?.RecordSatisfaction(partner, props, satisfaction);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,14 +1,12 @@
|
|||
using RimWorld;
|
||||
using rjw;
|
||||
using rjw;
|
||||
using RJWSexperience.ExtensionMethods;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
using Verse;
|
||||
|
||||
namespace RJWSexperience
|
||||
{
|
||||
public class SexPartnerHistory : ThingComp
|
||||
public class SexHistoryComp : ThingComp
|
||||
{
|
||||
public const int ARRLEN = 20;
|
||||
|
||||
|
@ -275,7 +273,7 @@ namespace RJWSexperience
|
|||
if (VirginCheck() && props.sexType == xxx.rjwSextype.Vaginal)
|
||||
{
|
||||
first = partner.ThingID;
|
||||
SexPartnerHistory history = partner.TryGetComp<SexPartnerHistory>();
|
||||
SexHistoryComp history = partner.TryGetComp<SexHistoryComp>();
|
||||
firstSexTickAbs = GenTicks.TicksAbs;
|
||||
history?.TakeSomeonesVirgin(parent as Pawn);
|
||||
}
|
|
@ -56,7 +56,7 @@ namespace RJWSexperience.UI
|
|||
|
||||
protected Pawn pawn;
|
||||
protected SexPartnerHistoryRecord selectedPawn;
|
||||
protected SexPartnerHistory history;
|
||||
protected SexHistoryComp history;
|
||||
protected CompRJW rjwcomp;
|
||||
protected List<SexPartnerHistoryRecord> partnerList;
|
||||
protected PartnerOrderMode orderMode;
|
||||
|
@ -73,7 +73,7 @@ namespace RJWSexperience.UI
|
|||
private static Vector2 LastWindowPosition { get; set; }
|
||||
private Vector2 scroll;
|
||||
|
||||
public SexStatusWindow(Pawn pawn, SexPartnerHistory history)
|
||||
public SexStatusWindow(Pawn pawn, SexHistoryComp history)
|
||||
{
|
||||
this.pawn = pawn;
|
||||
this.history = history;
|
||||
|
@ -120,7 +120,7 @@ namespace RJWSexperience.UI
|
|||
Pawn p = selected.First();
|
||||
if (p != pawn)
|
||||
{
|
||||
SexPartnerHistory h = p.TryGetComp<SexPartnerHistory>();
|
||||
SexHistoryComp h = p.TryGetComp<SexHistoryComp>();
|
||||
if (h != null) ChangePawn(p, h);
|
||||
}
|
||||
}
|
||||
|
@ -129,7 +129,7 @@ namespace RJWSexperience.UI
|
|||
DrawSexStatus(inRect, history);
|
||||
}
|
||||
|
||||
public static void ToggleWindow(Pawn pawn, SexPartnerHistory history)
|
||||
public static void ToggleWindow(Pawn pawn, SexHistoryComp history)
|
||||
{
|
||||
SexStatusWindow window = (SexStatusWindow)Find.WindowStack.Windows.FirstOrDefault(x => x.GetType() == typeof(SexStatusWindow));
|
||||
if (window != null)
|
||||
|
@ -146,7 +146,7 @@ namespace RJWSexperience.UI
|
|||
}
|
||||
}
|
||||
|
||||
public void ChangePawn(Pawn pawn, SexPartnerHistory history)
|
||||
public void ChangePawn(Pawn pawn, SexHistoryComp history)
|
||||
{
|
||||
List<Pawn> selected = Find.Selector.SelectedPawns;
|
||||
if (!selected.NullOrEmpty())
|
||||
|
@ -189,7 +189,7 @@ namespace RJWSexperience.UI
|
|||
/// <summary>
|
||||
/// Main contents
|
||||
/// </summary>
|
||||
protected void DrawSexStatus(Rect mainrect, SexPartnerHistory history)
|
||||
protected void DrawSexStatus(Rect mainrect, SexHistoryComp history)
|
||||
{
|
||||
float sectionwidth = mainrect.width / 3;
|
||||
|
||||
|
@ -228,7 +228,7 @@ namespace RJWSexperience.UI
|
|||
Widgets.DrawHighlightIfMouseover(portraitRect);
|
||||
if (Widgets.ButtonInvisible(portraitRect))
|
||||
{
|
||||
SexPartnerHistory pawnhistory = partner?.TryGetComp<SexPartnerHistory>();
|
||||
SexHistoryComp pawnhistory = partner?.TryGetComp<SexHistoryComp>();
|
||||
if (pawnhistory != null)
|
||||
{
|
||||
ChangePawn(partner, pawnhistory);
|
||||
|
|
Loading…
Reference in a new issue