StardewHack icon indicating copy to clipboard operation
StardewHack copied to clipboard

[HarvestWithScythe] Deep woods support

Open bcmpinc opened this issue 5 years ago • 2 comments

Scythe doesn't work on forage from the deep woods mod See https://forums.nexusmods.com/index.php?showtopic=6939211/#entry75979523.

bcmpinc avatar Feb 01 '20 21:02 bcmpinc

Hi! Just saw that you have this feature planned. I had a quick look at your source code to figure out why it doesn't work. Unfortunately I don't have time to implement this and create a PR, but basically the reason your mod can't harvest flowers in DeepWoods, is because flowers are a custom class that inherits HoeDirt and overrides the performToolAction method you patch:

https://github.com/maxvollmer/DeepWoodsMod/blob/master/DeepWoodsMod/Flower.cs#L45

I essentially disable all tools, so that flowers in the forest can't be destroyed, tilled, planted into etc., and the method you patch never gets called.

In order to make the scythe work with your mod, you'd need to patch the performToolAction method in the DeepWoods Flower class directly.

maxmakesmods avatar Sep 05 '21 15:09 maxmakesmods

Hi,

Thanks for reaching out to me. I try to avoid patching mods directly, as I might have to update my mod every time the patched mod updates. However, there's an easy way to implement integration with my mod from your side.

If you add the following line as the first in performToolAction, our mods should cooperate correctly: if (t is MeleeWeapon) return performToolAction(t, damage, tileLocation, location);

bcmpinc avatar Sep 05 '21 17:09 bcmpinc