Skip to content

Commit

Permalink
Stop excluding "MakeBombardmentMote" from mote patches (#460)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
SokyranTheDragon authored May 24, 2024
1 parent 7a82bb2 commit 8068379
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Source/Client/MultiplayerStatic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 8068379

Please sign in to comment.