From 544997918a82a678d3bb7367b235d191c2b76c53 Mon Sep 17 00:00:00 2001 From: Carnagion Date: Sun, 14 Aug 2022 18:41:07 +0200 Subject: [PATCH 1/2] Include static methods when searching for mod startup methods --- Modding/ModLoader.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modding/ModLoader.cs b/Modding/ModLoader.cs index f2a2c18..9ffe957 100644 --- a/Modding/ModLoader.cs +++ b/Modding/ModLoader.cs @@ -112,7 +112,7 @@ private static void StartupMod(Mod mod) // Invoke all static methods annotated with [Startup] along with the supplied parameters (if any) mod.Assemblies .SelectMany(assembly => assembly.GetTypes()) - .SelectMany(type => type.GetMethods(BindingFlags.NonPublic | BindingFlags.Public)) + .SelectMany(type => type.GetMethods(BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.Public)) .Select(method => (method, method.GetCustomAttribute())) .Where(pair => pair.Item2 is not null) .ForEach(pair => pair.Item1.Invoke(null, pair.Item2.Parameters)); From 9a32597dd1f2c51ee811be8d5367db0dad70d17e Mon Sep 17 00:00:00 2001 From: Carnagion Date: Wed, 17 Aug 2022 07:12:58 +0200 Subject: [PATCH 2/2] Update package version --- Modot.csproj | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Modot.csproj b/Modot.csproj index 609809c..ead8a9b 100644 --- a/Modot.csproj +++ b/Modot.csproj @@ -8,7 +8,7 @@ true true - 2.0.0 + 2.0.1 Modot Carnagion A mod loader and API for applications made using Godot, with the ability to load C# assemblies, XML data, and resource packs at runtime. diff --git a/README.md b/README.md index e2a2608..4eef7fa 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ A more detailed explanation of all features along with instructions on usage is Simply include the following lines in a Godot project's `.csproj` file (either by editing the file manually or letting an IDE install the package): ```xml - + ```