Skip to content

Commit

Permalink
0.5.2 (#33)
Browse files Browse the repository at this point in the history
### Winch
- Fixed bug that caused vanilla exotics to not appear in exotic bait (Resolves #32)
  • Loading branch information
MegaPiggy authored Oct 14, 2024
2 parents 98df17f + 2ff0227 commit cad5b0f
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
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
2 changes: 1 addition & 1 deletion Winch/mod_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"Name": "Winch",
"Author": "Hacktix",
"ModGUID": "hacktix.winch",
"Version": "0.5.1"
"Version": "0.5.2"
}

0 comments on commit cad5b0f

Please sign in to comment.