lucaskfreitas / ImmersiveSprinklers

Fork of Immersive Sprinklers, a Stardew Valley mod originally from aedenthorn.
GNU General Public License v3.0
1 stars 1 forks source link

possible issue with patching the axe to pickup the sprinklers #1

Open jacob-keller opened 7 months ago

jacob-keller commented 7 months ago

https://github.com/lucaskfreitas/ImmersiveSprinklers/blob/6e48921615fc903b6c07a5e6573b4417796ec30e/CodePatches.cs#L329

A few weeks before 1.6 launched, I ran into an issue with the original mod related to the Axe.DoFunction patch. For some (currently unknown) reason, the patch function was being called frequently in many cases other than when I used the Axe. I am not sure why, but it resulted in the behavior of picking up every sprinkler the moment I ran my mouse over it. I noticed that the issue would not happen for a few in-game days and then suddenly start happening. I added tracing to the patch function to see when it executed and found it would execute sometimes at random times like when riding a horse. In the buggy state it started happening basically any time the mouse was moved.

I worked around this by disabling the patch function for the axe. I did not have issues with the pickaxe removal.

I don't know what causes this yet, but I suspect its something weird with harmony patching. I would suggest at least adding an option to the config to disable the pickup with tools or pickup with the specific tool. Alternatively, figuring out the root cause of the patching issue could be good.

This may also not affect the SDV 1.6 version of the game at all. I wanted to report this here in the hopes that we can root cause and make sure this issue doesn't crop up again :D

lucaskfreitas commented 7 months ago

Thanks for the info! I'll check it out for sure.

jacob-keller commented 7 months ago

Once I update to 1.6 I'll give it a run and update if I find any further info :D I'm still figuring out which mods I need to update or disable right now.

On Sun, Mar 24, 2024, 3:52 PM Lucas Kaminski @.***> wrote:

Thanks for the info! I'll check it out for sure.

— Reply to this email directly, view it on GitHub https://github.com/lucaskfreitas/ImmersiveSprinklers/issues/1#issuecomment-2016974751, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGVRX3W4SEX6XRKGBZSJEDYZ5KI7AVCNFSM6AAAAABFF6EFIKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJWHE3TINZVGE . You are receiving this because you authored the thread.Message ID: @.***>