[EXILED::Events] BeingObserved event#72
Conversation
Co-Authored-By: ZeroTwo <63092138+notzer0two@users.noreply.github.com>
this is peak
VALERA771
left a comment
There was a problem hiding this comment.
Hmm... I'm not sure that you've tested your IL code
EXILED/Exiled.Events/Patches/Events/Scp173/Scp173BeingObserved.cs
Outdated
Show resolved
Hide resolved
EXILED/Exiled.Events/Patches/Events/Scp173/Scp173BeingObserved.cs
Outdated
Show resolved
Hide resolved
EXILED/Exiled.Events/Patches/Events/Scp173/Scp173BeingObserved.cs
Outdated
Show resolved
Hide resolved
|
|
Will do when I come back home, might be a little late kek |
[EXILED::Events] Scp173BeingObserved event[EXILED::Events] BeingObserved event
EXILED/Exiled.Events/EventArgs/Scp173/BeingObservedEventArgs.cs
Outdated
Show resolved
Hide resolved
EXILED/Exiled.Events/EventArgs/Scp173/BeingObservedEventArgs.cs
Outdated
Show resolved
Hide resolved
|
@ALEXWARELLC Do you mind testing it? |
Yeah, I'll do a test now. |
|
Hi! @6hundred9 So I've tried to perform some testing, but I've received an error which is messing with my ability to do so, and I am to believe that you'll need to verify that your IL has been written correctly. You can find the error below. [ERROR] [Exiled.Events] Patching by event failed!
HarmonyLib.HarmonyException: Patching exception in method System.Boolean PlayerRoles.PlayableScps.Scp173.Scp173ObserversTracker::IsObservedBy(ReferenceHub target, System.Single widthMultiplier) ---> System.Reflection.AmbiguousMatchException: Ambiguous match in Harmony patch for PluginAPI.Events.EventManager:ExecuteEvent ---> System.Reflection.AmbiguousMatchException: Ambiguous match found.
at System.DefaultBinder.FindMostDerivedNewSlotMeth (System.Reflection.MethodBase[] match, System.Int32 cMatches) [0x00024] in <75633565436c42f0a6426b33f0132ade>:0
at System.RuntimeType.GetMethodImplCommon (System.String name, System.Int32 genericParameterCount, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Reflection.CallingConventions callConv, System.Type[] types, System.Reflection.ParameterModifier[] modifiers) [0x00079] in <75633565436c42f0a6426b33f0132ade>:0
at System.RuntimeType.GetMethodImpl (System.String name, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Reflection.CallingConventions callConv, System.Type[] types, System.Reflection.ParameterModifier[] modifiers) [0x00000] in <75633565436c42f0a6426b33f0132ade>:0
at System.Type.GetMethod (System.String name, System.Reflection.BindingFlags bindingAttr) [0x0000e] in <75633565436c42f0a6426b33f0132ade>:0
at HarmonyLib.AccessTools+<>c__DisplayClass27_0.<Method>b__0 (System.Type t) [0x00000] in <0020ee40255b4dc7a0eb8b2a76225b38>:0
at HarmonyLib.AccessTools.FindIncludingBaseTypes[T] (System.Type type, System.Func`2[T,TResult] func) [0x00000] in <0020ee40255b4dc7a0eb8b2a76225b38>:0
at HarmonyLib.AccessTools.Method (System.Type type, System.String name, System.Type[] parameters, System.Type[] generics) [0x0004b] in <0020ee40255b4dc7a0eb8b2a76225b38>:0
--- End of inner exception stack trace ---
at HarmonyLib.AccessTools.Method (System.Type type, System.String name, System.Type[] parameters, System.Type[] generics) [0x0008e] in <0020ee40255b4dc7a0eb8b2a76225b38>:0
at Exiled.Events.Patches.Events.Scp173.BeingObserved+<>c.<Transpiler>b__0_0 (HarmonyLib.CodeInstruction i) [0x00000] in <fb60fd48ca7946a4b3d2e2dc27e76aec>:0
at System.Collections.Generic.List`1[T].FindIndex (System.Int32 startIndex, System.Int32 count, System.Predicate`1[T] match) [0x00033] in <75633565436c42f0a6426b33f0132ade>:0
at System.Collections.Generic.List`1[T].FindIndex (System.Predicate`1[T] match) [0x00000] in <75633565436c42f0a6426b33f0132ade>:0
at Exiled.Events.Patches.Events.Scp173.BeingObserved+<Transpiler>d__0.MoveNext () [0x0003c] in <fb60fd48ca7946a4b3d2e2dc27e76aec>:0
at System.Collections.Generic.List`1[T].AddEnumerable (System.Collections.Generic.IEnumerable`1[T] enumerable) [0x00059] in <75633565436c42f0a6426b33f0132ade>:0
at System.Collections.Generic.List`1[T]..ctor (System.Collections.Generic.IEnumerable`1[T] collection) [0x00062] in <75633565436c42f0a6426b33f0132ade>:0
at System.Linq.Enumerable.ToList[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x00018] in <1c318258bf0843289b0e2cbe692fee39>:0
at HarmonyLib.CodeTranspiler.GetResult (System.Reflection.Emit.ILGenerator generator, System.Reflection.MethodBase method) [0x00051] in <0020ee40255b4dc7a0eb8b2a76225b38>:0
at HarmonyLib.MethodBodyReader.FinalizeILCodes (HarmonyLib.Emitter emitter, System.Collections.Generic.List`1[T] transpilers, System.Collections.Generic.List`1[T] endLabels, System.Boolean& hasReturnCode) [0x0014a] in <0020ee40255b4dc7a0eb8b2a76225b38>:0
at HarmonyLib.MethodCopier.Finalize (HarmonyLib.Emitter emitter, System.Collections.Generic.List`1[T] endLabels, System.Boolean& hasReturnCode) [0x00000] in <0020ee40255b4dc7a0eb8b2a76225b38>:0
at HarmonyLib.MethodPatcher.CreateReplacement (System.Collections.Generic.Dictionary`2[System.Int32,HarmonyLib.CodeInstruction]& finalInstructions) [0x002be] in <0020ee40255b4dc7a0eb8b2a76225b38>:0
at HarmonyLib.PatchFunctions.UpdateWrapper (System.Reflection.MethodBase original, HarmonyLib.PatchInfo patchInfo) [0x00057] in <0020ee40255b4dc7a0eb8b2a76225b38>:0
at HarmonyLib.PatchClassProcessor.ProcessPatchJob (HarmonyLib.PatchJobs`1+Job[T] job) [0x000bb] in <0020ee40255b4dc7a0eb8b2a76225b38>:0
--- End of inner exception stack trace ---
at HarmonyLib.PatchClassProcessor.ReportException (System.Exception exception, System.Reflection.MethodBase original) [0x0010f] in <0020ee40255b4dc7a0eb8b2a76225b38>:0
at HarmonyLib.PatchClassProcessor.Patch () [0x00093] in <0020ee40255b4dc7a0eb8b2a76225b38>:0
at Exiled.Events.Features.Patcher.Patch (Exiled.Events.EventArgs.Interfaces.IExiledEvent event) [0x00054] in <fb60fd48ca7946a4b3d2e2dc27e76aec>:0Thanks,
|
|
I will do a test later today. |
Yay!!!!! |

Description
Describe the changes
A new Scp173 event for when it's being observed
What is the current behavior? (You can also link to an open issue here)
What is the new behavior? (if this is a feature change)
Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
No
Other information:
Types of changes
Submission checklist
Patches (if there are any changes related to Harmony patches)
Other