-
Notifications
You must be signed in to change notification settings - Fork 127
Open
Description
The mod wasn't submerging the crab pots due to a lack of bait, however I have the lure master profession.
I solved it with the code below, which can be implemented in the next version.
private const int LuremasterProfessionId = 11;
private static bool HasEffectiveBait(CrabPot pot)
{
if (pot.bait.Value is not null)
return true;
return Game1.player is not null && Game1.player.professions.Contains(LuremasterProfessionId);
}
public class CrabPot_draw_Patch
{
public static bool Prefix(CrabPot __instance, SpriteBatch spriteBatch, int x, int y, ref float ___yBob, Vector2 ___shake)
{
bool hasCatch = __instance.heldObject.Value is not null || __instance.readyForHarvest.Value;
bool shouldSubmerge = hasCatch || HasEffectiveBait(__instance);
if (!Config.EnableMod || !shouldSubmerge || (hasCatch && __instance.heldObject.Value is not null && !Config.SubmergeHarvestable))
return true;
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels