Skip to content

Commit

Permalink
Restrict fishing rod storage to food items (#21784)
Browse files Browse the repository at this point in the history
  • Loading branch information
pgmzeta authored Dec 24, 2024
1 parent 9a7ae60 commit 82b6c05
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions code/modules/fishing/fishing_gear.dm
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@
New()
..()
RegisterSignal(src, COMSIG_ITEM_ATTACKBY_PRE, PROC_REF(attackby_pre)) // Storage for a single lure item
var/list/fishing_rods = list(/obj/item/fishing_rod, /obj/item/fishing_rod/basic, /obj/item/fishing_rod/upgraded, /obj/item/fishing_rod/master)
src.create_storage(/datum/storage, max_wclass = W_CLASS_NORMAL, slots = 1, prevent_holding = fishing_rods)
src.create_storage(/datum/storage, can_hold = list(/obj/item/reagent_containers/food), max_wclass = W_CLASS_NORMAL, slots = 1)

disposing()
UnregisterSignal(src, COMSIG_ITEM_ATTACKBY_PRE)
Expand Down
4 changes: 2 additions & 2 deletions code/modules/fishing/fishing_lootpools.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
var/minimum_rod_tier = 0
/// what tier of rod is the highest to have access to the lootable?
var/maximum_rod_tier = INFINITY
/// what kind of item is needed as a lure
var/obj/item/required_lure = null
/// what kind of food item is needed as a lure
var/obj/item/reagent_containers/food/required_lure = null

/// This proc checks for all the conditionals that could apply to a fishing spot. Modify that for special conditions.
/datum/fishing_lootpool/proc/check_conditionals(var/mob/user, var/obj/item/fishing_rod/fishing_rod)
Expand Down

0 comments on commit 82b6c05

Please sign in to comment.