mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 05:30:05 +01:00
Fishing lures box peeve (#90741)
## About The Pull Request This fixes a small excerpt from #90678: >"[...] double-examining it to see what extra items it can hold (normally all lures) only reports the Artificial Minnow as fitting." By making it use subtypesof instead of typesof for purpose of spawning lures and making the minnow its own subtype. ## Why It's Good For The Game Fixing a mild botherance. ## Changelog 🆑 fix: Examining a fishing lures box twice no longer says it can hold just artificial minnows. /🆑
This commit is contained in:
@@ -97,7 +97,7 @@ PROCESSING_SUBSYSTEM_DEF(fishing)
|
||||
|
||||
///init the list of things lures can catch
|
||||
lure_catchables = list()
|
||||
for(var/lure_type in typesof(/obj/item/fishing_lure))
|
||||
for(var/lure_type in subtypesof(/obj/item/fishing_lure))
|
||||
var/obj/item/fishing_lure/lure = new lure_type
|
||||
lure_catchables[lure_type] = list()
|
||||
for(var/obj/item/fish/fish as anything in spawned_fish)
|
||||
|
||||
@@ -62,8 +62,8 @@
|
||||
uses_left = 12
|
||||
|
||||
/obj/item/fishing_lure
|
||||
name = "artificial minnow"
|
||||
desc = "A fishing lure that may attract small fish. Too tiny, too large, or too picky prey won't be interested in it, though."
|
||||
name = "fishing lure"
|
||||
desc = "It's just that, a plastic piece of fishing equipment, yet fish yearn with every last molecule of their bodies to take a bite of it."
|
||||
icon = 'icons/obj/fishing.dmi'
|
||||
icon_state = "minnow"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
@@ -89,11 +89,6 @@
|
||||
|
||||
///Called for every fish subtype by the fishing subsystem when initializing, to populate the list of fish that can be catched with this lure.
|
||||
/obj/item/fishing_lure/proc/is_catchable_fish(obj/item/fish/fish, list/fish_properties)
|
||||
var/intermediate_size = FISH_SIZE_SMALL_MAX + (FISH_SIZE_NORMAL_MAX - FISH_SIZE_SMALL_MAX)
|
||||
if(!ISINRANGE(fish.size, FISH_SIZE_TINY_MAX * 0.5, intermediate_size))
|
||||
return FALSE
|
||||
if(length(list(/datum/fish_trait/vegan, /datum/fish_trait/picky_eater, /datum/fish_trait/nocturnal, /datum/fish_trait/heavy) & fish.fish_traits))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/item/fishing_lure/examine(mob/user)
|
||||
@@ -131,6 +126,19 @@
|
||||
multiplier += 10
|
||||
return multiplier
|
||||
|
||||
/obj/item/fishing_lure/minnow
|
||||
name = "artificial minnow"
|
||||
desc = "A fishing lure that may attract small fish. Too tiny, too large, or too picky prey won't be interested in it, though."
|
||||
icon_state = "minnow"
|
||||
|
||||
/obj/item/fishing_lure/minnow/is_catchable_fish(obj/item/fish/fish, list/fish_properties)
|
||||
var/intermediate_size = FISH_SIZE_SMALL_MAX + (FISH_SIZE_NORMAL_MAX - FISH_SIZE_SMALL_MAX)
|
||||
if(!ISINRANGE(fish.size, FISH_SIZE_TINY_MAX * 0.5, intermediate_size))
|
||||
return FALSE
|
||||
if(length(list(/datum/fish_trait/vegan, /datum/fish_trait/picky_eater, /datum/fish_trait/nocturnal, /datum/fish_trait/heavy) & fish.fish_traits))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/item/fishing_lure/plug
|
||||
name = "artificial plug lure"
|
||||
desc = "A bigger fishing lure that may attract larger fish. Tiny or picky prey will remain uninterested."
|
||||
|
||||
@@ -444,7 +444,7 @@
|
||||
|
||||
/obj/item/storage/box/fishing_lures/PopulateContents()
|
||||
new /obj/item/paper/lures_instructions(src)
|
||||
var/list/typesof = typesof(/obj/item/fishing_lure)
|
||||
var/list/typesof = subtypesof(/obj/item/fishing_lure)
|
||||
for(var/type in typesof)
|
||||
new type (src)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user