Skip to content

Commit

Permalink
fixed compat issue with 1.3.3067
Browse files Browse the repository at this point in the history
  • Loading branch information
rheirman committed Jul 22, 2021
1 parent 7783124 commit 9923d2d
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 17 deletions.
Binary file modified 1.3/Assemblies/WhatTheHack.dll
Binary file not shown.
8 changes: 4 additions & 4 deletions 1.3/Source/WhatTheHack/Harmony/Dialog_FormCaravan.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,20 @@ static void Postfix(Dialog_FormCaravan __instance, bool __result)
}
}

[HarmonyPatch(typeof(Dialog_FormCaravan), "DoBottomButtons")]
class Dialog_FormCaravan_DoBottomButtons
[HarmonyPatch(typeof(Dialog_FormCaravan), "TrySend")]
class Dialog_FormCaravan_TrySend
{
static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions)
{
var instructionsList = new List<CodeInstruction>(instructions);
for (var i = 0; i < instructionsList.Count; i++)
{
CodeInstruction instruction = instructionsList[i];
if (instruction.opcode == OpCodes.Stloc_1)
if (instruction.opcode == OpCodes.Stloc_0)
{
Log.Message("found Stloc_1");
yield return new CodeInstruction(OpCodes.Ldarg_0);
yield return new CodeInstruction(OpCodes.Call, typeof(Dialog_FormCaravan_DoBottomButtons).GetMethod("AddWarnings"));
yield return new CodeInstruction(OpCodes.Call, typeof(Dialog_FormCaravan_TrySend).GetMethod("AddWarnings"));
}
yield return instruction;
}
Expand Down
2 changes: 1 addition & 1 deletion About/PublishedFileId.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2537592208
1505914869
5 changes: 1 addition & 4 deletions About/Version.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,5 @@
but no minimum version will be required -->

<!-- Optional. This specifies the version of your mod for the library. Otherwise, the version of your mod's assembly will be used. -->
<overrideVersion>4.0.0</overrideVersion>
<!-- Optional. Use this to specify the version of HugsLib you are targeting.
See https://github.com/UnlimitedHugs/RimworldHugsLib/releases for the current version of the library.-->
<requiredLibraryVersion>9.0.0</requiredLibraryVersion>
<overrideVersion>1.4.0</overrideVersion>
</VersionData>
8 changes: 0 additions & 8 deletions _PublisherPlus.xml

This file was deleted.

0 comments on commit 9923d2d

Please sign in to comment.