cmooref17 / Lethal-Company-TooManyEmotes

https://thunderstore.io/c/lethal-company/p/FlipMods/TooManyEmotes/
MIT License
14 stars 5 forks source link

[Log Conflict] with LogNeuter, cause issue that will made no changes to method: GameNetcodeStuff.PlayerControllerB|ItemSecondaryUse_performed #128

Closed CoolLKKPS closed 4 weeks ago

CoolLKKPS commented 2 months ago

so in vanilla game, u will see some trash logs similar like: secondary use A secondary use B secondary use C secondary use D secondary use E secondary use F secondary use G

and if u install LogNeuter, u can see this is from [GameNetcodeStuff.PlayerControllerB|ItemSecondaryUse_performed], but this mod will cause LogNeuter to made no changes to that method, this is a big conflict and will stop people diagnosing by seeing logs

CoolLKKPS commented 1 month ago

if u don't know what can cause that, here the config

CoolLKKPS commented 1 month ago

BlueAmulet.LogNeuter.zip

cmooref17 commented 1 month ago

Sorry for the late reply. I'm not sure why this mod would do that. I can look into this later, though. Thanks for letting me know!

cmooref17 commented 1 month ago

After looking, this is my only reference to this method, and for various reasons I block this method if the emote menu is open.

[HarmonyPatch(typeof(PlayerControllerB), "ItemSecondaryUse_performed")]
[HarmonyPrefix]
public static bool PreventItemSecondaryUseInMenu(InputAction.CallbackContext context, PlayerControllerB __instance)
{
    if (__instance != localPlayerController || ConfigSettings.disableEmotesForSelf.Value || LCVR_Compat.LoadedAndEnabled)
        return true;
    return !isMenuOpen;
}

To clarify, if this method returns false, it blocks the original code from running. This is because I don't want items using their secondary use effects while the emote menu is open.

Or is it always blocking this method?

cmooref17 commented 1 month ago

Maybe I'm confused what you're trying to say. What changes does LogNeuter make to this method that my mod is blocking? I thought you were trying to say those logs don't appear anymore when TooManyEmotes is enabled.

CoolLKKPS commented 1 month ago

what i trying to do is block spamming logs, bc that hindering me from investigating the issues, idk why logneuter refuse to block that method, but that did cause some spamming logs appear again, so i like to know why