From 80683793c3958c91e3b55ab057575ac88a7e8e01 Mon Sep 17 00:00:00 2001 From: SokyranTheDragon <36712560+SokyranTheDragon@users.noreply.github.com> Date: Fri, 24 May 2024 23:47:04 +0200 Subject: [PATCH] Stop excluding "MakeBombardmentMote" from mote patches (#460) It was excluded due to it calling `MakeBombardmentMote_NewTmp`, which would cause warnings from Harmony. However, at some point the `_NewTmp` method was removed (it's not there in the latest 1.4 release). The exception to the patches can now be removed without HugsLib complaining. --- Source/Client/MultiplayerStatic.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Source/Client/MultiplayerStatic.cs b/Source/Client/MultiplayerStatic.cs index 96a5f662..df943b0b 100644 --- a/Source/Client/MultiplayerStatic.cs +++ b/Source/Client/MultiplayerStatic.cs @@ -353,8 +353,7 @@ void TryPatch(MethodBase original, HarmonyMethod prefix = null, HarmonyMethod po var canEverSpectate = typeof(RitualRoleAssignments).GetMethod(nameof(RitualRoleAssignments.CanEverSpectate)); var effectMethods = new MethodBase[] { subSustainerStart, sampleCtor, subSoundPlay, effecterTick, effecterTrigger, effecterCleanup, randomBoltMesh, drawTrackerCtor, randomHair }; - var moteMethods = typeof(MoteMaker).GetMethods(BindingFlags.Static | BindingFlags.Public) - .Where(m => m.Name != "MakeBombardmentMote"); // Special case, just calls MakeBombardmentMote_NewTmp, prevents Hugslib complaints + var moteMethods = typeof(MoteMaker).GetMethods(BindingFlags.Static | BindingFlags.Public); var fleckMethods = typeof(FleckMaker).GetMethods(BindingFlags.Static | BindingFlags.Public) .Where(m => m.ReturnType == typeof(void)) .Concat(typeof(FleckManager).GetMethods() // FleckStatic uses Rand in Setup method, FleckThrown uses RandomInRange in TimeInterval. May as well catch all in case mods do the same.