What you wear and on what chair you sit on can now influence fishing difficulty (#86646)

## About The Pull Request
A foreword, I had to refactor a few bits of shitcode my past self added
first. For context, the "gone fishing" and "actively fishing" traits
only had one source, which is the fishing challenge itself, ad there was
no way to access the challenge from outside its code, except for a few
weakrefs which were being used as sources for the aforementioned traits
(the shitcode in a nutshell). There were also a few signals that I
didn't like because they were being sent to the harder-to-access
challenge datum rather than the user. So I scrapped the traits for a
couple signals to send to the user, then added a global list as a mean
to easily access the challenge datum, and lastly changed the code to
accomodate the titled feature (and allow the challenge to recalculate
its difficulty DURING the minigame phase)

Moving on to the actual feature: I've added a component that can be
added to objects on which mobs can be buckled to or items. When equipped
in the right slots or buckled to, the object will adjust the difficulty
of current and future fishing challenges by a certain amount (more often
than not positive, but there're many exceptions) as long as the object
isn't equipped or the user is unbuckled.

I've been having some fun adding component to a ton of clothes in the
game as well as chairs. Way too many objects to enumerate, so I'll give
you the general idea:
- each carp-themed article provides a slight positive modifier (easier)
- some (not all) doctor-related garbs provide a marginal positive
modifier each (fish doctor jokes)
- floortile camo clothes have positive modifiers
- Tuxedo, laceups, gowns provide negative modifier (more difficult)
- utility garbs such as bio/bomb/rad hoods and suits are quite bad. Riot
armor too.
- boxing gloves are very, very bad. Insulated gloves and haul gauntlets
are also very bad, to a lesser degree.
- **tackle** gloves are good. (pun intended)
- wizard garbs are good, because wizards are good at casting. (also a
pun)
- magboots slightly bad. Space suits bad.
- Blindfolds and welding protection are also bad. Gas masks marginally
bad.
- Pirate attire is nice to have. (I just vibed a little on this one)
- plastic chairs are quite versatile because they can be carried around,
but the mime chair is the best, followed by ratvarian chairs.
- Fishing toolboxes, analyzers and the fish catalog are a plus, because
they can be held.
- And the fishing hat, obviously (not as great as you'd think)

Some of these may be subject to change depending on what people say.

## Why It's Good For The Game
A hundred lines of fishing challenge code made ever-so-slightly less
awful, and a way to modify fishing diffculty beside skills and bait.

## Changelog

🆑
add: Your current clothes and what chair you sit on can now influence
the difficulty of fishing minigames. Having a bare minimum of fishing
skill will let you distinguish which objects can help and which won't,
so keep an eye out. Holding fishing toolboxes, fish analyzers or fish
catalogs can also help.
/🆑
This commit is contained in:
Ghom
2024-09-18 00:33:04 +02:00
committed by GitHub
parent f6fa3ae4a2
commit ba4fa8fe07
72 changed files with 702 additions and 83 deletions
+1
View File
@@ -515,6 +515,7 @@
. = ..()
atom_storage.max_slots = 1
atom_storage.set_holdable(/obj/item/clothing/mask/luchador)
AddComponent(/datum/component/adjust_fishing_difficulty, -2)
/obj/item/storage/belt/military
name = "chest rig"
@@ -16,7 +16,17 @@
var/buildstacktype = /obj/item/stack/sheet/iron
var/buildstackamount = 1
var/item_chair = /obj/item/chair // if null it can't be picked up
///How much sitting on this chair influences fishing difficulty
var/fishing_modifier = -3
/obj/structure/chair/Initialize(mapload)
. = ..()
if(prob(0.2))
name = "tactical [name]"
fishing_modifier -= 4
MakeRotate()
if(can_buckle && fishing_modifier)
AddComponent(/datum/component/adjust_fishing_difficulty, fishing_modifier)
/obj/structure/chair/examine(mob/user)
. = ..()
@@ -24,12 +34,6 @@
if(!has_buckled_mobs() && can_buckle)
. += span_notice("While standing on [src], drag and drop your sprite onto [src] to buckle to it.")
/obj/structure/chair/Initialize(mapload)
. = ..()
if(prob(0.2))
name = "tactical [name]"
MakeRotate()
///This proc adds the rotate component, overwrite this if you for some reason want to change some specific args.
/obj/structure/chair/proc/MakeRotate()
AddComponent(/datum/component/simple_rotation, ROTATION_IGNORE_ANCHORED|ROTATION_GHOSTS_ALLOWED)
@@ -134,6 +138,7 @@
buildstacktype = /obj/item/stack/sheet/mineral/wood
buildstackamount = 3
item_chair = /obj/item/chair/wood
fishing_modifier = -4
/obj/structure/chair/wood/narsie_act()
return
@@ -151,6 +156,7 @@
max_integrity = 70
buildstackamount = 2
item_chair = null
fishing_modifier = -5
// The mutable appearance used for the overlay over buckled mobs.
var/mutable_appearance/armrest
@@ -226,11 +232,13 @@
desc = "A luxurious chair, the many purple scales reflect the light in a most pleasing manner."
icon_state = "carp_chair"
buildstacktype = /obj/item/stack/sheet/animalhide/carp
fishing_modifier = -10
/obj/structure/chair/office
anchored = FALSE
buildstackamount = 5
item_chair = null
fishing_modifier = -4
icon_state = "officechair_dark"
/obj/structure/chair/office/Initialize(mapload)
@@ -245,6 +253,10 @@
/obj/structure/chair/office/tactical
name = "tactical swivel chair"
/obj/structure/chair/office/tactical/Initialize(mapload)
. = ..()
AddComponent(/datum/component/adjust_fishing_difficulty, -10)
/obj/structure/chair/office/light
icon_state = "officechair_white"
@@ -436,6 +448,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/chair/stool/bar, 0)
desc = "You sit in this. Either by will or force. Looks REALLY uncomfortable."
icon_state = "chairold"
item_chair = null
fishing_modifier = 4
/obj/structure/chair/bronze
name = "brass chair"
@@ -445,6 +458,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/chair/stool/bar, 0)
buildstacktype = /obj/item/stack/sheet/bronze
buildstackamount = 1
item_chair = null
fishing_modifier = -12 //the pinnacle of Ratvarian technology.
/// Total rotations made
var/turns = 0
@@ -484,6 +498,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/chair/stool/bar, 0)
item_chair = null
obj_flags = parent_type::obj_flags | NO_DEBRIS_AFTER_DECONSTRUCTION
alpha = 0
fishing_modifier = -20 //it only lives for 25 seconds, so we make them worth it.
/obj/structure/chair/mime/wrench_act_secondary(mob/living/user, obj/item/weapon)
return NONE
@@ -505,6 +520,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/chair/stool/bar, 0)
buildstacktype = /obj/item/stack/sheet/plastic
buildstackamount = 2
item_chair = /obj/item/chair/plastic
fishing_modifier = -8
/obj/structure/chair/plastic/post_buckle_mob(mob/living/Mob)
Mob.pixel_y += 2
@@ -19,6 +19,7 @@ path/corner/color_name {\
icon = 'icons/obj/chairs_wide.dmi'
buildstackamount = 1
item_chair = null
fishing_modifier = -4
var/mutable_appearance/armrest
/obj/structure/chair/sofa/Initialize(mapload)