diff --git a/code/datums/components/profound_fisher.dm b/code/datums/components/profound_fisher.dm index 1e512289a6e..836fc7e2167 100644 --- a/code/datums/components/profound_fisher.dm +++ b/code/datums/components/profound_fisher.dm @@ -133,7 +133,7 @@ if(!do_after(source, fishing_speed, target = target) && !QDELETED(fish_spot)) qdel(float) return - var/reward_loot = fish_spot.roll_reward(our_rod, source) + var/reward_loot = fish_spot.roll_mindless_reward(our_rod, source, target) fish_spot.dispense_reward(reward_loot, source, target) playsound(float, 'sound/effects/bigsplash.ogg', 100) qdel(float) diff --git a/code/modules/fishing/sources/_fish_source.dm b/code/modules/fishing/sources/_fish_source.dm index 58c9e1aea65..d984310b3cb 100644 --- a/code/modules/fishing/sources/_fish_source.dm +++ b/code/modules/fishing/sources/_fish_source.dm @@ -230,10 +230,16 @@ GLOBAL_LIST_INIT(specific_fish_icons, generate_specific_fish_icons()) SHOULD_NOT_OVERRIDE(TRUE) rewards += roll_reward(rod, fisherman, location) -/// Returns a typepath or a special value which we use for spawning dispensing a reward later. +/// Returns a typepath, instance or another special value which we use for dispensing a reward later. /datum/fish_source/proc/roll_reward(obj/item/fishing_rod/rod, mob/fisherman, atom/location) return pick_weight(get_modified_fish_table(rod, fisherman, location)) || FISHING_DUD +/// Version of roll_reward() that blacklists objects that shouldn't be caught by ai-controlled mobs. +/datum/fish_source/proc/roll_mindless_reward(obj/item/fishing_rod/rod, mob/fisherman, atom/location) + var/list/final_table = get_modified_fish_table(rod, fisherman, location) + final_table -= profound_fisher_blacklist + return pick_weight(final_table) || FISHING_DUD + /** * Used to register signals or add traits and the such right after conditions have been cleared * and before the minigame starts. @@ -360,9 +366,6 @@ GLOBAL_LIST_INIT(specific_fish_icons, generate_specific_fish_icons()) if(HAS_TRAIT(rod, TRAIT_ROD_REMOVE_FISHING_DUD)) final_table -= FISHING_DUD - - if(HAS_TRAIT(fisherman, TRAIT_PROFOUND_FISHER) && !fisherman.client) - final_table -= profound_fisher_blacklist for(var/result in final_table) final_table[result] *= rod.hook.get_hook_bonus_multiplicative(result) final_table[result] += rod.hook.get_hook_bonus_additive(result)//Decide on order here so it can be multiplicative diff --git a/code/modules/unit_tests/fish_unit_tests.dm b/code/modules/unit_tests/fish_unit_tests.dm index fb4dc8f291d..bdc4c4d2433 100644 --- a/code/modules/unit_tests/fish_unit_tests.dm +++ b/code/modules/unit_tests/fish_unit_tests.dm @@ -455,10 +455,8 @@ /datum/fish_source/unit_test_profound_fisher fish_table = list(/obj/item/fish/testdummy = 1) fish_counts = list(/obj/item/fish/testdummy = 2) - fish_source_flags = parent_type::fish_source_flags /datum/fish_source/unit_test_all_fish - fish_source_flags = parent_type::fish_source_flags /datum/fish_source/unit_test_all_fish/New() for(var/fish_type as anything in subtypesof(/obj/item/fish))