Compare commits

...

2 commits

Author SHA1 Message Date
amevarashi
a722673244 1.0.2.1 2023-06-28 20:04:08 +05:00
amevarashi
83ffa00fb6 Fixed SecondaryRomanceChanceFactor transpiler 2023-06-28 20:02:42 +05:00
4 changed files with 10 additions and 5 deletions

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Manifest> <Manifest>
<identifier>RJWSexperienceIdeology</identifier> <identifier>RJWSexperienceIdeology</identifier>
<version>1.0.2.0</version> <version>1.0.2.1</version>
<dependencies> <dependencies>
<li>RimJobWorld >= 5.3.0</li> <li>RimJobWorld >= 5.3.0</li>
</dependencies> </dependencies>

View file

@ -1,3 +1,5 @@
## Version 1.0.2.1
* Fixed SecondaryRomanceChanceFactor patch
## Version 1.0.2.0 ## Version 1.0.2.0
* Removed Incestuos_IncestOnly conflict with Zoophile * Removed Incestuos_IncestOnly conflict with Zoophile
* Patched manual romance to respect incestuous precepts * Patched manual romance to respect incestuous precepts

View file

@ -1,4 +1,5 @@
using HarmonyLib; using HarmonyLib;
using Mono.Cecil.Cil;
using RimWorld; using RimWorld;
using rjw; using rjw;
using RJWSexperience.Ideology.HistoryEvents; using RJWSexperience.Ideology.HistoryEvents;
@ -145,7 +146,7 @@ namespace RJWSexperience.Ideology.Patches
// store results in the same place original loop does and remove everything else until Endfinaly // store results in the same place original loop does and remove everything else until Endfinaly
IEnumerator<CodeInstruction> enumerator = instructions.GetEnumerator(); IEnumerator<CodeInstruction> enumerator = instructions.GetEnumerator();
bool endOfInstructions = enumerator.MoveNext(); bool endOfInstructions = !enumerator.MoveNext();
// Find and replace GetRelations // Find and replace GetRelations
while (!endOfInstructions) while (!endOfInstructions)
@ -160,7 +161,7 @@ namespace RJWSexperience.Ideology.Patches
} }
yield return instruction; yield return instruction;
endOfInstructions = enumerator.MoveNext(); endOfInstructions = !enumerator.MoveNext();
} }
if (endOfInstructions) if (endOfInstructions)
@ -179,7 +180,7 @@ namespace RJWSexperience.Ideology.Patches
break; break;
} }
endOfInstructions = enumerator.MoveNext(); endOfInstructions = !enumerator.MoveNext();
} }
if (endOfInstructions) if (endOfInstructions)
@ -197,7 +198,7 @@ namespace RJWSexperience.Ideology.Patches
break; break;
} }
endOfInstructions = enumerator.MoveNext(); endOfInstructions = !enumerator.MoveNext();
} }
if (endOfInstructions) if (endOfInstructions)
@ -211,6 +212,8 @@ namespace RJWSexperience.Ideology.Patches
{ {
yield return enumerator.Current; yield return enumerator.Current;
} }
if (Prefs.DevMode) Log.Message("[RSI] Successfully transpiled Pawn_RelationsTracker.SecondaryRomanceChanceFactor");
} }
[HarmonyPatch(typeof(Precept), nameof(Precept.GetTip))] [HarmonyPatch(typeof(Precept), nameof(Precept.GetTip))]