Compare commits

...

4 Commits

Author SHA1 Message Date
amevarashi 37927f19b3
Merge pull request #12 from Angedore/virginityadditionalremovers
additional sex acts remove the virginity trait
2024-04-30 13:09:57 +05:00
Angedore 25a4e0786c - fisting removes the virginity of the receiving virgin female partner 2023-12-03 12:24:42 +01:00
Angedore b6d34be263 - configurable virginity removal for male/male for anal sex
- configurable virginity removal for female/female scissoring sex
- added double penetration to actions for virginity removal
2023-12-03 12:24:28 +01:00
amevarashi 190c6fc3d6 Fixed some labels in SexStatusWindow not respecting custom fonts 2023-10-28 12:58:02 +05:00
9 changed files with 101 additions and 29 deletions

Binary file not shown.

View File

@ -85,6 +85,10 @@
<RSOption_EnableSexHistory_Desc>* Needs a game restart\n\nEnables Sex History window, information collection for the said window and save/load of this information. Also enables sex partners count in the pawn's records.\n\n[Caution] Disabling this mid save will result in the loss of previously collected histories.</RSOption_EnableSexHistory_Desc> <RSOption_EnableSexHistory_Desc>* Needs a game restart\n\nEnables Sex History window, information collection for the said window and save/load of this information. Also enables sex partners count in the pawn's records.\n\n[Caution] Disabling this mid save will result in the loss of previously collected histories.</RSOption_EnableSexHistory_Desc>
<RSOption_HideGizmoWhenDrafted_Label>Hide Sex History button when drafted</RSOption_HideGizmoWhenDrafted_Label> <RSOption_HideGizmoWhenDrafted_Label>Hide Sex History button when drafted</RSOption_HideGizmoWhenDrafted_Label>
<RSOption_HideGizmoWhenDrafted_Desc>Hides Sex History Gizmo for currently drafted pawns</RSOption_HideGizmoWhenDrafted_Desc> <RSOption_HideGizmoWhenDrafted_Desc>Hides Sex History Gizmo for currently drafted pawns</RSOption_HideGizmoWhenDrafted_Desc>
<RSOption_VirginityCheck_M2M_Label>Remove virginity with anal sex (for male/male sex)</RSOption_VirginityCheck_M2M_Label>
<RSOption_VirginityCheck_M2M_Desc>Remove virginity with anal sex (for male/male sex)</RSOption_VirginityCheck_M2M_Desc>
<RSOption_VirginityCheck_F2F_Label>Remove virginity with scissoring sex (for female/female sex)</RSOption_VirginityCheck_F2F_Label>
<RSOption_VirginityCheck_F2F_Desc>Remove virginity with scissoring sex (for female/female sex)</RSOption_VirginityCheck_F2F_Desc>
<!-- Mod settings: Debug --> <!-- Mod settings: Debug -->
<RSOption_Debug_Label>Debug</RSOption_Debug_Label> <RSOption_Debug_Label>Debug</RSOption_Debug_Label>

View File

@ -25,6 +25,9 @@ namespace RJWSexperience
public readonly SettingHandle<bool> EnableSexHistory = new SettingHandle<bool>("EnableSexHistory", true); public readonly SettingHandle<bool> EnableSexHistory = new SettingHandle<bool>("EnableSexHistory", true);
public readonly SettingHandle<bool> HideGizmoWhenDrafted = new SettingHandle<bool>("HideGizmoWhenDrafted", true); public readonly SettingHandle<bool> HideGizmoWhenDrafted = new SettingHandle<bool>("HideGizmoWhenDrafted", true);
public readonly SettingHandle<bool> VirginityCheck_M2M_Anal = new SettingHandle<bool>("VirginityCheck_M2M_Anal", true);
public readonly SettingHandle<bool> VirginityCheck_F2F_Scissoring = new SettingHandle<bool>("VirginityCheck_F2F_Scissoring", false);
public readonly SettingHandle<bool> DevMode = new SettingHandle<bool>("DevMode", false); public readonly SettingHandle<bool> DevMode = new SettingHandle<bool>("DevMode", false);
public readonly SettingHandle<bool> SelectionLocked = new SettingHandle<bool>("SelectionLocked", false); public readonly SettingHandle<bool> SelectionLocked = new SettingHandle<bool>("SelectionLocked", false);

View File

@ -98,6 +98,10 @@ namespace RJWSexperience
public static readonly string Option_HideGizmoWithRJW_Label = "RSOption_HideGizmoWithRJW_Label".Translate(); public static readonly string Option_HideGizmoWithRJW_Label = "RSOption_HideGizmoWithRJW_Label".Translate();
public static readonly string Option_HideGizmoWithRJW_Desc = "RSOption_HideGizmoWithRJW_Desc".Translate(); public static readonly string Option_HideGizmoWithRJW_Desc = "RSOption_HideGizmoWithRJW_Desc".Translate();
public static readonly string Button_ResetToDefault = "Button_ResetToDefault".Translate(); public static readonly string Button_ResetToDefault = "Button_ResetToDefault".Translate();
public static readonly string Option_VirginityCheck_M2M_Label = "RSOption_VirginityCheck_M2M_Label".Translate();
public static readonly string Option_VirginityCheck_M2M_Desc = "RSOption_VirginityCheck_M2M_Desc".Translate();
public static readonly string Option_VirginityCheck_F2F_Label = "RSOption_VirginityCheck_F2F_Label".Translate();
public static readonly string Option_VirginityCheck_F2F_Desc = "RSOption_VirginityCheck_F2F_Desc".Translate();
public static string Translate(this PartnerOrderMode mode) public static string Translate(this PartnerOrderMode mode)
{ {

View File

@ -94,10 +94,43 @@ namespace RJWSexperience
{ {
public static void Postfix(JobDriver_SexBaseInitiator __instance) public static void Postfix(JobDriver_SexBaseInitiator __instance)
{ {
if (__instance.Sexprops.hasPartner() && __instance.Sexprops.sexType == xxx.rjwSextype.Vaginal) if (__instance.Sexprops.hasPartner())
{ {
__instance.pawn.TryRemoveVirginity(__instance.Partner, __instance.Sexprops); // remove hetero virginity
__instance.Partner.TryRemoveVirginity(__instance.pawn, __instance.Sexprops); if((__instance.Sexprops.sexType == xxx.rjwSextype.Vaginal || __instance.Sexprops.sexType == xxx.rjwSextype.DoublePenetration))
{
__instance.pawn.TryRemoveVirginity(__instance.Partner, __instance.Sexprops);
__instance.Partner.TryRemoveVirginity(__instance.pawn, __instance.Sexprops);
} else if(__instance.Sexprops.sexType == xxx.rjwSextype.Fisting)
{
//check if receiver is a virgin female..
Pawn receiver = __instance.Sexprops.IsInitiator() ? __instance.Partner : __instance.pawn;
if (receiver != null && receiver.gender == Gender.Female && receiver.IsVirgin())
{
Pawn initiator = __instance.Sexprops.IsInitiator() ? __instance.pawn : __instance.Partner;
receiver.TryRemoveVirginity(initiator, __instance.Sexprops);
}
}
else
{
// check if both pawn are male -> anal used as alternative virginity remover
if(SexperienceMod.Settings.VirginityCheck_M2M_Anal &&
__instance.Sexprops.sexType == xxx.rjwSextype.Anal
&& __instance.pawn.gender == Gender.Male && __instance.Partner.gender == Gender.Male)
{
__instance.pawn.TryRemoveVirginity(__instance.Partner, __instance.Sexprops);
__instance.Partner.TryRemoveVirginity(__instance.pawn, __instance.Sexprops);
}
// check if both pawn are female -> scissoring used as alternative virginity remover
if(SexperienceMod.Settings.VirginityCheck_F2F_Scissoring &&
__instance.Sexprops.sexType == xxx.rjwSextype.Scissoring
&& __instance.pawn.gender == Gender.Female && __instance.Partner.gender == Gender.Female)
{
__instance.pawn.TryRemoveVirginity(__instance.Partner, __instance.Sexprops);
__instance.Partner.TryRemoveVirginity(__instance.pawn, __instance.Sexprops);
}
}
} }
} }
} }

View File

@ -31,7 +31,9 @@ namespace RJWSexperience.Settings
settings.VirginRatio, settings.VirginRatio,
settings.SlavesBeenRapedExp, settings.SlavesBeenRapedExp,
settings.EnableSexHistory, settings.EnableSexHistory,
settings.HideGizmoWhenDrafted settings.HideGizmoWhenDrafted,
settings.VirginityCheck_M2M_Anal,
settings.VirginityCheck_F2F_Scissoring
} }
); );
} }

View File

@ -21,7 +21,9 @@ namespace RJWSexperience.Settings
settings.VirginRatio, settings.VirginRatio,
settings.SlavesBeenRapedExp, settings.SlavesBeenRapedExp,
settings.EnableSexHistory, settings.EnableSexHistory,
settings.HideGizmoWhenDrafted settings.HideGizmoWhenDrafted,
settings.VirginityCheck_M2M_Anal,
settings.VirginityCheck_F2F_Scissoring
} }
) { } ) { }
@ -63,6 +65,9 @@ namespace RJWSexperience.Settings
{ {
listmain.CheckboxLabeled(Keyed.Option_HideGizmoWhenDrafted_Label, settings.HideGizmoWhenDrafted, Keyed.Option_HideGizmoWhenDrafted_Desc); listmain.CheckboxLabeled(Keyed.Option_HideGizmoWhenDrafted_Label, settings.HideGizmoWhenDrafted, Keyed.Option_HideGizmoWhenDrafted_Desc);
} }
listmain.CheckboxLabeled(Keyed.Option_VirginityCheck_M2M_Label, settings.VirginityCheck_M2M_Anal, Keyed.Option_VirginityCheck_M2M_Desc);
listmain.CheckboxLabeled(Keyed.Option_VirginityCheck_F2F_Label, settings.VirginityCheck_F2F_Scissoring, Keyed.Option_VirginityCheck_F2F_Label);
if (listmain.ButtonText(Keyed.Button_ResetToDefault)) if (listmain.ButtonText(Keyed.Button_ResetToDefault))
{ {

View File

@ -15,6 +15,8 @@ namespace RJWSexperience.Settings
settings.LustLimit, settings.LustLimit,
settings.MaxSingleLustChange, settings.MaxSingleLustChange,
settings.SexCanFillBuckets, settings.SexCanFillBuckets,
settings.VirginityCheck_M2M_Anal,
settings.VirginityCheck_F2F_Scissoring
} }
) { } ) { }
@ -27,6 +29,8 @@ namespace RJWSexperience.Settings
listmain.SliderOption(Keyed.Option_MaxSingleLustChange_Label + " {0}", Keyed.Option_MaxSingleLustChange_Desc, settings.MaxSingleLustChange, new FloatRange(0f, 10f), 0.05f); listmain.SliderOption(Keyed.Option_MaxSingleLustChange_Label + " {0}", Keyed.Option_MaxSingleLustChange_Desc, settings.MaxSingleLustChange, new FloatRange(0f, 10f), 0.05f);
listmain.CheckboxLabeled(Keyed.Option_EnableBastardRelation_Label, settings.EnableBastardRelation, Keyed.Option_EnableBastardRelation_Desc); listmain.CheckboxLabeled(Keyed.Option_EnableBastardRelation_Label, settings.EnableBastardRelation, Keyed.Option_EnableBastardRelation_Desc);
listmain.CheckboxLabeled(Keyed.Option_SexCanFillBuckets_Label, settings.SexCanFillBuckets, Keyed.Option_SexCanFillBuckets_Desc); listmain.CheckboxLabeled(Keyed.Option_SexCanFillBuckets_Label, settings.SexCanFillBuckets, Keyed.Option_SexCanFillBuckets_Desc);
listmain.CheckboxLabeled(Keyed.Option_VirginityCheck_M2M_Label, settings.VirginityCheck_M2M_Anal, Keyed.Option_VirginityCheck_M2M_Desc);
listmain.CheckboxLabeled(Keyed.Option_VirginityCheck_F2F_Label, settings.VirginityCheck_F2F_Scissoring, Keyed.Option_VirginityCheck_F2F_Desc);
if (settings.DevMode) if (settings.DevMode)
LustUtility.DrawGraph(listmain.GetRect(300f)); LustUtility.DrawGraph(listmain.GetRect(300f));

View File

@ -17,9 +17,6 @@ namespace RJWSexperience.SexHistory.UI
public const float BASESAT = UIUtility.BASESAT; public const float BASESAT = UIUtility.BASESAT;
public const float ICONSIZE = UIUtility.ICONSIZE; public const float ICONSIZE = UIUtility.ICONSIZE;
private static GUIStyle fontStyleCenter;
private static GUIStyle fontStyleRight;
private static GUIStyle fontStyleLeft;
private static GUIStyle boxStyle; private static GUIStyle boxStyle;
private static GUIStyle buttonStyle; private static GUIStyle buttonStyle;
@ -32,17 +29,13 @@ namespace RJWSexperience.SexHistory.UI
private static void InitStyles() private static void InitStyles()
{ {
if (fontStyleCenter != null) if (boxStyle != null)
{ {
return; return;
} }
GUIStyleState fontStyleState = new GUIStyleState() { textColor = Color.white };
GUIStyleState boxStyleState = GUI.skin.textArea.normal; GUIStyleState boxStyleState = GUI.skin.textArea.normal;
GUIStyleState buttonStyleState = GUI.skin.button.normal; GUIStyleState buttonStyleState = GUI.skin.button.normal;
fontStyleCenter = new GUIStyle() { alignment = TextAnchor.MiddleCenter, normal = fontStyleState };
fontStyleRight = new GUIStyle() { alignment = TextAnchor.MiddleRight, normal = fontStyleState };
fontStyleLeft = new GUIStyle() { alignment = TextAnchor.MiddleLeft, normal = fontStyleState };
boxStyle = new GUIStyle(GUI.skin.textArea) { hover = boxStyleState, onHover = boxStyleState, onNormal = boxStyleState }; boxStyle = new GUIStyle(GUI.skin.textArea) { hover = boxStyleState, onHover = boxStyleState, onNormal = boxStyleState };
buttonStyle = new GUIStyle(GUI.skin.button) { hover = buttonStyleState, onHover = buttonStyleState, onNormal = buttonStyleState }; buttonStyle = new GUIStyle(GUI.skin.button) { hover = buttonStyleState, onHover = buttonStyleState, onNormal = buttonStyleState };
} }
@ -179,7 +172,9 @@ namespace RJWSexperience.SexHistory.UI
} }
} }
GUI.Label(sexinfoRect2, context.Relations + " ", fontStyleRight); Text.Anchor = TextAnchor.MiddleRight;
Widgets.Label(sexinfoRect2, context.Relations + " ");
GenUI.ResetLabelAlign();
TooltipHandler.TipRegion(rect, context.Tooltip); TooltipHandler.TipRegion(rect, context.Tooltip);
} }
else else
@ -195,8 +190,11 @@ namespace RJWSexperience.SexHistory.UI
protected void DrawSexInfoCard(Rect rect, InfoCard context) protected void DrawSexInfoCard(Rect rect, InfoCard context)
{ {
rect.SplitHorizontally(FONTHEIGHT, out Rect labelRect, out Rect infoRect); rect.SplitHorizontally(FONTHEIGHT, out Rect labelRect, out Rect infoRect);
GUI.Label(labelRect, context.Label, fontStyleLeft); Text.Anchor = TextAnchor.MiddleLeft;
GUI.Label(labelRect, context.LastSexTime, fontStyleRight); Widgets.Label(labelRect, context.Label);
Text.Anchor = TextAnchor.MiddleRight;
Widgets.Label(labelRect, context.LastSexTime);
GenUI.ResetLabelAlign();
DrawInfoWithPortrait(infoRect, context); DrawInfoWithPortrait(infoRect, context);
} }
@ -211,7 +209,9 @@ namespace RJWSexperience.SexHistory.UI
{ {
DrawSexInfoCard(listmain.GetRect(CARDHEIGHT), infoCard); DrawSexInfoCard(listmain.GetRect(CARDHEIGHT), infoCard);
} }
GUI.Label(listmain.GetRect(FONTHEIGHT), Keyed.RS_PreferRace, fontStyleLeft); Text.Anchor = TextAnchor.MiddleLeft;
listmain.Label(Keyed.RS_PreferRace);
GenUI.ResetLabelAlign();
DrawPreferRace(listmain.GetRect(66f + 15f), _context.PreferedRaceCard); DrawPreferRace(listmain.GetRect(66f + 15f), _context.PreferedRaceCard);
listmain.End(); listmain.End();
} }
@ -226,16 +226,21 @@ namespace RJWSexperience.SexHistory.UI
Rect infoRect3 = new Rect(infoRect.x, infoRect.y + (FONTHEIGHT * 2), infoRect.width - 2f, FONTHEIGHT); Rect infoRect3 = new Rect(infoRect.x, infoRect.y + (FONTHEIGHT * 2), infoRect.width - 2f, FONTHEIGHT);
Widgets.DrawTextureFitted(portraitRect, preferedRaceCard.PortraitGetter(portraitRect.size), 1.0f); Widgets.DrawTextureFitted(portraitRect, preferedRaceCard.PortraitGetter(portraitRect.size), 1.0f);
GUI.Label(infoRect1, preferedRaceCard.PreferRaceLabel, fontStyleLeft);
if (preferedRaceCard.PreferRaceTypeLabel != null) Text.Anchor = TextAnchor.MiddleLeft;
{ Widgets.Label(infoRect1, preferedRaceCard.PreferRaceLabel);
GUI.Label(infoRect1, preferedRaceCard.PreferRaceTypeLabel + " ", fontStyleRight);
}
if (preferedRaceCard.SexCount != null) if (preferedRaceCard.SexCount != null)
{ {
GUI.Label(infoRect2, preferedRaceCard.SexCount, fontStyleLeft); Widgets.Label(infoRect2, preferedRaceCard.SexCount);
}
GenUI.ResetLabelAlign();
if (preferedRaceCard.PreferRaceTypeLabel != null)
{
Text.Anchor = TextAnchor.MiddleRight;
Widgets.Label(infoRect1, preferedRaceCard.PreferRaceTypeLabel + " ");
} }
if (preferedRaceCard.BarInfo.Label != null) if (preferedRaceCard.BarInfo.Label != null)
@ -280,8 +285,10 @@ namespace RJWSexperience.SexHistory.UI
} }
GUI.Box(nameRect, "", boxStyle); GUI.Box(nameRect, "", boxStyle);
GUI.Label(nameRect.TopHalf(), _context.Name, fontStyleCenter); Text.Anchor = TextAnchor.MiddleCenter;
GUI.Label(nameRect.BottomHalf(), _context.AgeAndTitle, fontStyleCenter); Widgets.Label(nameRect.TopHalf(), _context.Name);
Widgets.Label(nameRect.BottomHalf(), _context.AgeAndTitle);
GenUI.ResetLabelAlign();
Listing_Standard listmain = new Listing_Standard(); Listing_Standard listmain = new Listing_Standard();
listmain.Begin(infoRect); listmain.Begin(infoRect);
@ -292,7 +299,9 @@ namespace RJWSexperience.SexHistory.UI
GUI.color = Color.red; GUI.color = Color.red;
GUI.Box(tmp, "", boxStyle); GUI.Box(tmp, "", boxStyle);
GUI.color = Color.white; GUI.color = Color.white;
GUI.Label(tmp, _context.VirginLabel, fontStyleCenter); Text.Anchor = TextAnchor.MiddleCenter;
Widgets.Label(tmp, _context.VirginLabel);
GenUI.ResetLabelAlign();
listmain.Gap(1f); listmain.Gap(1f);
} }
else else
@ -382,7 +391,9 @@ namespace RJWSexperience.SexHistory.UI
listmain.Begin(rect); listmain.Begin(rect);
//Sex statistics //Sex statistics
GUI.Label(listmain.GetRect(FONTHEIGHT), " " + Keyed.RS_Statistics, fontStyleLeft); Text.Anchor = TextAnchor.MiddleLeft;
listmain.Label(" " + Keyed.RS_Statistics);
GenUI.ResetLabelAlign();
listmain.Gap(1f); listmain.Gap(1f);
for (int i = 0; i < _context.SexTypes.Count; i++) for (int i = 0; i < _context.SexTypes.Count; i++)
@ -396,7 +407,9 @@ namespace RJWSexperience.SexHistory.UI
//Partner list //Partner list
Rect listLabelRect = listmain.GetRect(FONTHEIGHT); Rect listLabelRect = listmain.GetRect(FONTHEIGHT);
Rect sortbtnRect = new Rect(listLabelRect.xMax - 80f, listLabelRect.y, 80f, listLabelRect.height); Rect sortbtnRect = new Rect(listLabelRect.xMax - 80f, listLabelRect.y, 80f, listLabelRect.height);
GUI.Label(listLabelRect, " " + Keyed.RS_PartnerList, fontStyleLeft); Text.Anchor = TextAnchor.MiddleLeft;
Widgets.Label(listLabelRect, " " + Keyed.RS_PartnerList);
GenUI.ResetLabelAlign();
if (Widgets.ButtonText(sortbtnRect, orderMode.Translate())) if (Widgets.ButtonText(sortbtnRect, orderMode.Translate()))
{ {
SoundDefOf.Click.PlayOneShotOnCamera(); SoundDefOf.Click.PlayOneShotOnCamera();
@ -432,7 +445,11 @@ namespace RJWSexperience.SexHistory.UI
DrawPartnerPortrait(pawnRect, partner); DrawPartnerPortrait(pawnRect, partner);
Widgets.DrawHighlightIfMouseover(pawnRect); Widgets.DrawHighlightIfMouseover(pawnRect);
GUI.Label(labelRect, partner.PartnerRecord.Label, fontStyleCenter);
Text.Anchor = TextAnchor.MiddleCenter;
Widgets.Label(labelRect, partner.PartnerRecord.Label);
GenUI.ResetLabelAlign();
if (Widgets.ButtonInvisible(pawnRect)) if (Widgets.ButtonInvisible(pawnRect))
{ {
_context.SetSelectedPartner(partner.PartnerRecord); _context.SetSelectedPartner(partner.PartnerRecord);