mirror of
https://github.com/amevarashi/RJW-Sexperience.git
synced 2024-08-14 23:54:08 +00:00
Refactor Virginity precepts
This commit is contained in:
parent
df4b55c460
commit
b0f6e1d5b7
6 changed files with 90 additions and 96 deletions
|
@ -15,9 +15,9 @@ namespace RJWSexperience.Ideology
|
|||
|
||||
if (ModLister.HasActiveModWithName("RJW Sexperience"))
|
||||
{
|
||||
harmony.Patch(AccessTools.Method("RJWSexperience.RJWUtility:ThrowVirginHIstoryEvent"),
|
||||
harmony.Patch(AccessTools.Method("RJWSexperience.RJWUtility:ThrowVirginHistoryEvent"),
|
||||
prefix: null,
|
||||
postfix: new HarmonyMethod(typeof(Sexperience_Patch_ThrowVirginHIstoryEvent), nameof(Sexperience_Patch_ThrowVirginHIstoryEvent.Postfix))
|
||||
postfix: new HarmonyMethod(typeof(Sexperience_Patch_ThrowVirginHistoryEvent), nameof(Sexperience_Patch_ThrowVirginHistoryEvent.Postfix))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,34 +1,21 @@
|
|||
using RimWorld;
|
||||
using rjw;
|
||||
using RJWSexperience.Ideology.HistoryEvents;
|
||||
using rjw;
|
||||
using Verse;
|
||||
|
||||
namespace RJWSexperience.Ideology.Patches
|
||||
{
|
||||
public static class Sexperience_Patch_ThrowVirginHIstoryEvent
|
||||
public static class Sexperience_Patch_ThrowVirginHistoryEvent
|
||||
{
|
||||
public static void Postfix(Pawn pawn, Pawn partner, SexProps props, int degree)
|
||||
public static void Postfix(Pawn exVirgin, Pawn partner, SexProps props, int degree)
|
||||
{
|
||||
string tag = "";
|
||||
if (props.isRape && pawn != props.pawn)
|
||||
{
|
||||
tag += Tag.BeenRaped;
|
||||
}
|
||||
if (!pawn.relations.DirectRelationExists(PawnRelationDefOf.Spouse, partner))
|
||||
{
|
||||
tag += Tag.NotSpouse;
|
||||
}
|
||||
const int femaleAfterSurgery = 1;
|
||||
|
||||
if (pawn.gender == Gender.Male)
|
||||
{
|
||||
if (degree > 1) Find.HistoryEventsManager.RecordEvent(VariousDefOf.Virgin_TakenM.CreateTaggedEvent(pawn, tag + Tag.Gender(pawn), partner));
|
||||
Find.HistoryEventsManager.RecordEvent(VariousDefOf.Virgin_TookM.CreateTaggedEvent(partner, tag + Tag.Gender(pawn), pawn));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (degree > 1) Find.HistoryEventsManager.RecordEvent(VariousDefOf.Virgin_TakenF.CreateTaggedEvent(pawn, tag + Tag.Gender(pawn), partner));
|
||||
Find.HistoryEventsManager.RecordEvent(VariousDefOf.Virgin_TookF.CreateTaggedEvent(partner, tag + Tag.Gender(pawn), pawn));
|
||||
}
|
||||
if (props.isRape && exVirgin == props.partner)
|
||||
VariousDefOf.RSI_VirginStolen.RecordEventWithPartner(exVirgin, partner);
|
||||
|
||||
if (degree != femaleAfterSurgery)
|
||||
VariousDefOf.RSI_VirginTaken.RecordEventWithPartner(exVirgin, partner);
|
||||
|
||||
VariousDefOf.RSI_TookVirgin.RecordEventWithPartner(partner, exVirgin);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,10 +24,9 @@ namespace RJWSexperience.Ideology
|
|||
[MayRequireIdeology] public static readonly HistoryEventDef RSI_NonIncestuosMarriage;
|
||||
[MayRequireIdeology] public static readonly HistoryEventDef RSI_NonIncestuosSex;
|
||||
[MayRequireIdeology] public static readonly HistoryEventDef SexWithCorpse;
|
||||
[MayRequireIdeology] public static readonly HistoryEventDef Virgin_TakenF;
|
||||
[MayRequireIdeology] public static readonly HistoryEventDef Virgin_TakenM;
|
||||
[MayRequireIdeology] public static readonly HistoryEventDef Virgin_TookF;
|
||||
[MayRequireIdeology] public static readonly HistoryEventDef Virgin_TookM;
|
||||
[MayRequireIdeology] public static readonly HistoryEventDef RSI_VirginTaken;
|
||||
[MayRequireIdeology] public static readonly HistoryEventDef RSI_VirginStolen;
|
||||
[MayRequireIdeology] public static readonly HistoryEventDef RSI_TookVirgin;
|
||||
[MayRequireIdeology] public static readonly PreceptDef Bestiality_OnlyVenerated;
|
||||
[MayRequireIdeology] public static readonly PreceptDef BabyFaction_AlwaysFather;
|
||||
[MayRequireIdeology] public static readonly PreceptDef BabyFaction_AlwaysColony;
|
||||
|
|
|
@ -91,7 +91,7 @@ namespace RJWSexperience
|
|||
}
|
||||
|
||||
if (removedDegree != null)
|
||||
RJWUtility.ThrowVirginHIstoryEvent(pawn, partner, props, (int)removedDegree);
|
||||
RJWUtility.ThrowVirginHistoryEvent(pawn, partner, props, (int)removedDegree);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,12 +15,12 @@ namespace RJWSexperience
|
|||
/// For ideo patch
|
||||
/// </summary>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Redundancy", "RCS1163:Unused parameter.", Justification = "All parameters are needed for the ideology patch")]
|
||||
public static void ThrowVirginHIstoryEvent(Pawn pawn, Pawn partner, SexProps props, int degree)
|
||||
public static void ThrowVirginHistoryEvent(Pawn exVirgin, Pawn partner, SexProps props, int degree)
|
||||
{
|
||||
//for non-ideo
|
||||
if (partner.Ideo == null)
|
||||
{
|
||||
partner.needs?.mood?.thoughts?.memories.TryGainMemory(xxx.took_virginity, pawn);
|
||||
partner.needs?.mood?.thoughts?.memories.TryGainMemory(xxx.took_virginity, exVirgin);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -14,23 +14,37 @@
|
|||
</IssueDef>
|
||||
|
||||
<HistoryEventDef>
|
||||
<defName>Virgin_TakenF</defName>
|
||||
<defName>RSI_VirginTaken</defName>
|
||||
<label>virgin taken</label>
|
||||
<modExtensions>
|
||||
<li Class="RJWSexperience.Ideology.HistoryEvents.DefExtension_PartnerDependentSecondaryEvents">
|
||||
<generationRules>
|
||||
<li>
|
||||
<filter>
|
||||
<hasNoneOfRelations>
|
||||
<li>Spouse</li>
|
||||
</hasNoneOfRelations>
|
||||
</filter>
|
||||
<historyEventDef>RSI_VirginTakenNotSpouse</historyEventDef>
|
||||
</li>
|
||||
</generationRules>
|
||||
</li>
|
||||
</modExtensions>
|
||||
</HistoryEventDef>
|
||||
|
||||
<HistoryEventDef>
|
||||
<defName>Virgin_TakenM</defName>
|
||||
<label>virgin taken</label>
|
||||
<defName>RSI_TookVirgin</defName>
|
||||
<label>took virgin</label>
|
||||
</HistoryEventDef>
|
||||
|
||||
<HistoryEventDef>
|
||||
<defName>Virgin_TookF</defName>
|
||||
<label>virgin took</label>
|
||||
<defName>RSI_VirginStolen</defName>
|
||||
<label>virgin stolen</label>
|
||||
</HistoryEventDef>
|
||||
|
||||
<HistoryEventDef>
|
||||
<defName>Virgin_TookM</defName>
|
||||
<label>virgin took</label>
|
||||
<defName>RSI_VirginTakenNotSpouse</defName>
|
||||
<label>virgin was taken by a stranger</label>
|
||||
</HistoryEventDef>
|
||||
|
||||
<!-- Precepts -->
|
||||
|
@ -67,19 +81,18 @@
|
|||
<displayOrderInImpact>1000</displayOrderInImpact>
|
||||
<defaultSelectionWeight>80</defaultSelectionWeight>
|
||||
<comps>
|
||||
<li Class="RJWSexperience.Ideology.Precepts.PreceptComp_SelfTookThoughtTagged">
|
||||
<eventDef>Virgin_TakenF</eventDef>
|
||||
<li Class="RJWSexperience.Ideology.Precepts.Comp_SelfTookMemoryThought_Gendered">
|
||||
<eventDef>RSI_VirginStolen</eventDef>
|
||||
<thought>Virgin_Precious_Taken_Forcefully</thought>
|
||||
<tag>BeenRaped</tag>
|
||||
<gender>Female</gender>
|
||||
</li>
|
||||
<li Class="RJWSexperience.Ideology.Precepts.PreceptComp_SelfTookThoughtTagged">
|
||||
<eventDef>Virgin_TakenF</eventDef>
|
||||
<li Class="RJWSexperience.Ideology.Precepts.Comp_SelfTookMemoryThought_Gendered">
|
||||
<eventDef>RSI_VirginTaken</eventDef>
|
||||
<thought>Virgin_Precious_Taken</thought>
|
||||
<tag>BeenRaped</tag>
|
||||
<exclusive>true</exclusive>
|
||||
<gender>Female</gender>
|
||||
</li>
|
||||
<li Class="RJWSexperience.Ideology.Precepts.PreceptComp_SelfTookThoughtTagged">
|
||||
<eventDef>Virgin_TookF</eventDef>
|
||||
<li Class="PreceptComp_SelfTookMemoryThought">
|
||||
<eventDef>RSI_TookVirgin</eventDef>
|
||||
<thought>TookVirginity</thought>
|
||||
</li>
|
||||
</comps>
|
||||
|
@ -95,19 +108,18 @@
|
|||
<displayOrderInImpact>1000</displayOrderInImpact>
|
||||
<defaultSelectionWeight>1</defaultSelectionWeight>
|
||||
<comps>
|
||||
<li Class="RJWSexperience.Ideology.Precepts.PreceptComp_SelfTookThoughtTagged">
|
||||
<eventDef>Virgin_TakenM</eventDef>
|
||||
<li Class="RJWSexperience.Ideology.Precepts.Comp_SelfTookMemoryThought_Gendered">
|
||||
<eventDef>RSI_VirginStolen</eventDef>
|
||||
<thought>Virgin_Precious_Taken_Forcefully</thought>
|
||||
<tag>BeenRaped</tag>
|
||||
<gender>Male</gender>
|
||||
</li>
|
||||
<li Class="RJWSexperience.Ideology.Precepts.PreceptComp_SelfTookThoughtTagged">
|
||||
<eventDef>Virgin_TakenM</eventDef>
|
||||
<li Class="RJWSexperience.Ideology.Precepts.Comp_SelfTookMemoryThought_Gendered">
|
||||
<eventDef>RSI_VirginTaken</eventDef>
|
||||
<thought>Virgin_Precious_Taken</thought>
|
||||
<tag>BeenRaped</tag>
|
||||
<exclusive>true</exclusive>
|
||||
<gender>Male</gender>
|
||||
</li>
|
||||
<li Class="RJWSexperience.Ideology.Precepts.PreceptComp_SelfTookThoughtTagged">
|
||||
<eventDef>Virgin_TookM</eventDef>
|
||||
<li Class="PreceptComp_SelfTookMemoryThought">
|
||||
<eventDef>RSI_TookVirgin</eventDef>
|
||||
<thought>TookVirginity</thought>
|
||||
</li>
|
||||
</comps>
|
||||
|
@ -132,24 +144,23 @@
|
|||
<li>MaleSupremacy</li>
|
||||
</associatedMemes>
|
||||
<comps>
|
||||
<li Class="RJWSexperience.Ideology.Precepts.PreceptComp_SelfTookThoughtTagged">
|
||||
<eventDef>Virgin_TakenF</eventDef>
|
||||
<li Class="RJWSexperience.Ideology.Precepts.Comp_SelfTookMemoryThought_Gendered">
|
||||
<eventDef>RSI_VirginStolen</eventDef>
|
||||
<thought>Virgin_Precious_Taken_Forcefully</thought>
|
||||
<tag>BeenRaped</tag>
|
||||
<gender>Female</gender>
|
||||
</li>
|
||||
<li Class="RJWSexperience.Ideology.Precepts.PreceptComp_SelfTookThoughtTagged">
|
||||
<eventDef>Virgin_TakenF</eventDef>
|
||||
<li Class="RJWSexperience.Ideology.Precepts.Comp_SelfTookMemoryThought_Gendered">
|
||||
<eventDef>RSI_VirginTaken</eventDef>
|
||||
<thought>Virgin_Precious_Taken</thought>
|
||||
<tag>BeenRaped</tag>
|
||||
<exclusive>true</exclusive>
|
||||
<gender>Female</gender>
|
||||
</li>
|
||||
<li Class="RJWSexperience.Ideology.Precepts.PreceptComp_KnowsMemoryThoughtTagged">
|
||||
<eventDef>Virgin_TakenF</eventDef>
|
||||
<li Class="RJWSexperience.Ideology.Precepts.Comp_KnowsMemoryThought_Gendered">
|
||||
<eventDef>RSI_VirginTakenNotSpouse</eventDef>
|
||||
<thought>Virgin_OnlyForSpouse_Know_Taken</thought>
|
||||
<tag>Female, NotSpouse</tag>
|
||||
<doersGender>Female</doersGender>
|
||||
</li>
|
||||
<li Class="PreceptComp_SelfTookMemoryThought">
|
||||
<eventDef>Virgin_TookF</eventDef>
|
||||
<eventDef>RSI_TookVirgin</eventDef>
|
||||
<thought>TookVirginity</thought>
|
||||
</li>
|
||||
</comps>
|
||||
|
@ -174,24 +185,23 @@
|
|||
<li>FemaleSupremacy</li>
|
||||
</associatedMemes>
|
||||
<comps>
|
||||
<li Class="RJWSexperience.Ideology.Precepts.PreceptComp_SelfTookThoughtTagged">
|
||||
<eventDef>Virgin_TakenM</eventDef>
|
||||
<li Class="RJWSexperience.Ideology.Precepts.Comp_SelfTookMemoryThought_Gendered">
|
||||
<eventDef>RSI_VirginStolen</eventDef>
|
||||
<thought>Virgin_Precious_Taken_Forcefully</thought>
|
||||
<tag>BeenRaped</tag>
|
||||
<gender>Male</gender>
|
||||
</li>
|
||||
<li Class="RJWSexperience.Ideology.Precepts.PreceptComp_SelfTookThoughtTagged">
|
||||
<eventDef>Virgin_TakenM</eventDef>
|
||||
<li Class="RJWSexperience.Ideology.Precepts.Comp_SelfTookMemoryThought_Gendered">
|
||||
<eventDef>RSI_VirginTaken</eventDef>
|
||||
<thought>Virgin_Precious_Taken</thought>
|
||||
<tag>BeenRaped</tag>
|
||||
<exclusive>true</exclusive>
|
||||
<gender>Male</gender>
|
||||
</li>
|
||||
<li Class="RJWSexperience.Ideology.Precepts.PreceptComp_KnowsMemoryThoughtTagged">
|
||||
<eventDef>Virgin_TakenM</eventDef>
|
||||
<li Class="RJWSexperience.Ideology.Precepts.Comp_KnowsMemoryThought_Gendered">
|
||||
<eventDef>RSI_VirginTakenNotSpouse</eventDef>
|
||||
<thought>Virgin_OnlyForSpouse_Know_Taken</thought>
|
||||
<tag>Male, NotSpouse</tag>
|
||||
<doersGender>Male</doersGender>
|
||||
</li>
|
||||
<li Class="PreceptComp_SelfTookMemoryThought">
|
||||
<eventDef>Virgin_TookM</eventDef>
|
||||
<eventDef>RSI_TookVirgin</eventDef>
|
||||
<thought>TookVirginity</thought>
|
||||
</li>
|
||||
</comps>
|
||||
|
@ -210,11 +220,10 @@
|
|||
<li>FemaleSupremacy</li>
|
||||
</associatedMemes>
|
||||
<comps>
|
||||
<li Class="RJWSexperience.Ideology.Precepts.PreceptComp_SelfTookThoughtTagged">
|
||||
<eventDef>Virgin_TakenF</eventDef>
|
||||
<li Class="RJWSexperience.Ideology.Precepts.Comp_SelfTookMemoryThought_Gendered">
|
||||
<eventDef>RSI_VirginTaken</eventDef>
|
||||
<thought>Virgin_Shameful_Taken</thought>
|
||||
<tag>BeenRaped</tag>
|
||||
<exclusive>true</exclusive>
|
||||
<gender>Female</gender>
|
||||
</li>
|
||||
</comps>
|
||||
</PreceptDef>
|
||||
|
@ -232,11 +241,10 @@
|
|||
<li>MaleSupremacy</li>
|
||||
</associatedMemes>
|
||||
<comps>
|
||||
<li Class="RJWSexperience.Ideology.Precepts.PreceptComp_SelfTookThoughtTagged">
|
||||
<eventDef>Virgin_TakenM</eventDef>
|
||||
<li Class="RJWSexperience.Ideology.Precepts.Comp_SelfTookMemoryThought_Gendered">
|
||||
<eventDef>RSI_VirginTaken</eventDef>
|
||||
<thought>Virgin_Shameful_Taken</thought>
|
||||
<tag>BeenRaped</tag>
|
||||
<exclusive>true</exclusive>
|
||||
<gender>Male</gender>
|
||||
</li>
|
||||
</comps>
|
||||
</PreceptDef>
|
||||
|
@ -250,8 +258,8 @@
|
|||
<stackLimit>1</stackLimit>
|
||||
<stages>
|
||||
<li>
|
||||
<label>Lost virginity</label>
|
||||
<description>I lost my virginity forcefully.</description>
|
||||
<label>Virginity stolen</label>
|
||||
<description>My virginity was taken forcefully.</description>
|
||||
<baseMoodEffect>-10</baseMoodEffect>
|
||||
<baseOpinionOffset>-200</baseOpinionOffset>
|
||||
</li>
|
||||
|
@ -265,17 +273,17 @@
|
|||
<stackLimit>1</stackLimit>
|
||||
<stages>
|
||||
<li>
|
||||
<label>Lost virginity by {0}</label>
|
||||
<label>Lost virginity to {0}</label>
|
||||
<description>I am no longer virgin.</description>
|
||||
<baseMoodEffect>-5</baseMoodEffect>
|
||||
</li>
|
||||
<li>
|
||||
<label>Lost virginity by {0}</label>
|
||||
<label>Lost virginity to {0}</label>
|
||||
<description>I am no longer virgin.</description>
|
||||
<baseMoodEffect>-3</baseMoodEffect>
|
||||
</li>
|
||||
<li>
|
||||
<label>Lost virginity by {0}</label>
|
||||
<label>Lost virginity to {0}</label>
|
||||
<description>I am no longer virgin.</description>
|
||||
<baseMoodEffect>-1</baseMoodEffect>
|
||||
</li>
|
||||
|
@ -304,17 +312,17 @@
|
|||
<stackLimit>1</stackLimit>
|
||||
<stages>
|
||||
<li>
|
||||
<label>Lost virginity by {0}</label>
|
||||
<label>Lost virginity to {0}</label>
|
||||
<description>Finally!</description>
|
||||
<baseMoodEffect>5</baseMoodEffect>
|
||||
</li>
|
||||
<li>
|
||||
<label>Lost virginity by {0}</label>
|
||||
<label>Lost virginity to {0}</label>
|
||||
<description>Finally!</description>
|
||||
<baseMoodEffect>10</baseMoodEffect>
|
||||
</li>
|
||||
<li>
|
||||
<label>Lost virginity by {0}</label>
|
||||
<label>Lost virginity to {0}</label>
|
||||
<description>Finally!</description>
|
||||
<baseMoodEffect>20</baseMoodEffect>
|
||||
</li>
|
||||
|
|
Loading…
Reference in a new issue