Split Ideology addon from base?

This commit is contained in:
amevarashi 2022-02-25 19:15:48 +05:00
parent a483e7c1d0
commit 527da1ac0f
10 changed files with 333 additions and 411 deletions

View file

@ -1,23 +1,29 @@
using System; using HarmonyLib;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Reflection; using System.Reflection;
using HarmonyLib;
using Verse; using Verse;
namespace RJWSexperience.Ideology namespace RJWSexperience.Ideology
{ {
[StaticConstructorOnStartup]
internal static class First
{
static First()
{
var harmony = new Harmony("RJW_Sexperience.Ideology");
harmony.PatchAll(Assembly.GetExecutingAssembly());
[StaticConstructorOnStartup] if (ModLister.HasActiveModWithName("RJW Sexperience"))
internal static class First {
{ //Log.Message("[RJWSexperience.Ideology] Found RJWSexperience, patching");
static First() harmony.Patch(AccessTools.Method("RJWSexperience.Utility:IsIncest"),
{ prefix: new HarmonyMethod(typeof(Sexperience_Patch_IsIncest), nameof(Sexperience_Patch_IsIncest.Prefix)),
var har = new Harmony("RJW_Sexperience.Ideology"); postfix: null
har.PatchAll(Assembly.GetExecutingAssembly()); );
} harmony.Patch(AccessTools.Method("RJWSexperience.RJWUtility:ThrowVirginHIstoryEvent"),
} prefix: null,
postfix: new HarmonyMethod(typeof(Sexperience_Patch_ThrowVirginHIstoryEvent), nameof(Sexperience_Patch_ThrowVirginHIstoryEvent.Postfix))
);
}
}
}
} }

View file

@ -0,0 +1,15 @@
using Verse;
namespace RJWSexperience
{
public static class Keyed
{
public static string MemeStatFactor(string value) => "MemeStatFactor".Translate(value);
public static readonly string RSVictimCondition = "RSVictimCondition".Translate();
public static readonly string RSBreederCondition = "RSBreederCondition".Translate();
public static readonly string RSNotHuman = "RSNotHuman".Translate();
public static readonly string RSNotAnimal = "RSNotAnimal".Translate();
public static readonly string RSShouldCanFuck = "RSShouldCanFuck".Translate();
}
}

View file

@ -1,9 +1,4 @@
using System; using RimWorld;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using RimWorld;
using Verse; using Verse;
namespace RJWSexperience.Ideology namespace RJWSexperience.Ideology
@ -15,7 +10,7 @@ namespace RJWSexperience.Ideology
} }
public static class HETag public static class HETag
{ {
public const string Incestous = "[Incestuos]"; public const string Incestous = "[Incestuos]";
public const string BeenRaped = "[BeenRaped]"; public const string BeenRaped = "[BeenRaped]";
public const string Rape = "[Rape]"; public const string Rape = "[Rape]";
@ -23,57 +18,39 @@ namespace RJWSexperience.Ideology
public const string NotSpouse = "[NotSpouse]"; public const string NotSpouse = "[NotSpouse]";
public static string Gender(Pawn pawn) => "[" + pawn.gender + "]"; public static string Gender(Pawn pawn) => "[" + pawn.gender + "]";
}
}
public class PreceptComp_SelfTookThoughtTagged : PreceptComp_SelfTookMemoryThought public class PreceptComp_SelfTookThoughtTagged : PreceptComp_SelfTookMemoryThought
{ {
public string tag; public string tag;
public bool exclusive = false; public bool exclusive = false;
//public RecordDef recordDef;
//public float? recordoffset;
public PreceptComp_SelfTookThoughtTagged() { } public PreceptComp_SelfTookThoughtTagged() { }
public override void Notify_MemberTookAction(HistoryEvent ev, Precept precept, bool canApplySelfTookThoughts) public override void Notify_MemberTookAction(HistoryEvent ev, Precept precept, bool canApplySelfTookThoughts)
{ {
if (tag != null) if (tag != null)
{ {
if (ev.args.TryGetArg(HistoryEventArgsNamesCustom.Tag, out string tags)) if (ev.args.TryGetArg(HistoryEventArgsNamesCustom.Tag, out string tags))
{ {
if (tags.ContainAll(tag.Replace(" ","").Split(',')) ^ exclusive) if (IdeoUtility.ContainAll(tags, tag.Replace(" ", "").Split(',')) ^ exclusive)
{ {
TookThought(ev, precept, canApplySelfTookThoughts); TookThought(ev, precept, canApplySelfTookThoughts);
//if (ev.args.TryGetArg(HistoryEventArgsNames.Doer, out Pawn pawn))
//{
// AdjustRecord(pawn);
//}
} }
} }
else if (exclusive) else if (exclusive)
{ {
TookThought(ev, precept, canApplySelfTookThoughts); TookThought(ev, precept, canApplySelfTookThoughts);
//if (ev.args.TryGetArg(HistoryEventArgsNames.Doer, out Pawn pawn))
//{
// AdjustRecord(pawn);
//}
} }
} }
else else
{ {
TookThought(ev, precept, canApplySelfTookThoughts); TookThought(ev, precept, canApplySelfTookThoughts);
//if (ev.args.TryGetArg(HistoryEventArgsNames.Doer, out Pawn pawn))
//{
// AdjustRecord(pawn);
//}
} }
} }
protected virtual void TookThought(HistoryEvent ev, Precept precept, bool canApplySelfTookThoughts) protected virtual void TookThought(HistoryEvent ev, Precept precept, bool canApplySelfTookThoughts)
{ {
if (ev.def != this.eventDef || !canApplySelfTookThoughts) if (ev.def != this.eventDef || !canApplySelfTookThoughts)
{ {
return; return;
@ -102,22 +79,10 @@ namespace RJWSexperience.Ideology
arg.needs.mood.thoughts.memories.TryGainMemory(thought_Memory, partner); arg.needs.mood.thoughts.memories.TryGainMemory(thought_Memory, partner);
} }
} }
//protected void AdjustRecord(Pawn pawn)
//{
// if (recordDef != null)
// {
// pawn.records.AddTo(recordDef, recordoffset ?? 1f);
// }
//}
} }
public class PreceptComp_KnowsMemoryThoughtTagged : PreceptComp_KnowsMemoryThought public class PreceptComp_KnowsMemoryThoughtTagged : PreceptComp_KnowsMemoryThought
{ {
public string tag; public string tag;
public bool exclusive = false; public bool exclusive = false;
public bool applyonpartner = false; public bool applyonpartner = false;
@ -125,19 +90,19 @@ namespace RJWSexperience.Ideology
public PreceptComp_KnowsMemoryThoughtTagged() { } public PreceptComp_KnowsMemoryThoughtTagged() { }
public override void Notify_MemberWitnessedAction(HistoryEvent ev, Precept precept, Pawn member) public override void Notify_MemberWitnessedAction(HistoryEvent ev, Precept precept, Pawn member)
{ {
if (!applyonpartner) if (!applyonpartner)
{ {
if (ev.args.TryGetArg(HistoryEventArgsNamesCustom.Partner, out Pawn pawn)) if (ev.args.TryGetArg(HistoryEventArgsNamesCustom.Partner, out Pawn pawn))
{ {
if (pawn == member) return; if (pawn == member) return;
} }
} }
if (tag != null) if (tag != null)
{ {
if (ev.args.TryGetArg(HistoryEventArgsNamesCustom.Tag, out string tags)) if (ev.args.TryGetArg(HistoryEventArgsNamesCustom.Tag, out string tags))
{ {
if (tags.ContainAll(tag.Replace(" ", "").Split(',')) ^ exclusive) base.Notify_MemberWitnessedAction(ev, precept, member); if (IdeoUtility.ContainAll(tags, tag.Replace(" ", "").Split(',')) ^ exclusive) base.Notify_MemberWitnessedAction(ev, precept, member);
} }
else if (exclusive) else if (exclusive)
{ {
@ -145,10 +110,9 @@ namespace RJWSexperience.Ideology
} }
} }
else else
{ {
base.Notify_MemberWitnessedAction(ev, precept, member); base.Notify_MemberWitnessedAction(ev, precept, member);
} }
} }
} }
} }

View file

@ -7,8 +7,6 @@ using HarmonyLib;
using rjw; using rjw;
using RimWorld; using RimWorld;
using Verse; using Verse;
using UnityEngine;
using SexperienceDefOf = RJWSexperience.VariousDefOf;
using rjw.Modules.Interactions.Internals.Implementation; using rjw.Modules.Interactions.Internals.Implementation;
using rjw.Modules.Interactions.Contexts; using rjw.Modules.Interactions.Contexts;
using rjw.Modules.Interactions.Objects; using rjw.Modules.Interactions.Objects;
@ -177,7 +175,7 @@ namespace RJWSexperience.Ideology
public static void AfterSexHuman(Pawn human, Pawn partner, bool usedCondom, bool rape, bool isCoreLovin, xxx.rjwSextype sextype, bool isHumanReceiving = false) public static void AfterSexHuman(Pawn human, Pawn partner, bool usedCondom, bool rape, bool isCoreLovin, xxx.rjwSextype sextype, bool isHumanReceiving = false)
{ {
string tag = ""; string tag = "";
if (human.IsIncest(partner)) if (IdeoUtility.IsIncest(human, partner))
{ {
tag += HETag.Incestous; tag += HETag.Incestous;
} }
@ -358,7 +356,7 @@ namespace RJWSexperience.Ideology
Ideo ideo = fucker.Ideo; Ideo ideo = fucker.Ideo;
if (ideo != null) if (ideo != null)
{ {
if (fucker.IsIncest(fucked)) if (IdeoUtility.IsIncest(fucker, fucked))
{ {
if (ideo.HasPrecept(VariousDefOf.Incestuos_IncestOnly)) __result *= 2.0f; if (ideo.HasPrecept(VariousDefOf.Incestuos_IncestOnly)) __result *= 2.0f;
else if (!fucker.relations?.DirectRelationExists(PawnRelationDefOf.Spouse, fucked) ?? false) else if (!fucker.relations?.DirectRelationExists(PawnRelationDefOf.Spouse, fucked) ?? false)

View file

@ -1,90 +1,74 @@
using System; using HarmonyLib;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using HarmonyLib;
using RimWorld; using RimWorld;
using Verse;
using rjw; using rjw;
using System.Collections.Generic;
using Verse;
namespace RJWSexperience.Ideology namespace RJWSexperience.Ideology
{ {
[HarmonyPatch(typeof(MarriageCeremonyUtility), "Married")] [HarmonyPatch(typeof(MarriageCeremonyUtility), "Married")]
public static class Rimworld_Patch_Marriage public static class Rimworld_Patch_Marriage
{ {
public static void Postfix(Pawn firstPawn, Pawn secondPawn) public static void Postfix(Pawn firstPawn, Pawn secondPawn)
{ {
if (firstPawn.IsIncest(secondPawn)) if (IdeoUtility.IsIncest(firstPawn, secondPawn))
{ {
Find.HistoryEventsManager.RecordEvent(new HistoryEvent(VariousDefOf.Incestuos_Marriage, firstPawn.Named(HistoryEventArgsNames.Doer))); Find.HistoryEventsManager.RecordEvent(new HistoryEvent(VariousDefOf.Incestuos_Marriage, firstPawn.Named(HistoryEventArgsNames.Doer)));
Find.HistoryEventsManager.RecordEvent(new HistoryEvent(VariousDefOf.Incestuos_Marriage, secondPawn.Named(HistoryEventArgsNames.Doer))); Find.HistoryEventsManager.RecordEvent(new HistoryEvent(VariousDefOf.Incestuos_Marriage, secondPawn.Named(HistoryEventArgsNames.Doer)));
} }
} }
}
[HarmonyPatch(typeof(Pawn_RelationsTracker), "SecondaryRomanceChanceFactor")]
public static class Rimworld_Patch_SecondaryRomanceChanceFactor
{
public static void Postfix(Pawn otherPawn, Pawn ___pawn, ref float __result)
{
Ideo ideo = ___pawn.Ideo;
if (ideo != null)
{
if (ideo.HasPrecept(VariousDefOf.Incestuos_IncestOnly) && IdeoUtility.IsIncest(___pawn, otherPawn))
{
__result *= 8f;
}
}
}
}
} [HarmonyPatch(typeof(RitualOutcomeEffectWorker_FromQuality), "GiveMemoryToPawn")]
public static class Rimworld_Patch_GiveMemoryToPawn
{
public static bool Prefix(Pawn pawn, ThoughtDef memory, LordJob_Ritual jobRitual)
{
if (pawn.IsAnimal()) return false;
[HarmonyPatch(typeof(Pawn_RelationsTracker), "SecondaryRomanceChanceFactor")] return true;
public static class Rimworld_Patch_SecondaryRomanceChanceFactor }
{ }
public static void Postfix(Pawn otherPawn, Pawn ___pawn, ref float __result)
{
Ideo ideo = ___pawn.Ideo;
if (ideo != null)
{
if (ideo.HasPrecept(VariousDefOf.Incestuos_IncestOnly) && ___pawn.IsIncest(otherPawn))
{
__result *= 8f;
}
}
}
}
[HarmonyPatch(typeof(RitualOutcomeEffectWorker_FromQuality), "GiveMemoryToPawn")] [HarmonyPatch(typeof(IdeoFoundation), "CanAdd")]
public static class Rimworld_Patch_GiveMemoryToPawn public static class Rimworld_Patch_IdeoFoundation
{ {
public static bool Prefix(Pawn pawn, ThoughtDef memory, LordJob_Ritual jobRitual) public static void Postfix(PreceptDef precept, bool checkDuplicates, ref IdeoFoundation __instance, ref AcceptanceReport __result)
{ {
if (pawn.IsAnimal()) return false; if (precept is PreceptDef_RequirementExtended)
{
return true; PreceptDef_RequirementExtended def = precept as PreceptDef_RequirementExtended;
} if (!def.requiredAllMemes.NullOrEmpty())
} {
for (int i = 0; i < def.requiredAllMemes.Count; i++)
[HarmonyPatch(typeof(IdeoFoundation), "CanAdd")] {
public static class Rimworld_Patch_IdeoFoundation if (!__instance.ideo.memes.Contains(def.requiredAllMemes[i]))
{ {
public static void Postfix(PreceptDef precept, bool checkDuplicates, ref IdeoFoundation __instance, ref AcceptanceReport __result) List<string> report = new List<string>();
{ foreach (MemeDef meme in def.requiredAllMemes) report.Add(meme.LabelCap);
if (precept is PreceptDef_RequirementExtended)
{
PreceptDef_RequirementExtended def = precept as PreceptDef_RequirementExtended;
if (!def.requiredAllMemes.NullOrEmpty())
{
for (int i=0; i< def.requiredAllMemes.Count; i++)
{
if (!__instance.ideo.memes.Contains(def.requiredAllMemes[i]))
{
List<string> report = new List<string>();
foreach (MemeDef meme in def.requiredAllMemes) report.Add(meme.LabelCap);
__result = new AcceptanceReport("RequiresMeme".Translate() + ": " + report.ToCommaList());
return;
}
}
}
}
}
}
__result = new AcceptanceReport("RequiresMeme".Translate() + ": " + report.ToCommaList());
return;
}
}
}
}
}
}
} }

View file

@ -1,75 +1,44 @@
using System; using RimWorld;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using HarmonyLib;
using rjw; using rjw;
using RJWSexperience;
using Verse; using Verse;
using RimWorld;
namespace RJWSexperience.Ideology namespace RJWSexperience.Ideology
{ {
[HarmonyPatch(typeof(RJWUtility), "ThrowVirginHIstoryEvent")] 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 pawn, Pawn partner, SexProps props, int degree) {
{ string tag = "";
string tag = ""; if (props.isRape)
if (props.isRape) {
{ if (pawn == props.pawn && props.isRapist) tag += HETag.Rape;
if (pawn == props.pawn && props.isRapist) tag += HETag.Rape; else tag += HETag.BeenRaped;
else tag += HETag.BeenRaped; }
} if (!pawn.relations.DirectRelationExists(PawnRelationDefOf.Spouse, partner))
if (!pawn.relations.DirectRelationExists(PawnRelationDefOf.Spouse, partner)) {
{ tag += HETag.NotSpouse;
tag += HETag.NotSpouse; }
}
if (pawn.gender == Gender.Male)
{
if (degree > 1) Find.HistoryEventsManager.RecordEvent(VariousDefOf.Virgin_TakenM.TaggedEvent(pawn, tag + HETag.Gender(pawn), partner));
Find.HistoryEventsManager.RecordEvent(VariousDefOf.Virgin_TookM.TaggedEvent(partner, tag + HETag.Gender(pawn), pawn));
}
else
{
if (degree > 1) Find.HistoryEventsManager.RecordEvent(VariousDefOf.Virgin_TakenF.TaggedEvent(pawn, tag + HETag.Gender(pawn), partner));
Find.HistoryEventsManager.RecordEvent(VariousDefOf.Virgin_TookF.TaggedEvent(partner, tag + HETag.Gender(pawn), pawn));
}
if (pawn.gender == Gender.Male)
{
if (degree > 1) Find.HistoryEventsManager.RecordEvent(VariousDefOf.Virgin_TakenM.TaggedEvent(pawn, tag + HETag.Gender(pawn), partner));
Find.HistoryEventsManager.RecordEvent(VariousDefOf.Virgin_TookM.TaggedEvent(partner, tag + HETag.Gender(pawn), pawn));
}
else
{
if (degree > 1) Find.HistoryEventsManager.RecordEvent(VariousDefOf.Virgin_TakenF.TaggedEvent(pawn, tag + HETag.Gender(pawn), partner));
Find.HistoryEventsManager.RecordEvent(VariousDefOf.Virgin_TookF.TaggedEvent(partner, tag + HETag.Gender(pawn), pawn));
}
}
}
} public static class Sexperience_Patch_IsIncest
} {
public static bool Prefix(Pawn pawn, Pawn otherpawn, ref bool __result)
[HarmonyPatch(typeof(Utility), "IsIncest")] {
public static class Sexperience_Patch_IsIncest __result = IdeoUtility.IsIncest(pawn, otherpawn);
{ return false;
public static bool Prefix(Pawn pawn, Pawn otherpawn, ref bool __result) }
{ }
__result = IsIncest(pawn, otherpawn);
return false;
}
private static bool IsIncest(Pawn pawn, Pawn partner)
{
IEnumerable<PawnRelationDef> relations = pawn.GetRelations(partner);
Ideo ideo = pawn.Ideo;
bool wide = false;
if (ideo != null) wide = ideo.HasPrecept(VariousDefOf.Incestuos_Disapproved_CloseOnly);
if (!relations.EnumerableNullOrEmpty()) foreach (PawnRelationDef relation in relations)
{
if (wide)
{
if (relation.incestOpinionOffset < 0) return true;
}
else if (relation.familyByBloodRelation) return true;
}
return false;
}
}
} }

View file

@ -1,30 +1,49 @@
using System; using RimWorld;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text;
using System.Threading.Tasks;
using RimWorld;
using Verse; using Verse;
using rjw;
using UnityEngine;
namespace RJWSexperience.Ideology namespace RJWSexperience.Ideology
{ {
public static class IdeoUtility public static class IdeoUtility
{ {
public static bool IsSubmissive(this Pawn pawn)
{
Ideo ideo = pawn.Ideo;
if (ideo != null)
{
if (ideo.HasPrecept(VariousDefOf.Submissive_Female) && pawn.gender == Gender.Female) return true;
else if (ideo.HasPrecept(VariousDefOf.Submissive_Male) && pawn.gender == Gender.Male) return true;
}
return false;
}
public static bool IsSubmissive(this Pawn pawn) public static bool ContainAll(string str, string[] tags)
{ {
Ideo ideo = pawn.Ideo; string lstr = str.ToLower();
if (ideo != null) if (!tags.NullOrEmpty()) for (int i = 0; i < tags.Count(); i++)
{ {
if (ideo.HasPrecept(VariousDefOf.Submissive_Female) && pawn.gender == Gender.Female) return true; if (!lstr.Contains('[' + tags[i].ToLower() + ']')) return false;
else if (ideo.HasPrecept(VariousDefOf.Submissive_Male) && pawn.gender == Gender.Male) return true; }
} return true;
}
return false; public static bool IsIncest(Pawn pawn, Pawn partner)
} {
IEnumerable<PawnRelationDef> relations = pawn.GetRelations(partner);
} Ideo ideo = pawn.Ideo;
bool wide = false;
if (ideo != null) wide = ideo.HasPrecept(VariousDefOf.Incestuos_Disapproved_CloseOnly);
if (!relations.EnumerableNullOrEmpty()) foreach (PawnRelationDef relation in relations)
{
if (wide)
{
if (relation.incestOpinionOffset < 0) return true;
}
else if (relation.familyByBloodRelation) return true;
}
return false;
}
}
} }

View file

@ -59,6 +59,7 @@
<ItemGroup> <ItemGroup>
<Compile Include="Ideology\GoodwillSituationWorker_MemeCompatibility.cs" /> <Compile Include="Ideology\GoodwillSituationWorker_MemeCompatibility.cs" />
<Compile Include="Harmony.cs" /> <Compile Include="Harmony.cs" />
<Compile Include="Ideology\Keyed.cs" />
<Compile Include="Ideology\PreceptDef_RequirementExtended.cs" /> <Compile Include="Ideology\PreceptDef_RequirementExtended.cs" />
<Compile Include="Ideology\Rituals\JobGiver_GangbangConsensual.cs" /> <Compile Include="Ideology\Rituals\JobGiver_GangbangConsensual.cs" />
<Compile Include="Ideology\Rituals\LordJob_Rituals.cs" /> <Compile Include="Ideology\Rituals\LordJob_Rituals.cs" />
@ -76,13 +77,6 @@
<Compile Include="Ideology\Utility.cs" /> <Compile Include="Ideology\Utility.cs" />
<Compile Include="VariousDefOf.cs" /> <Compile Include="VariousDefOf.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<ProjectReference Include="..\RJWSexperience\RJWSexperience.csproj">
<Project>{9c728e06-573b-4b04-a07f-acbf60cb424d}</Project>
<Name>RJWSexperience</Name>
<Private>False</Private>
</ProjectReference>
</ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="packages.config" /> <None Include="packages.config" />
</ItemGroup> </ItemGroup>

View file

@ -1,161 +1,145 @@
using System; using rjw;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Verse;
using RimWorld;
using rjw;
using UnityEngine;
using RJWSexperience.UI; using RJWSexperience.UI;
using UnityEngine;
using Verse;
namespace RJWSexperience namespace RJWSexperience
{ {
public static class Keyed public static class Keyed
{ {
public static string LustStatFactor(string value) => "LustStatFactor".Translate(value); public static string LustStatFactor(string value) => "LustStatFactor".Translate(value);
public static string SlaveStatFactor(string value) => "SlaveStatFactor".Translate(value); public static string SlaveStatFactor(string value) => "SlaveStatFactor".Translate(value);
public static string MemeStatFactor(string value) => "MemeStatFactor".Translate(value); public static string RS_LostVirgin(string pawn, string partner) => "RS_LostVirgin".Translate(pawn.Colorize(Color.yellow), partner.Colorize(Color.yellow));
public static string RS_LostVirgin(string pawn, string partner) => "RS_LostVirgin".Translate(pawn.Colorize(Color.yellow),partner.Colorize(Color.yellow)); public static string RS_Sex_Info(string sextype, string sexcount) => "RS_Sex_Info".Translate(sextype, sexcount);
public static string RS_Sex_Info(string sextype, string sexcount) => "RS_Sex_Info".Translate(sextype, sexcount); public static string RS_SAT_AVG(string avgsat) => "RS_SAT_AVG".Translate(avgsat);
public static string RS_SAT_AVG(string avgsat) => "RS_SAT_AVG".Translate(avgsat); public static string RS_HadBestSexDaysAgo(string days) => "RS_HadBestSexDaysAgo".Translate(days);
public static string RS_HadBestSexDaysAgo(string days) => "RS_HadBestSexDaysAgo".Translate(days);
public static readonly string Mod_Title = "RS_Mod_Title".Translate(); public static readonly string Mod_Title = "RS_Mod_Title".Translate();
public static readonly string SlaveStatFactorDefault = "SlaveStatFactorDefault".Translate(); public static readonly string SlaveStatFactorDefault = "SlaveStatFactorDefault".Translate();
public static readonly string RSVictimCondition = "RSVictimCondition".Translate(); public static readonly string RSTotalGatheredCum = "RSTotalGatheredCum".Translate();
public static readonly string RSBreederCondition = "RSBreederCondition".Translate(); public static readonly string RS_FloatMenu_CleanSelf = "RS_FloatMenu_CleanSelf".Translate();
public static readonly string RSNotHuman = "RSNotHuman".Translate(); public static readonly string RS_Best_Sextype = "RS_Best_Sextype".Translate();
public static readonly string RSNotAnimal = "RSNotAnimal".Translate(); public static readonly string RS_Recent_Sextype = "RS_Recent_Sextype".Translate();
public static readonly string RSShouldCanFuck = "RSShouldCanFuck".Translate(); public static readonly string RS_Sex_Partners = "RS_Sex_Partners".Translate();
public static readonly string RSTotalGatheredCum = "RSTotalGatheredCum".Translate(); public static readonly string RS_Cum_Swallowed = "RS_Cum_Swallowed".Translate();
public static readonly string RS_FloatMenu_CleanSelf = "RS_FloatMenu_CleanSelf".Translate(); public static readonly string RS_Selected_Partner = "RS_Selected_Partner".Translate();
public static readonly string RS_Best_Sextype = "RS_Best_Sextype".Translate(); public static readonly string RS_Sex_Count = "RS_Sex_Count".Translate();
public static readonly string RS_Recent_Sextype = "RS_Recent_Sextype".Translate(); public static readonly string RS_Orgasms = "RS_Orgasms".Translate();
public static readonly string RS_Sex_Partners = "RS_Sex_Partners".Translate(); public static readonly string RS_Recent_Sex_Partner = "RS_Recent_Sex_Partner".Translate();
public static readonly string RS_Cum_Swallowed = "RS_Cum_Swallowed".Translate(); public static readonly string RS_First_Sex_Partner = "RS_First_Sex_Partner".Translate();
public static readonly string RS_Selected_Partner = "RS_Selected_Partner".Translate(); public static readonly string RS_Most_Sex_Partner = "RS_Most_Sex_Partner".Translate();
public static readonly string RS_Sex_Count = "RS_Sex_Count".Translate(); public static readonly string RS_Best_Sex_Partner = "RS_Best_Sex_Partner".Translate();
public static readonly string RS_Orgasms = "RS_Orgasms".Translate(); public static readonly string RS_VirginsTaken = "RS_VirginsTaken".Translate();
public static readonly string RS_Recent_Sex_Partner = "RS_Recent_Sex_Partner".Translate(); public static readonly string RS_TotalSexHad = "RS_TotalSexHad".Translate();
public static readonly string RS_First_Sex_Partner = "RS_First_Sex_Partner".Translate(); public static readonly string RS_Recent_Sex_Partner_ToolTip = "RS_Recent_Sex_Partner_ToolTip".Translate();
public static readonly string RS_Most_Sex_Partner = "RS_Most_Sex_Partner".Translate(); public static readonly string RS_First_Sex_Partner_ToolTip = "RS_First_Sex_Partner_ToolTip".Translate();
public static readonly string RS_Best_Sex_Partner = "RS_Best_Sex_Partner".Translate(); public static readonly string RS_Most_Sex_Partner_ToolTip = "RS_Most_Sex_Partner_ToolTip".Translate();
public static readonly string RS_VirginsTaken = "RS_VirginsTaken".Translate(); public static readonly string RS_Best_Sex_Partner_ToolTip = "RS_Best_Sex_Partner_ToolTip".Translate();
public static readonly string RS_TotalSexHad = "RS_TotalSexHad".Translate(); public static readonly string RS_VirginsTaken_ToolTip = "RS_VirginsTaken_ToolTip".Translate();
public static readonly string RS_Recent_Sex_Partner_ToolTip = "RS_Recent_Sex_Partner_ToolTip".Translate(); public static readonly string RS_Raped = "RS_Raped".Translate();
public static readonly string RS_First_Sex_Partner_ToolTip = "RS_First_Sex_Partner_ToolTip".Translate(); public static readonly string RS_RapedMe = "RS_RapedMe".Translate();
public static readonly string RS_Most_Sex_Partner_ToolTip = "RS_Most_Sex_Partner_ToolTip".Translate(); public static readonly string RS_Sex_History = "RS_Sex_History".Translate();
public static readonly string RS_Best_Sex_Partner_ToolTip = "RS_Best_Sex_Partner_ToolTip".Translate(); public static readonly string RS_Statistics = "RS_Statistics".Translate();
public static readonly string RS_VirginsTaken_ToolTip = "RS_VirginsTaken_ToolTip".Translate(); public static readonly string RS_PartnerList = "RS_PartnerList".Translate();
public static readonly string RS_TotalSexHad_ToolTip = "RS_TotalSexHad_ToolTip".Translate(); public static readonly string RS_Sexuality = "RS_Sexuality".Translate();
public static readonly string RS_Raped = "RS_Raped".Translate(); public static readonly string RS_BeenRaped = "RS_BeenRaped".Translate();
public static readonly string RS_RapedMe = "RS_RapedMe".Translate(); public static readonly string RS_RapedSomeone = "RS_RapedSomeone".Translate();
public static readonly string RS_Sex_History = "RS_Sex_History".Translate(); public static readonly string RS_PreferRace = "RS_PreferRace".Translate();
public static readonly string RS_Statistics = "RS_Statistics".Translate(); public static readonly string Virgin = "Virgin".Translate();
public static readonly string RS_PartnerList = "RS_PartnerList".Translate(); public static readonly string Lust = "Lust".Translate();
public static readonly string RS_Sexuality = "RS_Sexuality".Translate(); public static readonly string Unknown = "Unknown".Translate();
public static readonly string RS_BeenRaped = "RS_BeenRaped".Translate(); public static readonly string Incest = "Incest".Translate();
public static readonly string RS_RapedSomeone = "RS_RapedSomeone".Translate(); public static readonly string None = "None".Translate();
public static readonly string RS_PreferRace = "RS_PreferRace".Translate(); public static readonly string RS_Bestiality = "RS_Bestiality".Translate();
public static readonly string Virgin = "Virgin".Translate(); public static readonly string RS_Interspecies = "RS_Interspecies".Translate();
public static readonly string Lust = "Lust".Translate(); public static readonly string RS_Necrophile = "RS_Necrophile".Translate();
public static readonly string Unknown = "Unknown".Translate(); public static readonly string RS_GatherCum = "RS_GatherCum".Translate();
public static readonly string Incest = "Incest".Translate(); public static readonly string RS_SexSkill = "RS_SexSkill".Translate();
public static readonly string None = "None".Translate(); public static readonly string RS_CumAddiction = "RS_CumAddiction".Translate();
public static readonly string RS_Bestiality = "RS_Bestiality".Translate(); public static readonly string RS_CumAddiction_Tooltip = "RS_CumAddiction_Tooltip".Translate();
public static readonly string RS_Interspecies = "RS_Interspecies".Translate(); public static readonly string RS_CumAddictiveness = "RS_CumAddictiveness".Translate();
public static readonly string RS_Normal = "RS_Normal".Translate(); public static readonly string RS_CumAddictiveness_Tooltip = "RS_CumAddictiveness_Tooltip".Translate();
public static readonly string RS_Necrophile = "RS_Necrophile".Translate(); public static readonly string RS_NumofTimes = "RS_NumofTimes".Translate();
public static readonly string RS_GatherCum = "RS_GatherCum".Translate(); public static readonly string RS_Ago = "RS_Ago".Translate();
public static readonly string RS_SexSkill = "RS_SexSkill".Translate(); public static readonly string RS_LastSex = "RS_LastSex".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();
public static readonly string Option_1_Label = "RSOption_1_Label".Translate(); public static readonly string Option_1_Label = "RSOption_1_Label".Translate();
public static readonly string Option_1_Desc = "RSOption_1_Desc".Translate(); public static readonly string Option_1_Desc = "RSOption_1_Desc".Translate();
public static readonly string Option_2_Label = "RSOption_2_Label".Translate(); public static readonly string Option_2_Label = "RSOption_2_Label".Translate();
public static readonly string Option_2_Desc = "RSOption_2_Desc".Translate(); public static readonly string Option_2_Desc = "RSOption_2_Desc".Translate();
public static readonly string Option_3_Label = "RSOption_3_Label".Translate(); public static readonly string Option_3_Label = "RSOption_3_Label".Translate();
public static readonly string Option_3_Desc = "RSOption_3_Desc".Translate(); public static readonly string Option_3_Desc = "RSOption_3_Desc".Translate();
public static readonly string Option_4_Label = "RSOption_4_Label".Translate(); public static readonly string Option_4_Label = "RSOption_4_Label".Translate();
public static readonly string Option_4_Desc = "RSOption_4_Desc".Translate(); public static readonly string Option_4_Desc = "RSOption_4_Desc".Translate();
public static readonly string Option_5_Label = "RSOption_5_Label".Translate(); public static readonly string Option_5_Label = "RSOption_5_Label".Translate();
public static readonly string Option_5_Desc = "RSOption_5_Desc".Translate(); public static readonly string Option_5_Desc = "RSOption_5_Desc".Translate();
public static readonly string Option_6_Label = "RSOption_6_Label".Translate(); public static readonly string Option_6_Label = "RSOption_6_Label".Translate();
public static readonly string Option_6_Desc = "RSOption_6_Desc".Translate(); public static readonly string Option_6_Desc = "RSOption_6_Desc".Translate();
public static readonly string Option_7_Label = "RSOption_7_Label".Translate(); public static readonly string Option_7_Label = "RSOption_7_Label".Translate();
public static readonly string Option_7_Desc = "RSOption_7_Desc".Translate(); public static readonly string Option_7_Desc = "RSOption_7_Desc".Translate();
public static readonly string Option_8_Label = "RSOption_8_Label".Translate(); public static readonly string Option_8_Label = "RSOption_8_Label".Translate();
public static readonly string Option_8_Desc = "RSOption_8_Desc".Translate(); public static readonly string Option_8_Desc = "RSOption_8_Desc".Translate();
public static readonly string Option_9_Label = "RSOption_9_Label".Translate(); public static readonly string Option_9_Label = "RSOption_9_Label".Translate();
public static readonly string Option_9_Desc = "RSOption_9_Desc".Translate(); public static readonly string Option_9_Desc = "RSOption_9_Desc".Translate();
public static readonly string Option_10_Label = "RSOption_10_Label".Translate(); public static readonly string Option_10_Label = "RSOption_10_Label".Translate();
public static readonly string Option_10_Desc = "RSOption_10_Desc".Translate(); public static readonly string Option_10_Desc = "RSOption_10_Desc".Translate();
public static readonly string Option_MinSexableFromLifestage_Label = "RSOption_MinSexableFromLifestage_Label".Translate(); public static readonly string Option_MinSexableFromLifestage_Label = "RSOption_MinSexableFromLifestage_Label".Translate();
public static readonly string Option_MinSexableFromLifestage_Desc = "RSOption_MinSexableFromLifestage_Desc".Translate(); public static readonly string Option_MinSexableFromLifestage_Desc = "RSOption_MinSexableFromLifestage_Desc".Translate();
public static string Translate(this PartnerOrderMode mode) public static string Translate(this PartnerOrderMode mode)
{ {
switch (mode) switch (mode)
{ {
case PartnerOrderMode.Normal: case PartnerOrderMode.Normal:
default: default:
return "RS_PONormal".Translate(); return "RS_PONormal".Translate();
case PartnerOrderMode.Recent: case PartnerOrderMode.Recent:
return "RS_PoRecent".Translate(); return "RS_PoRecent".Translate();
case PartnerOrderMode.Most: case PartnerOrderMode.Most:
return "RS_PoMost".Translate(); return "RS_PoMost".Translate();
case PartnerOrderMode.Name: case PartnerOrderMode.Name:
return "RS_PoName".Translate(); return "RS_PoName".Translate();
} }
} }
public static readonly string[] Sextype = public static readonly string[] Sextype =
{ {
((xxx.rjwSextype)0).ToString().Translate(), ((xxx.rjwSextype)0).ToString().Translate(),
((xxx.rjwSextype)1).ToString().Translate(), ((xxx.rjwSextype)1).ToString().Translate(),
((xxx.rjwSextype)2).ToString().Translate(), ((xxx.rjwSextype)2).ToString().Translate(),
((xxx.rjwSextype)3).ToString().Translate(), ((xxx.rjwSextype)3).ToString().Translate(),
((xxx.rjwSextype)4).ToString().Translate(), ((xxx.rjwSextype)4).ToString().Translate(),
((xxx.rjwSextype)5).ToString().Translate(), ((xxx.rjwSextype)5).ToString().Translate(),
((xxx.rjwSextype)6).ToString().Translate(), ((xxx.rjwSextype)6).ToString().Translate(),
((xxx.rjwSextype)7).ToString().Translate(), ((xxx.rjwSextype)7).ToString().Translate(),
((xxx.rjwSextype)8).ToString().Translate(), ((xxx.rjwSextype)8).ToString().Translate(),
((xxx.rjwSextype)9).ToString().Translate(), ((xxx.rjwSextype)9).ToString().Translate(),
((xxx.rjwSextype)10).ToString().Translate(), ((xxx.rjwSextype)10).ToString().Translate(),
((xxx.rjwSextype)11).ToString().Translate(), ((xxx.rjwSextype)11).ToString().Translate(),
((xxx.rjwSextype)12).ToString().Translate(), ((xxx.rjwSextype)12).ToString().Translate(),
((xxx.rjwSextype)13).ToString().Translate(), ((xxx.rjwSextype)13).ToString().Translate(),
((xxx.rjwSextype)14).ToString().Translate(), ((xxx.rjwSextype)14).ToString().Translate(),
((xxx.rjwSextype)15).ToString().Translate(), ((xxx.rjwSextype)15).ToString().Translate(),
((xxx.rjwSextype)16).ToString().Translate(), ((xxx.rjwSextype)16).ToString().Translate(),
((xxx.rjwSextype)17).ToString().Translate(), ((xxx.rjwSextype)17).ToString().Translate(),
((xxx.rjwSextype)18).ToString().Translate(), ((xxx.rjwSextype)18).ToString().Translate(),
((xxx.rjwSextype)19).ToString().Translate(), ((xxx.rjwSextype)19).ToString().Translate(),
((xxx.rjwSextype)20).ToString().Translate() ((xxx.rjwSextype)20).ToString().Translate()
}; };
public static readonly string[] Sexuality = public static readonly string[] Sexuality =
{ {
((Orientation)0).ToString().Translate(), ((Orientation)0).ToString().Translate(),
((Orientation)1).ToString().Translate(), ((Orientation)1).ToString().Translate(),
((Orientation)2).ToString().Translate(), ((Orientation)2).ToString().Translate(),
((Orientation)3).ToString().Translate(), ((Orientation)3).ToString().Translate(),
((Orientation)4).ToString().Translate(), ((Orientation)4).ToString().Translate(),
((Orientation)5).ToString().Translate(), ((Orientation)5).ToString().Translate(),
((Orientation)6).ToString().Translate(), ((Orientation)6).ToString().Translate(),
((Orientation)7).ToString().Translate(), ((Orientation)7).ToString().Translate(),
((Orientation)8).ToString().Translate(), ((Orientation)8).ToString().Translate(),
((Orientation)9).ToString().Translate(), ((Orientation)9).ToString().Translate(),
((Orientation)10).ToString().Translate() ((Orientation)10).ToString().Translate()
}; };
}
}
} }

View file

@ -65,17 +65,6 @@ namespace RJWSexperience
return value; return value;
} }
public static bool ContainAll(this string str, string[] tags)
{
string lstr = str.ToLower();
if (!tags.NullOrEmpty()) for (int i=0; i< tags.Count(); i++)
{
if (!lstr.Contains('[' + tags[i].ToLower() + ']')) return false;
}
return true;
}
public static float LustFactor(this Pawn pawn) public static float LustFactor(this Pawn pawn)
{ {
float lust = pawn.records.GetValue(VariousDefOf.Lust) * Configurations.LustEffectPower; float lust = pawn.records.GetValue(VariousDefOf.Lust) * Configurations.LustEffectPower;