Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makes more fish count as fish for fishing #6083

Merged
merged 1 commit into from
Oct 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions code/__DEFINES/fishing/fishing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@
#define FISHING_MINIGAME_RULE_WEIGHTED_BAIT "weighted"
#define FISHING_MINIGAME_RULE_LIMIT_LOSS "limit_loss"

#define isfish(fish_type) (ispath(fish_type, /obj/item/fish) || ispath(fish_type, /mob/living/simple_mob/animal/passive/fish))

/// The default additive value for fishing hook catch weight modifiers.
#define FISHING_DEFAULT_HOOK_BONUS_ADDITIVE 0
/// The default multiplicative value for fishing hook catch weight modifiers.
Expand Down
4 changes: 2 additions & 2 deletions code/modules/fishing/equipment/hook.dm
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
// chasm_detritus_type = /obj/item/chasm_detritus/restricted/objects

/obj/item/fishing_hook/magnet/get_hook_bonus_multiplicative(fish_type, datum/fish_source/source)
if(fish_type == FISHING_DUD || ispath(fish_type, /obj/item/fish))
if(fish_type == FISHING_DUD || isfish(fish_type))
return ..()
// We multiply the odds by five for everything that's not a fish nor a dud
return MAGNET_HOOK_BONUS_MULTIPLIER
Expand Down Expand Up @@ -103,7 +103,7 @@

/obj/item/fishing_hook/rescue/get_hook_bonus_multiplicative(fish_type, datum/fish_source/source)
// Sorry, you won't catch fish with this.
if(ispath(fish_type, /obj/item/fish))
if(isfish(fish_type))
return RESCUE_HOOK_FISH_MULTIPLIER
return ..()

Expand Down