Skip to content

Commit

Permalink
Fix exotics not appearing in exotic bait
Browse files Browse the repository at this point in the history
  • Loading branch information
MegaPiggy committed Oct 14, 2024
1 parent 8ec62fd commit 9479456
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions Winch/Patches/API/ItemLoadPatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,39 @@ public static void ChangeHarvestables(IList<ItemData> items)
}
}

public static void ChangeFish(IList<ItemData> items)
{
var fishes = items.WhereType<ItemData, FishItemData>();
foreach (var fish in fishes)
{
switch (fish.id)
{
case "oarfish":
case "oarfish-ab-1":
case "coelacanth":
case "coelacanth-ab-1":
case "gulper-eel":
case "gulper-eel-ab-1":
case "goliath-tigerfish":
case "goliath-tigerfish-ab-1":
case "sleeper-shark":
case "sleeper-shark-ab-1":
fish.canAppearInBaitBalls = true;
break;
default:
break;
}
}
}

public static void Prefix(ItemManager __instance, AsyncOperationHandle<IList<ItemData>> handle)
{
if (handle.Result == null || handle.Status != AsyncOperationStatus.Succeeded) return;

ChangeDredgeCrane(handle.Result);
ChangeBaits(handle.Result);
ChangeHarvestables(handle.Result);
ChangeFish(handle.Result);
ItemUtil.AddModdedItemData(handle.Result);
DredgeEvent.AddressableEvents.ItemsLoaded.Trigger(__instance, handle, true);
}
Expand Down

0 comments on commit 9479456

Please sign in to comment.