Skip to content

Commit

Permalink
Possible fixed a bug with people getting failed to load a wrapper types.
Browse files Browse the repository at this point in the history
  • Loading branch information
havietisov committed Nov 29, 2018
1 parent 40a9326 commit 5325758
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions CooperateRim/ParrotWrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ internal static void DebugSaveAssembly()
{
dynamicAssembly.Save(@"asm.dll");
}

static Random r = new Random();
static int parrot_counter = 9000;

public static void ParrotPatchExpressiontarget<T>(Expression<T> expr)
{
Expand Down Expand Up @@ -101,7 +101,7 @@ public static void ParrotPatchExpressiontarget<T>(Expression<T> expr)

int pos = 0;

TypeBuilder ass_patch = dynamicModule.DefineType("<parrot_patch_type>[" + r.Next().ToString() + "]");
TypeBuilder ass_patch = dynamicModule.DefineType("<parrot_patch_type>[" + (parrot_counter++) + "]");
MethodBuilder mbb = ass_patch.DefineMethod("[prefix]", MethodAttributes.Static | MethodAttributes.Public, typeof(bool), partchParams.ToArray());
List<Type> originalMethodArgs = new List<Type>();
List<Type> wrapperMethodArgs = new List<Type>();
Expand Down
2 changes: 1 addition & 1 deletion ModFolder/RimAlong/About/About.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
<author>6opoDuJIo</author>
<url>http://rimworldgame.com</url>
<targetVersion>1.0.0</targetVersion>
<description>Map cooperative mod. Build 0.2.6907.42841 </description>
<description>Map cooperative mod. Build 0.2.6907.43179 </description>
</ModMetaData>

0 comments on commit 5325758

Please sign in to comment.