Files
Bubberstation/code/datums/elements/lazy_fishing_spot.dm
T
901f0b82bc [MIRROR] Miscellaneous fishing code changes. [MDB IGNORE] (#23237)
* Miscellaneous fishing code changes. (#77739)

## About The Pull Request
This PR contains a few changes that I hadn't got to do earlier,
including: different pressure / air mixture thresholds for different
fish (if amphibious), fish being able to be fed directly without the
need of an aquarium, replacing the `available_in_random_cases` variable
with a weight define of value 0, the preset fishing sources global list
so we don't have to manually instantiate lazy fishing spots and assign
them stupid string defines, chasm detritus made into datums, a couple
balloon alerts and removal of unused code.

## Why It's Good For The Game
The fishing portal generator UI is unused, the perfect variable for the
fishing minigame is also unused.
There's no reason for chasm detritus to be an item instead of a datum.
It isn't a map spawner.
Chasm chrabs, if given the amphibious trait, should be able to survive
Lavaland/Icemoon's atmosphere.
I don't even know why I made a snowflake proc to instantiate the
evolutions global list instead of `init_subtypes_w_path_keys`
The shiny lover and wary fish traits were actually making the minigame
slightly easier.
The background icons for the UI had a zero-alpha, one pixel thin stripe
on top that needed to be colored.
Improved `fish_source/proc/dispense_reward`.
Some doc comments and a typo or two.

## Changelog

🆑
add: You can now feed fish with the can of fish feed without having to
put the fish in a aquarium first.
balance: Some fish may survive in different, harsher atmospheres if
given the amphibious trait, like chasm chrabs on lavaland.
qol: aquarium now uses balloon alerts when feeding fish.
fix: The wary and shiny lover no longer incorrectly remove difficulty
from the minigame if conditions aren't met.
/🆑

* Miscellaneous fishing code changes.

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2023-08-21 11:39:47 -04:00

29 lines
1.0 KiB
Plaintext

/**
* Lazy fishing spot element so fisheable turfs do not have a component each since
* they're usually pretty common on their respective maps (lava/water/etc)
*/
/datum/element/lazy_fishing_spot
element_flags = ELEMENT_BESPOKE | ELEMENT_DETACH_ON_HOST_DESTROY // Detach for turfs
argument_hash_start_idx = 2
var/configuration
/datum/element/lazy_fishing_spot/Attach(datum/target, configuration)
. = ..()
if(!isatom(target))
return ELEMENT_INCOMPATIBLE
if(!ispath(configuration, /datum/fish_source) || configuration == /datum/fish_source)
CRASH("Lazy fishing spot has incorrect configuration passed in: [configuration].")
src.configuration = configuration
RegisterSignal(target, COMSIG_PRE_FISHING, PROC_REF(create_fishing_spot))
/datum/element/lazy_fishing_spot/Detach(datum/target)
UnregisterSignal(target, COMSIG_PRE_FISHING)
return ..()
/datum/element/lazy_fishing_spot/proc/create_fishing_spot(datum/source)
SIGNAL_HANDLER
source.AddComponent(/datum/component/fishing_spot, GLOB.preset_fish_sources[configuration])
Detach(source)