mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-07 07:22:56 +00:00
## About The Pull Request This PR mainly adds more fish and more fishing spots to the game, while refactoring a few aspects of the fishing minigame. Listing out with the new fish: - Arctic char: mainly filler content for the ice hole fishing spot - Sockeye Salmon: ditto but also provides better fillets that boost the quality of resulting food items when cooked or used in recipes - Soulfish: joke content, found by the cursed spring ruin - Skin Crab: also a joke found by the cursed spring - Bump-Fish: filler for the sand fishing spot - Burrower Crab: ditto, reusing a fish sprite I made last year - Sand Surfer: ditto - Three-Eyed Goldfish: It's a reference, doh - Stingray: A modestly weaponizable fish (whoops I've forgot to set the hit sounds), it possess a few traits that make it deliver bits of venom each time you hit someone with it - Swordfish: Huge-ass fish that may require two hands to wield (or not, if the RNG wants to make it smaller). Stats-wise, it's more or less the equivalent of the captain sabre, if not stronger (and more unwieldy due to size and weight). Becomes weaker when dead. Also gives better quality fillets. - Chainsawfish: A mutation of the goldfish with some size, weight and traits requirements, but can also be found on emagged fishing portals. Stronger than the swordfish, it behaves sort of like a chainsaw, with the similar tool behaviour and var values. Also becomes weaker when dead. As for the fishing spots, you can now fish on sand turfs, at the cursed springs or on ice. Rivers/jungle water now has its own fishing spot datum, and no longer uses the generic fishing portal one. To fish on ice, you first have to carve a hole with a pick or a shovel. I've also refactored the fish "AI" hardcoded stuff used in the fishing minigame into their own datums, which let me add a few fancier ways to how the fish moves during the minigame (i.e. the soulfish moving at 1 FPS or the chainsawfish getting faster and faster). As for the sword and chainsaw fish, their potential strength is balanced out by the need of keeping them alive, as well as the potential cumbersomeness, two-handed wielding and potential slowdown from the excessive weight of the fish (Thank you Big Slappy for the inspiration). Other minor changes include: Pufferfish giving better quality fillets (too bad they're poisonous, I'll go and make a skillchip to let cooks safely separate the poisonous liver from the fillets); McGill The lawyer's goldfish) having a 15% of being three-eyed; the aforementioned slowdown from fish weight and two-handed carry from fish size; a couple new fish icons (the ones that hint you on what you're trying to catch) for the fishing minigame; a few adjustments to prevent self-reproducing fish from ignoring the population cap and let fish with a stable population of 1 to crossbreed (also gotta make a different PR to let it happen rarely without the crossbreeding trait). This PR is still a WIP, gotta test it several times. ## Why It's Good For The Game Fishing is something I've been working on for about a year now, but there are still a few places where it's kinda lackluster, like there's not enough diverse fishing spots or useful fish (I'll be working on a separate PR to make the logistic of a carrying a fish around without letting it die a tad easier). Also, look at these sprites:  Can you guess which is which? ## Changelog For the sake of not dumping players with niche information 90% of the players won't understand, I'll keep the CL pretty generic 🆑 add: Added twelve new fish types to the game. Some are cool, other are not, some come with their own special traits and some are straight-up weapons. add: Added more fishing spots to the game. Sand, ice, rivers, the cursed spring... balance: A few fish like salmon, swordfish and pufferfish (poisonous btw) now give better quality fillets when butchered, which can improve the quality of food that uses them even further. balance: Excessive fish weight will make the fish slowier to carry, while excessive size may make it require two hands. balance: Adjusted size, weight and cooldowns of several fish, for the better. /🆑
133 lines
5.2 KiB
Plaintext
133 lines
5.2 KiB
Plaintext
///This component indicates this object can be baked in an oven.
|
|
/datum/component/bakeable
|
|
dupe_mode = COMPONENT_DUPE_UNIQUE_PASSARGS // So you can change bake results with various cookstuffs
|
|
///Result atom type of baking this object
|
|
var/atom/bake_result
|
|
///Amount of time required to bake the food
|
|
var/required_bake_time = 2 MINUTES
|
|
///Is this a positive bake result?
|
|
var/positive_result = TRUE
|
|
|
|
///Time spent baking so far
|
|
var/current_bake_time = 0
|
|
|
|
/// REF() to the mind which placed us in an oven
|
|
var/who_baked_us
|
|
|
|
/// Reagents that should be added to the result
|
|
var/list/added_reagents
|
|
|
|
/datum/component/bakeable/Initialize(bake_result, required_bake_time, positive_result, use_large_steam_sprit, list/added_reagents)
|
|
. = ..()
|
|
if(!isitem(parent)) //Only items support baking at the moment
|
|
return COMPONENT_INCOMPATIBLE
|
|
|
|
src.bake_result = bake_result
|
|
src.required_bake_time = required_bake_time
|
|
src.positive_result = positive_result
|
|
src.added_reagents = added_reagents
|
|
if(positive_result)
|
|
ADD_TRAIT(parent, TRAIT_BAKEABLE, REF(src))
|
|
|
|
// Inherit the new values passed to the component
|
|
/datum/component/bakeable/InheritComponent(datum/component/bakeable/new_comp, original, bake_result, required_bake_time, positive_result, use_large_steam_sprite)
|
|
if(!original)
|
|
return
|
|
if(bake_result)
|
|
src.bake_result = bake_result
|
|
if(required_bake_time)
|
|
src.required_bake_time = required_bake_time
|
|
if(positive_result)
|
|
src.positive_result = positive_result
|
|
|
|
/datum/component/bakeable/RegisterWithParent()
|
|
RegisterSignal(parent, COMSIG_ITEM_OVEN_PLACED_IN, PROC_REF(on_baking_start))
|
|
RegisterSignal(parent, COMSIG_ITEM_OVEN_PROCESS, PROC_REF(on_bake))
|
|
RegisterSignal(parent, COMSIG_ATOM_EXAMINE, PROC_REF(on_examine))
|
|
|
|
/datum/component/bakeable/UnregisterFromParent()
|
|
UnregisterSignal(parent, list(COMSIG_ITEM_OVEN_PLACED_IN, COMSIG_ITEM_OVEN_PROCESS, COMSIG_ATOM_EXAMINE))
|
|
REMOVE_TRAIT(parent, TRAIT_BAKEABLE, REF(src))
|
|
|
|
/// Signal proc for [COMSIG_ITEM_OVEN_PLACED_IN] when baking starts (parent enters an oven)
|
|
/datum/component/bakeable/proc/on_baking_start(datum/source, atom/used_oven, mob/baker)
|
|
SIGNAL_HANDLER
|
|
|
|
if(baker && baker.mind)
|
|
who_baked_us = REF(baker.mind)
|
|
|
|
///Ran every time an item is baked by something
|
|
/datum/component/bakeable/proc/on_bake(datum/source, atom/used_oven, seconds_per_tick = 1)
|
|
SIGNAL_HANDLER
|
|
|
|
// Let our signal know if we're baking something good or ... burning something
|
|
var/baking_result = positive_result ? COMPONENT_BAKING_GOOD_RESULT : COMPONENT_BAKING_BAD_RESULT
|
|
|
|
current_bake_time += seconds_per_tick * 10 //turn it into ds
|
|
if(current_bake_time >= required_bake_time)
|
|
finish_baking(used_oven)
|
|
|
|
return COMPONENT_HANDLED_BAKING | baking_result
|
|
|
|
///Ran when an object finished baking
|
|
/datum/component/bakeable/proc/finish_baking(atom/used_oven)
|
|
var/atom/original_object = parent
|
|
var/obj/item/plate/oven_tray/used_tray = original_object.loc
|
|
var/atom/baked_result = new bake_result(used_tray)
|
|
if(baked_result.reagents && positive_result) //make space and tranfer reagents if it has any & the resulting item isn't bad food or other bad baking result
|
|
baked_result.reagents.clear_reagents()
|
|
original_object.reagents.trans_to(baked_result, original_object.reagents.total_volume)
|
|
if(added_reagents) // Add any new reagents that should be added
|
|
baked_result.reagents.add_reagent_list(added_reagents)
|
|
|
|
if(who_baked_us)
|
|
ADD_TRAIT(baked_result, TRAIT_FOOD_CHEF_MADE, who_baked_us)
|
|
|
|
if(original_object.custom_materials)
|
|
baked_result.set_custom_materials(original_object.custom_materials, 1)
|
|
|
|
baked_result.pixel_x = original_object.pixel_x
|
|
baked_result.pixel_y = original_object.pixel_y
|
|
used_tray.AddToPlate(baked_result)
|
|
|
|
var/list/asomnia_hadders = list()
|
|
for(var/mob/smeller in get_hearers_in_view(DEFAULT_MESSAGE_RANGE, used_oven))
|
|
if(HAS_TRAIT(smeller, TRAIT_ANOSMIA))
|
|
asomnia_hadders += smeller
|
|
|
|
if(positive_result)
|
|
used_oven.visible_message(
|
|
span_notice("You smell something great coming from [used_oven]."),
|
|
blind_message = span_notice("You smell something great..."),
|
|
ignored_mobs = asomnia_hadders,
|
|
)
|
|
BLACKBOX_LOG_FOOD_MADE(baked_result.type)
|
|
else
|
|
used_oven.visible_message(
|
|
span_warning("You smell a burnt smell coming from [used_oven]."),
|
|
blind_message = span_warning("You smell a burnt smell..."),
|
|
ignored_mobs = asomnia_hadders,
|
|
)
|
|
SEND_SIGNAL(parent, COMSIG_ITEM_BAKED, baked_result)
|
|
qdel(parent)
|
|
|
|
///Gives info about the items baking status so you can see if its almost done
|
|
/datum/component/bakeable/proc/on_examine(atom/source, mob/user, list/examine_list)
|
|
SIGNAL_HANDLER
|
|
|
|
if(!current_bake_time) //Not baked yet
|
|
if(positive_result)
|
|
if(initial(bake_result.gender) == PLURAL)
|
|
examine_list += span_notice("[parent] can be [span_bold("baked")] into some [initial(bake_result.name)].")
|
|
else
|
|
examine_list += span_notice("[parent] can be [span_bold("baked")] into \a [initial(bake_result.name)].")
|
|
return
|
|
|
|
if(positive_result)
|
|
if(current_bake_time <= required_bake_time * 0.75)
|
|
examine_list += span_notice("[parent] probably needs to be baked a bit longer!")
|
|
else if(current_bake_time <= required_bake_time)
|
|
examine_list += span_notice("[parent] seems to be almost finished baking!")
|
|
else
|
|
examine_list += span_danger("[parent] should probably not be put in the oven.")
|