Skip to content

Commit

Permalink
fix #4
Browse files Browse the repository at this point in the history
  • Loading branch information
art0007i committed Sep 29, 2023
1 parent c28e1b2 commit 22990bd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions ShowDelegates/Helper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,17 +106,17 @@ internal class Helper

public static Type ClassifyDelegate(MethodInfo m)
{
if (argumentLookup.TryGetValue(new(m), out var t))
/*if (argumentLookup.TryGetValue(new(m), out var t))
{
return t;
}
}*/
var p = m.GetParameters().Select(para => para.ParameterType).ToArray();
if(m.ReturnType == typeof(void))
{
if(p.Length == 3 && p[0] == typeof(IButton) && p[1] == typeof(ButtonEventData))
/*if(p.Length == 3 && p[0] == typeof(IButton) && p[1] == typeof(ButtonEventData))
{
return typeof(ButtonEventHandler<>).MakeGenericType(p[2]);
}
}*/
return Expression.GetActionType(p);
}
else
Expand Down
4 changes: 2 additions & 2 deletions ShowDelegates/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.0.0")]
[assembly: AssemblyFileVersion("2.0.0")]
[assembly: AssemblyVersion("2.1.0")]
[assembly: AssemblyFileVersion("2.1.0")]
6 changes: 3 additions & 3 deletions ShowDelegates/ShowDelegates.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class ShowDelegates : ResoniteMod
{
public override string Name => "ShowDelegates";
public override string Author => "art0007i";
public override string Version => "2.0.0";
public override string Version => "2.1.0";
public override string Link => "https://github.com/art0007i/ShowDelegates/";

[AutoRegisterConfigKey]
Expand Down Expand Up @@ -160,8 +160,8 @@ private static bool Prefix(WorkerInspector __instance, Worker worker, UIBuilder
}
if (delegateType == null)
{
Error("Unmapped type. Please report this message to the mod author: Could not identify " + info.method + " on type " + info.method.DeclaringType);
ui.Text(funName("<i>unknown</i>", info.method), true, new Alignment?(Alignment.MiddleLeft));
//Error("Unmapped type. Please report this message to the mod author: Could not identify " + info.method + " on type " + info.method.DeclaringType);
ui.Text("<color=orange>" + funName("<i>unknown</i>", info.method), true, new Alignment?(Alignment.MiddleLeft));
continue;
}
}
Expand Down

0 comments on commit 22990bd

Please sign in to comment.