From 901f0b82bc2152c7976c6b3d90a15b97aa30d67f Mon Sep 17 00:00:00 2001
From: SkyratBot <59378654+SkyratBot@users.noreply.github.com>
Date: Mon, 21 Aug 2023 17:39:47 +0200
Subject: [PATCH] [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
:cl:
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.
/:cl:
* Miscellaneous fishing code changes.
---------
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
---
code/__DEFINES/aquarium.dm | 1 +
code/__DEFINES/dcs/signals/signals_fish.dm | 3 -
code/__DEFINES/fishing.dm | 6 --
code/datums/components/chasm.dm | 2 +-
code/datums/components/fishing_spot.dm | 10 +-
code/datums/elements/lazy_fishing_spot.dm | 11 ++-
code/game/objects/structures/watercloset.dm | 2 +-
code/game/turfs/open/lava.dm | 6 +-
code/game/turfs/open/water.dm | 2 +-
code/modules/fishing/aquarium/aquarium.dm | 4 +-
code/modules/fishing/aquarium/aquarium_kit.dm | 2 +-
code/modules/fishing/fish/_fish.dm | 62 ++++++++-----
code/modules/fishing/fish/chasm_detritus.dm | 58 ++++++------
code/modules/fishing/fish/fish_evolution.dm | 10 +-
code/modules/fishing/fish/fish_traits.dm | 4 +-
code/modules/fishing/fish/fish_types.dm | 31 +++++--
code/modules/fishing/fish_catalog.dm | 9 +-
code/modules/fishing/fishing_equipment.dm | 10 +-
code/modules/fishing/fishing_minigame.dm | 4 +-
code/modules/fishing/fishing_rod.dm | 9 +-
code/modules/fishing/sources/_fish_source.dm | 86 ++++++++----------
code/modules/fishing/sources/source_types.dm | 7 +-
icons/ui_icons/fishing/default.png | Bin 886 -> 136 bytes
icons/ui_icons/fishing/lavaland.png | Bin 886 -> 136 bytes
tgui/packages/tgui/interfaces/Fishing.tsx | 8 +-
.../interfaces/FishingPortalGenerator.tsx | 40 --------
26 files changed, 170 insertions(+), 217 deletions(-)
delete mode 100644 tgui/packages/tgui/interfaces/FishingPortalGenerator.tsx
diff --git a/code/__DEFINES/aquarium.dm b/code/__DEFINES/aquarium.dm
index 263f86db3e6..6e0a39f5040 100644
--- a/code/__DEFINES/aquarium.dm
+++ b/code/__DEFINES/aquarium.dm
@@ -32,6 +32,7 @@
#define FISH_RARITY_RARE 400
#define FISH_RARITY_VERY_RARE 200
#define FISH_RARITY_GOOD_LUCK_FINDING_THIS 1
+#define FISH_RARITY_NOPE 0
#define AQUARIUM_FLUID_FRESHWATER "Freshwater"
#define AQUARIUM_FLUID_SALTWATER "Saltwater"
diff --git a/code/__DEFINES/dcs/signals/signals_fish.dm b/code/__DEFINES/dcs/signals/signals_fish.dm
index 7da86f90acc..281c73adb52 100644
--- a/code/__DEFINES/dcs/signals/signals_fish.dm
+++ b/code/__DEFINES/dcs/signals/signals_fish.dm
@@ -29,6 +29,3 @@
/// Sent when the challenge is to be interrupted: (reason)
#define COMSIG_FISHING_SOURCE_INTERRUPT_CHALLENGE "fishing_spot_interrupt_challenge"
-
-/// Sent to the reward after it's been generated by fishing: (fishing_spot)
-#define COMSIG_ATOM_FISHING_REWARD "atom_fishing_reward"
diff --git a/code/__DEFINES/fishing.dm b/code/__DEFINES/fishing.dm
index 9ec30afbb33..2481f0ae3e7 100644
--- a/code/__DEFINES/fishing.dm
+++ b/code/__DEFINES/fishing.dm
@@ -51,12 +51,6 @@
/// Much like FISHING_HOOK_ENSNARE but for the reel.
#define FISHING_LINE_BOUNCY (1 << 2)
-#define FISHING_SPOT_PRESET_BEACH "beach"
-#define FISHING_SPOT_PRESET_LAVALAND_LAVA "lavaland lava"
-#define FISHING_SPOT_PRESET_ICEMOON_PLASMA "icemoon plasma"
-#define FISHING_SPOT_PRESET_CHASM "chasm"
-#define FISHING_SPOT_PRESET_TOILET "toilet"
-
#define FISHING_MINIGAME_RULE_HEAVY_FISH "heavy"
#define FISHING_MINIGAME_RULE_LUBED_FISH "lubed"
#define FISHING_MINIGAME_RULE_WEIGHTED_BAIT "weighted"
diff --git a/code/datums/components/chasm.dm b/code/datums/components/chasm.dm
index 30c63ebd021..9b59420b715 100644
--- a/code/datums/components/chasm.dm
+++ b/code/datums/components/chasm.dm
@@ -44,7 +44,7 @@
//otherwise don't do anything because turfs and areas are initialized before movables.
if(!mapload)
addtimer(CALLBACK(src, PROC_REF(drop_stuff)), 0)
- parent.AddElement(/datum/element/lazy_fishing_spot, FISHING_SPOT_PRESET_CHASM)
+ parent.AddElement(/datum/element/lazy_fishing_spot, /datum/fish_source/chasm)
/datum/component/chasm/UnregisterFromParent()
storage = null
diff --git a/code/datums/components/fishing_spot.dm b/code/datums/components/fishing_spot.dm
index 0c8b5caabce..3f230b8754d 100644
--- a/code/datums/components/fishing_spot.dm
+++ b/code/datums/components/fishing_spot.dm
@@ -11,16 +11,10 @@
//Use passed in instance
fish_source = configuration
else
- /// Check if it's a preset key
- var/datum/fish_source/preset_configuration = GLOB.preset_fish_sources[configuration]
- if(!preset_configuration)
- stack_trace("Invalid fishing spot configuration \"[configuration]\" passed down to fishing spot component.")
- return COMPONENT_INCOMPATIBLE
- fish_source = preset_configuration
+ return COMPONENT_INCOMPATIBLE
RegisterSignal(parent, COMSIG_ATOM_ATTACKBY, PROC_REF(handle_attackby))
RegisterSignal(parent, COMSIG_FISHING_ROD_CAST, PROC_REF(handle_cast))
-
/datum/component/fishing_spot/proc/handle_cast(datum/source, obj/item/fishing_rod/rod, mob/user)
SIGNAL_HANDLER
if(try_start_fishing(rod,user))
@@ -52,5 +46,5 @@
/// Roll what we caught based on modified table
var/result = fish_source.roll_reward(rod, user)
var/datum/fishing_challenge/challenge = new(src, result, rod, user)
- fish_source.pre_challenge_started(rod, user)
+ fish_source.pre_challenge_started(rod, user, challenge)
challenge.start(user)
diff --git a/code/datums/elements/lazy_fishing_spot.dm b/code/datums/elements/lazy_fishing_spot.dm
index ad8b744f364..82323372e6a 100644
--- a/code/datums/elements/lazy_fishing_spot.dm
+++ b/code/datums/elements/lazy_fishing_spot.dm
@@ -1,4 +1,7 @@
-// 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)
+/**
+ * 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
@@ -8,8 +11,8 @@
. = ..()
if(!isatom(target))
return ELEMENT_INCOMPATIBLE
- if(!configuration)
- CRASH("Lazy fishing spot had no configuration passed in.")
+ 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))
@@ -21,5 +24,5 @@
/datum/element/lazy_fishing_spot/proc/create_fishing_spot(datum/source)
SIGNAL_HANDLER
- source.AddComponent(/datum/component/fishing_spot, configuration)
+ source.AddComponent(/datum/component/fishing_spot, GLOB.preset_fish_sources[configuration])
Detach(source)
diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm
index 201e0624322..3548de15b9d 100644
--- a/code/game/objects/structures/watercloset.dm
+++ b/code/game/objects/structures/watercloset.dm
@@ -17,7 +17,7 @@
open = round(rand(0, 1))
update_appearance()
if(mapload && SSmapping.level_trait(z, ZTRAIT_STATION))
- AddElement(/datum/element/lazy_fishing_spot, FISHING_SPOT_PRESET_TOILET)
+ AddElement(/datum/element/lazy_fishing_spot, /datum/fish_source/toilet)
/obj/structure/toilet/attack_hand(mob/living/user, list/modifiers)
. = ..()
diff --git a/code/game/turfs/open/lava.dm b/code/game/turfs/open/lava.dm
index f9f5d5c8fbb..24c690498a6 100644
--- a/code/game/turfs/open/lava.dm
+++ b/code/game/turfs/open/lava.dm
@@ -38,8 +38,8 @@
var/mask_icon = 'icons/turf/floors.dmi'
/// The icon state that covers the lava bits of our turf
var/mask_state = "lava-lightmask"
- /// The configuration key for the preset fishing spot for this type of turf.
- var/fish_source_type = FISHING_SPOT_PRESET_LAVALAND_LAVA
+ /// The type for the preset fishing spot of this type of turf.
+ var/fish_source_type = /datum/fish_source/lavaland
/turf/open/lava/Initialize(mapload)
. = ..()
@@ -345,7 +345,7 @@
icon_state = "liquidplasma"
initial_gas_mix = BURNING_COLD
baseturfs = /turf/open/lava/plasma
- fish_source_type = FISHING_SPOT_PRESET_ICEMOON_PLASMA
+ fish_source_type = /datum/fish_source/lavaland/icemoon
light_range = 3
light_power = 0.75
diff --git a/code/game/turfs/open/water.dm b/code/game/turfs/open/water.dm
index 24a4df6ea17..debf5c0f6b1 100644
--- a/code/game/turfs/open/water.dm
+++ b/code/game/turfs/open/water.dm
@@ -37,4 +37,4 @@
/turf/open/water/beach/Initialize(mapload)
. = ..()
- AddElement(/datum/element/lazy_fishing_spot, FISHING_SPOT_PRESET_BEACH)
+ AddElement(/datum/element/lazy_fishing_spot, /datum/fish_source/ocean/beach)
diff --git a/code/modules/fishing/aquarium/aquarium.dm b/code/modules/fishing/aquarium/aquarium.dm
index 8d6baa732e5..7b50d13c61f 100644
--- a/code/modules/fishing/aquarium/aquarium.dm
+++ b/code/modules/fishing/aquarium/aquarium.dm
@@ -150,12 +150,12 @@
if(istype(item, /obj/item/fish_feed))
if(!item.reagents.total_volume)
- to_chat(user, span_warning("[item] is empty."))
+ balloon_alert(user, "[item] is empty!")
return TRUE
var/list/fishes = get_fishes()
for(var/obj/item/fish/fish as anything in fishes)
fish.feed(item.reagents)
- to_chat(user, span_notice("You feed the fish."))
+ balloon_alert(user, "fed the fish")
return TRUE
return ..()
diff --git a/code/modules/fishing/aquarium/aquarium_kit.dm b/code/modules/fishing/aquarium/aquarium_kit.dm
index 2279b1c4ad3..cba44721e3a 100644
--- a/code/modules/fishing/aquarium/aquarium_kit.dm
+++ b/code/modules/fishing/aquarium/aquarium_kit.dm
@@ -45,7 +45,7 @@
var/fluid_type
/obj/item/storage/fish_case/random/get_fish_type()
- return random_fish_type(required_fluid = fluid_type)
+ return random_fish_type(fluid_type)
/obj/item/storage/fish_case/random/freshwater
fluid_type = AQUARIUM_FLUID_FRESHWATER
diff --git a/code/modules/fishing/fish/_fish.dm b/code/modules/fishing/fish/_fish.dm
index a5149b29e3d..21585a07546 100644
--- a/code/modules/fishing/fish/_fish.dm
+++ b/code/modules/fishing/fish/_fish.dm
@@ -64,8 +64,6 @@
/// Should this fish type show in fish catalog
var/show_in_catalog = TRUE
- /// Should this fish spawn in random fish cases
- var/available_in_random_cases = TRUE
/// How rare this fish is in the random cases
var/random_case_rarity = FISH_RARITY_BASIC
@@ -117,16 +115,27 @@
*/
var/list/disliked_bait = list()
- /// Size in centimeters. Item size class scales with it.
- var/size = 50
+ /// Size in centimeters. Null until update_size_and_weight is called. Number of fillets and w_class scale with it.
+ var/size
/// Average size for this fish type in centimeters. Will be used as gaussian distribution with 20% deviation for fishing, bought fish are always standard size
var/average_size = 50
- /// Weight in grams. number of fillets and grind results scale with it, just don't think too hard how someone could manage to fit a trout in a blender.
- var/weight = 1000
+ /// Weight in grams. Null until update_size_and_weight is called. Grind results scale with it. Don't think too hard how a trout could fit in a blender.
+ var/weight
/// Average weight for this fish type in grams
var/average_weight = 1000
+ /// When outside of an aquarium, these gases that are checked (as well as pressure and temp) to assert if the environment is safe or not.
+ var/list/safe_air_limits = list(
+ /datum/gas/oxygen = list(12, 100),
+ /datum/gas/nitrogen,
+ /datum/gas/carbon_dioxide = list(0, 10),
+ /datum/gas/water_vapor,
+ )
+ /// Outside of an aquarium, the pressure needs to be within these two variables for the environment to be safe.
+ var/min_pressure = WARNING_LOW_PRESSURE
+ var/max_pressure = HAZARD_HIGH_PRESSURE
+
/obj/item/fish/Initialize(mapload, apply_qualities = TRUE)
. = ..()
AddComponent(/datum/component/aquarium_content, PROC_REF(get_aquarium_animation), list(COMSIG_FISH_STATUS_CHANGED,COMSIG_FISH_STIRRED))
@@ -144,7 +153,7 @@
if(apply_qualities)
apply_traits() //Make sure traits are applied before size and weight.
- update_size_and_weight(first_run = TRUE)
+ update_size_and_weight()
progenitors = full_capitalize(name) //default value
register_evolutions()
@@ -156,6 +165,19 @@
icon_state = initial(icon_state)
return ..()
+/obj/item/fish/attackby(obj/item/item, mob/living/user, params)
+ if(!istype(item, /obj/item/fish_feed))
+ return ..()
+ if(!item.reagents.total_volume)
+ balloon_alert(user, "[item] is empty!")
+ return TRUE
+ if(status == FISH_DEAD)
+ balloon_alert(user, "[src] is dead!")
+ return TRUE
+ feed(item.reagents)
+ balloon_alert(user, "you feed [src]")
+ return TRUE
+
/obj/item/fish/examine(mob/user)
. = ..()
// All spacemen have magic eyes of fish weight perception until fish scale (get it?) is implemented.
@@ -173,8 +195,8 @@
update_size_and_weight(new_size, new_weight, first_run)
///Updates weight and size, along with weight class, number of fillets you can get and grind results.
-/obj/item/fish/proc/update_size_and_weight(new_size = average_size, new_weight = average_weight, first_run = FALSE)
- if(!first_run && fillet_type)
+/obj/item/fish/proc/update_size_and_weight(new_size = average_size, new_weight = average_weight)
+ if(size && fillet_type)
RemoveElement(/datum/element/processable, TOOL_KNIFE, fillet_type, num_fillets, 0.5 SECONDS, screentip_verb = "Cut")
size = new_size
switch(size)
@@ -199,7 +221,7 @@
num_fillets = amount
AddElement(/datum/element/processable, TOOL_KNIFE, fillet_type, num_fillets, 0.5 SECONDS, screentip_verb = "Cut")
- if(!first_run)
+ if(weight)
for(var/reagent_type in grind_results)
grind_results[reagent_type] /= FLOOR(weight/FISH_GRIND_RESULTS_WEIGHT_DIVISOR, 0.1)
weight = new_weight
@@ -383,18 +405,12 @@
var/datum/gas_mixture/mixture = loc.return_air()
if(!mixture)
return FALSE
- var/static/list/gases_to_check = list(
- /datum/gas/oxygen = list(12, 100),
- /datum/gas/nitrogen,
- /datum/gas/carbon_dioxide = list(0, 10),
- /datum/gas/water_vapor,
- )
- if(!check_gases(mixture.gases, gases_to_check))
+ if(safe_air_limits && !check_gases(mixture.gases, safe_air_limits))
return FALSE
if(!ISINRANGE(mixture.temperature, required_temperature_min, required_temperature_max))
return FALSE
var/pressure = mixture.return_pressure()
- if((pressure <= 20) || (pressure >= 550))
+ if(!ISINRANGE(pressure, min_pressure, max_pressure))
return FALSE
return TRUE
@@ -580,21 +596,23 @@
flop_animation(src)
/// Returns random fish, using random_case_rarity probabilities.
-/proc/random_fish_type(case_fish_only=TRUE, required_fluid)
+/proc/random_fish_type(required_fluid)
var/static/probability_table
- var/argkey = "fish_[required_fluid]_[case_fish_only]" //If this expands more extract bespoke element arg generation to some common helper.
+ var/argkey = "fish_[required_fluid]" //If this expands more extract bespoke element arg generation to some common helper.
if(!probability_table || !probability_table[argkey])
if(!probability_table)
probability_table = list()
var/chance_table = list()
for(var/_fish_type in subtypesof(/obj/item/fish))
var/obj/item/fish/fish = _fish_type
+ var/rarity = initial(fish.random_case_rarity)
+ if(!rarity)
+ continue
if(required_fluid)
var/init_fish_fluid_type = initial(fish.required_fluid_type)
if(!compatible_fluid_type(init_fish_fluid_type, required_fluid))
continue
- if(initial(fish.available_in_random_cases) || !case_fish_only)
- chance_table[fish] = initial(fish.random_case_rarity)
+ chance_table[fish] = initial(fish.random_case_rarity)
probability_table[argkey] = chance_table
return pick_weight(probability_table[argkey])
diff --git a/code/modules/fishing/fish/chasm_detritus.dm b/code/modules/fishing/fish/chasm_detritus.dm
index 0412936be20..9e686958536 100644
--- a/code/modules/fishing/fish/chasm_detritus.dm
+++ b/code/modules/fishing/fish/chasm_detritus.dm
@@ -5,12 +5,17 @@
/// No corpses (so there's still lobstrosities because they're the main threat with this).
#define NO_CORPSES "no_corpses"
-/// An object which should replace itself on initialisation with something which fell into a chasm.
-/obj/item/chasm_detritus
- name = "chasm detritus"
- desc = "Abstract concept of an object which once fell into a deep hole."
- icon = 'icons/obj/maintenance_loot.dmi'
- icon_state = "skub"
+///List containing chasm detritus singletons.
+GLOBAL_LIST_INIT_TYPED(chasm_detritus_types, /datum/chasm_detritus, init_chasm_detritus())
+
+/proc/init_chasm_detritus()
+ //as the name suggests, init_subtypes_w_path_keys doesn't init the prototype, so here we go.
+ var/list/glob_list = list()
+ glob_list[/datum/chasm_detritus] = new /datum/chasm_detritus
+ return init_subtypes_w_path_keys(/datum/chasm_detritus, glob_list)
+
+/// A datum that retrieves something which fell into a chasm.
+/datum/chasm_detritus
/// The chance (out of 100) to fish out something from `default_contents`
/// even if there's something in GLOB.chasm_storage.
var/default_contents_chance = 25
@@ -35,37 +40,28 @@
),
)
-/obj/item/chasm_detritus/Initialize(mapload)
- . = ..()
+/datum/chasm_detritus/proc/dispense_reward(turf/fishing_spot)
if (prob(default_contents_chance))
- create_default_object()
- return
- RegisterSignal(src, COMSIG_ATOM_FISHING_REWARD, PROC_REF(find_chasm_contents))
+ var/default_spawn = pick(default_contents[default_contents_key])
+ return new default_spawn(fishing_spot)
+ return find_chasm_contents(fishing_spot)
/// Returns the chosen detritus from the given list of things to choose from
-/obj/item/chasm_detritus/proc/determine_detritus(list/chasm_stuff)
+/datum/chasm_detritus/proc/determine_detritus(list/chasm_stuff)
return pick(chasm_stuff)
-/// Instantiates something in its place from the default_contents list.
-/obj/item/chasm_detritus/proc/create_default_object()
- var/contents_type = pick(default_contents[default_contents_key])
- new contents_type(get_turf(src))
- qdel(src)
-
/// Returns an objected which is currently inside of a nearby chasm.
-/obj/item/chasm_detritus/proc/find_chasm_contents(datum/source, turf/fishing_spot)
+/datum/chasm_detritus/proc/find_chasm_contents(datum/source, turf/fishing_spot)
SIGNAL_HANDLER
var/list/chasm_contents = get_chasm_contents(fishing_spot)
if (!length(chasm_contents))
- create_default_object()
- return
+ var/default_spawn = pick(default_contents[default_contents_key])
+ return new default_spawn(fishing_spot)
- var/atom/movable/detritus = determine_detritus(chasm_contents)
- detritus.forceMove(get_turf(src))
- qdel(src)
+ return determine_detritus(chasm_contents)
-/obj/item/chasm_detritus/proc/get_chasm_contents(turf/fishing_spot)
+/datum/chasm_detritus/proc/get_chasm_contents(turf/fishing_spot)
. = list()
for (var/obj/effect/abstract/chasm_storage/storage in range(5, fishing_spot))
for (var/thing as anything in storage.contents)
@@ -73,12 +69,12 @@
/// Variant of the chasm detritus that allows for an easier time at fishing out
/// bodies, and sometimes less desireable monsters too.
-/obj/item/chasm_detritus/restricted
+/datum/chasm_detritus/restricted
/// What type do we check for in the contents of the `/obj/effect/abstract/chasm_storage`
/// contained in the `GLOB.chasm_storage` global list in `find_chasm_contents()`.
var/chasm_storage_restricted_type = /obj
-/obj/item/chasm_detritus/restricted/get_chasm_contents(turf/fishing_spot)
+/datum/chasm_detritus/restricted/get_chasm_contents(turf/fishing_spot)
. = list()
for (var/obj/effect/abstract/chasm_storage/storage in range(5, fishing_spot))
for (var/thing as anything in storage.contents)
@@ -86,24 +82,24 @@
continue
. += thing
-/obj/item/chasm_detritus/restricted/objects
+/datum/chasm_detritus/restricted/objects
default_contents_chance = 12.5
default_contents_key = NO_CORPSES
-/obj/item/chasm_detritus/restricted/bodies
+/datum/chasm_detritus/restricted/bodies
default_contents_chance = 12.5
default_contents_key = BODIES_ONLY
chasm_storage_restricted_type = /mob
/// This also includes all mobs fallen into chasms, regardless of distance
-/obj/item/chasm_detritus/restricted/bodies/get_chasm_contents(turf/fishing_spot)
+/datum/chasm_detritus/restricted/bodies/get_chasm_contents(turf/fishing_spot)
. = ..()
. |= GLOB.chasm_fallen_mobs
/// Body detritus is selected in favor of bodies belonging to sentient mobs
/// The first sentient body found in the list of contents is returned, otherwise
/// if none are sentient choose randomly.
-/obj/item/chasm_detritus/restricted/bodies/determine_detritus(list/chasm_stuff)
+/datum/chasm_detritus/restricted/bodies/determine_detritus(list/chasm_stuff)
for(var/mob/fallen_mob as anything in chasm_stuff)
if(fallen_mob.mind)
return fallen_mob
diff --git a/code/modules/fishing/fish/fish_evolution.dm b/code/modules/fishing/fish/fish_evolution.dm
index ccdf50f9e0e..c04ef2c3079 100644
--- a/code/modules/fishing/fish/fish_evolution.dm
+++ b/code/modules/fishing/fish/fish_evolution.dm
@@ -1,12 +1,4 @@
-GLOBAL_LIST_INIT(fish_evolutions, init_fish_evolutions())
-
-/proc/init_fish_evolutions()
- . = list()
- for(var/datum/fish_evolution/evolution as anything in subtypesof(/datum/fish_evolution))
- //Skip abstract types.
- if(!initial(evolution.probability) || !initial(evolution.new_fish_type))
- continue
- .[evolution] = new evolution
+GLOBAL_LIST_INIT(fish_evolutions, init_subtypes_w_path_keys(/datum/fish_evolution, list()))
/**
* Fish evolution datums
diff --git a/code/modules/fishing/fish/fish_traits.dm b/code/modules/fishing/fish/fish_traits.dm
index fbebef8c2e2..6c7fb38e279 100644
--- a/code/modules/fishing/fish/fish_traits.dm
+++ b/code/modules/fishing/fish/fish_traits.dm
@@ -47,7 +47,7 @@ GLOBAL_LIST_INIT(fish_traits, init_subtypes_w_path_keys(/datum/fish_trait, list(
. = ..()
// Wary fish require transparent line or they're harder
if(!rod.line || !(rod.line.fishing_line_traits & FISHING_LINE_CLOAKED))
- .[ADDITIVE_FISHING_MOD] = -FISH_TRAIT_MINOR_DIFFICULTY_BOOST
+ .[ADDITIVE_FISHING_MOD] += FISH_TRAIT_MINOR_DIFFICULTY_BOOST
/datum/fish_trait/shiny_lover
name = "Shiny Lover"
@@ -57,7 +57,7 @@ GLOBAL_LIST_INIT(fish_traits, init_subtypes_w_path_keys(/datum/fish_trait, list(
. = ..()
// These fish are easier to catch with shiny lure
if(rod.hook && rod.hook.fishing_hook_traits & FISHING_HOOK_SHINY)
- .[ADDITIVE_FISHING_MOD] = FISH_TRAIT_MINOR_DIFFICULTY_BOOST
+ .[ADDITIVE_FISHING_MOD] -= FISH_TRAIT_MINOR_DIFFICULTY_BOOST
/datum/fish_trait/picky_eater
name = "Picky Eater"
diff --git a/code/modules/fishing/fish/fish_types.dm b/code/modules/fishing/fish/fish_types.dm
index 34c945241da..e8752acb1de 100644
--- a/code/modules/fishing/fish/fish_types.dm
+++ b/code/modules/fishing/fish/fish_types.dm
@@ -84,7 +84,6 @@
average_size = 30
average_weight = 500
stable_population = 4
- grind_results = list(/datum/reagent/blood = 20, /datum/reagent/consumable/liquidgibs = 2)
fish_traits = list(/datum/fish_trait/picky_eater)
evolution_types = list(/datum/fish_evolution/lubefish)
compatible_types = list(/obj/item/fish/clownfish/lube)
@@ -239,7 +238,17 @@
random_case_rarity = FISH_RARITY_RARE
fillet_type = /obj/item/food/meat/slab/rawcrab
required_temperature_min = MIN_AQUARIUM_TEMP+9
- required_temperature_max = MAX_AQUARIUM_TEMP+150
+ required_temperature_max = LAVALAND_MAX_TEMPERATURE+50
+ min_pressure = HAZARD_LOW_PRESSURE
+ safe_air_limits = list(
+ /datum/gas/oxygen = list(2, 100),
+ /datum/gas/nitrogen,
+ /datum/gas/carbon_dioxide = list(0, 20),
+ /datum/gas/water_vapor,
+ /datum/gas/plasma = list(0, 5),
+ /datum/gas/bz = list(0, 5),
+ /datum/gas/miasma = list(0, 5),
+ )
evolution_types = list(/datum/fish_evolution/ice_chrab)
compatible_types = list(/obj/item/fish/chasm_crab/ice)
@@ -248,7 +257,7 @@
desc = "A subspecies of chasm chrabs that has adapted to the cold climate and lack of abysmal holes of the icemoon."
icon_state = "arctic_chrab"
dedicated_in_aquarium_icon_state = "ice_chrab_small"
- required_temperature_min = MIN_AQUARIUM_TEMP-150
+ required_temperature_min = ICEBOX_MIN_TEMPERATURE-20
required_temperature_max = MIN_AQUARIUM_TEMP+15
evolution_types = list(/datum/fish_evolution/chasm_chrab)
compatible_types = list(/obj/item/fish/chasm_crab)
@@ -331,7 +340,7 @@
desc = "A misshapen, fragile, loosely fish-like living goop. This one has developed sexual reproduction mechanisms, and a purple tint to boot."
icon_state = "sludgefish_purple"
dedicated_in_aquarium_icon_state = "sludgefish_purple_small"
- available_in_random_cases = FALSE
+ random_case_rarity = FISH_RARITY_NOPE
random_case_rarity = FISH_RARITY_VERY_RARE
fish_traits = list(/datum/fish_trait/parthenogenesis)
@@ -343,7 +352,7 @@
dedicated_in_aquarium_icon_state = "slimefish_small"
sprite_width = 7
sprite_height = 7
- do_flop_animation = FALSE //it already has our cute bouncy wiggle. :3
+ do_flop_animation = FALSE //it already has a cute bouncy wiggle. :3
random_case_rarity = FISH_RARITY_VERY_RARE
required_fluid_type = AQUARIUM_FLUID_ANADROMOUS
stable_population = 4
@@ -374,6 +383,7 @@
fish_ai_type = FISH_AI_ZIPPY
random_case_rarity = FISH_RARITY_GOOD_LUCK_FINDING_THIS
required_fluid_type = AQUARIUM_FLUID_ANY_WATER
+ min_pressure = HAZARD_LOW_PRESSURE
health = 150
stable_population = 3
grind_results = list(/datum/reagent/bone_dust = 20)
@@ -397,10 +407,10 @@
sprite_width = 12
sprite_height = 7
show_in_catalog = FALSE
- available_in_random_cases = FALSE
- random_case_rarity = FISH_RARITY_GOOD_LUCK_FINDING_THIS
+ random_case_rarity = FISH_RARITY_NOPE
fishing_difficulty_modifier = 5
required_fluid_type = AQUARIUM_FLUID_ANY_WATER
+ min_pressure = HAZARD_LOW_PRESSURE
health = 300
stable_population = 2 //This means they can only crossbreed.
grind_results = list(/datum/reagent/bone_dust = 15, /datum/reagent/consumable/liquidgibs = 5)
@@ -418,7 +428,7 @@
desc = "A holographic representation of a common goldfish, slowly flickering out, removed from its holo-habitat."
icon_state = "goldfish"
show_in_catalog = FALSE
- available_in_random_cases = FALSE
+ random_case_rarity = FISH_RARITY_NOPE
sprite_width = 8
sprite_height = 8
stable_population = 1
@@ -427,7 +437,7 @@
required_fluid_type = AQUARIUM_FLUID_ANADROMOUS
grind_results = null
fillet_type = null
- death_text = "%SRC disappears."
+ death_text = "%SRC gently disappears."
fish_traits = list(/datum/fish_trait/no_mating) //just to be sure, these shouldn't reproduce
/obj/item/fish/holo/Initialize(mapload)
@@ -440,7 +450,8 @@
/obj/item/fish/holo/set_status(new_status)
. = ..()
if(status == FISH_DEAD)
- qdel(src)
+ animate(src, alpha = 0, 3 SECONDS, easing = SINE_EASING)
+ QDEL_IN(src, 3 SECONDS)
/obj/item/fish/holo/crab
name = "holographic crab"
diff --git a/code/modules/fishing/fish_catalog.dm b/code/modules/fishing/fish_catalog.dm
index 962486d6d1d..d41b4657e50 100644
--- a/code/modules/fishing/fish_catalog.dm
+++ b/code/modules/fishing/fish_catalog.dm
@@ -28,7 +28,7 @@
fish_data["temp_max"] = initial(fish.required_temperature_max)
fish_data["icon"] = sanitize_css_class_name("[initial(fish.icon)][initial(fish.icon_state)]")
fish_data["color"] = initial(fish.color)
- fish_data["source"] = initial(fish.available_in_random_cases) ? "[AQUARIUM_COMPANY] Fish Packs" : "Unknown"
+ fish_data["source"] = initial(fish.random_case_rarity) ? "[AQUARIUM_COMPANY] Fish Packs" : "Unknown"
fish_data["size"] = initial(fish.average_size)
fish_data["weight"] = initial(fish.average_weight)
var/datum/reagent/food_type = initial(fish.food)
@@ -64,10 +64,9 @@
. = list()
//// Where can it be found - iterate fish sources, how should this handle key
var/list/spot_descriptions = list()
- for(var/datum/fish_source/fishing_spot_type as anything in subtypesof(/datum/fish_source))
- var/datum/fish_source/temp = new fishing_spot_type
- if((fish_type in temp.fish_table) && temp.catalog_description)
- spot_descriptions += temp.catalog_description
+ for(var/datum/fish_source/source as anything in GLOB.preset_fish_sources)
+ if(source.catalog_description && (fish_type in source.fish_table))
+ spot_descriptions += source.catalog_description
.["spots"] = english_list(spot_descriptions, nothing_text = "Unknown")
///Difficulty descriptor
switch(initial(fishy.fishing_difficulty_modifier))
diff --git a/code/modules/fishing/fishing_equipment.dm b/code/modules/fishing/fishing_equipment.dm
index 51fbd8e2ed7..43a79106356 100644
--- a/code/modules/fishing/fishing_equipment.dm
+++ b/code/modules/fishing/fishing_equipment.dm
@@ -63,7 +63,7 @@
/// icon state added to main rod icon when this hook is equipped
var/rod_overlay_icon_state = "hook_overlay"
/// What subtype of `/obj/item/chasm_detritus` do we fish out of chasms? Defaults to `/obj/item/chasm_detritus`.
- var/chasm_detritus_type = /obj/item/chasm_detritus
+ var/chasm_detritus_type = /datum/chasm_detritus
/**
@@ -100,7 +100,7 @@
desc = "Won't make catching fish any easier, but it might help with looking for other things."
icon_state = "treasure"
rod_overlay_icon_state = "hook_treasure_overlay"
- chasm_detritus_type = /obj/item/chasm_detritus/restricted/objects
+ chasm_detritus_type = /datum/chasm_detritus/restricted/objects
/obj/item/fishing_hook/magnet/get_hook_bonus_multiplicative(fish_type, datum/fish_source/source)
@@ -129,7 +129,7 @@
desc = "An unwieldy hook meant to help with the rescue of those that have fallen down in chasms. You can tell there's no way you'll catch any fish with this, and that it won't be of any use outside of chasms."
icon_state = "rescue"
rod_overlay_icon_state = "hook_rescue_overlay"
- chasm_detritus_type = /obj/item/chasm_detritus/restricted/bodies
+ chasm_detritus_type = /datum/chasm_detritus/restricted/bodies
// This hook can only fish in chasms.
@@ -169,11 +169,11 @@
/obj/item/fishing_hook/stabilized/examine(mob/user)
. = ..()
- . += span_notice("While fishing, you can press the Ctrl key down to move the bait down, rather than up.")
+ . += span_notice("While fishing, you can hold the Ctrl key to move the bait down, rather than up.")
/obj/item/fishing_hook/jaws
name = "jawed hook"
- desc = "Despite hints of rust, this gritty beartrap-like hook hybrid manages to look even more threating than the real thing. May neptune have mercy of whatever is caught by its jaws."
+ desc = "Despite hints of rust, this gritty beartrap-like hook hybrid manages to look even more threating than the real thing. May neptune have mercy of whatever gets caught in its jaws."
icon_state = "jaws"
fishing_hook_traits = FISHING_HOOK_NO_ESCAPE|FISHING_HOOK_ENSNARE|FISHING_HOOK_KILL
rod_overlay_icon_state = "hook_jaws_overlay"
diff --git a/code/modules/fishing/fishing_minigame.dm b/code/modules/fishing/fishing_minigame.dm
index 55d6411cf10..d1b77e4ec0a 100644
--- a/code/modules/fishing/fishing_minigame.dm
+++ b/code/modules/fishing/fishing_minigame.dm
@@ -161,7 +161,7 @@
if(win)
if(reward_path != FISHING_DUD)
playsound(lure, 'sound/effects/bigsplash.ogg', 100)
- SEND_SIGNAL(src, COMSIG_FISHING_CHALLENGE_COMPLETED, user, win, perfect_win)
+ SEND_SIGNAL(src, COMSIG_FISHING_CHALLENGE_COMPLETED, user, win)
qdel(src)
/datum/fishing_challenge/proc/start_baiting_phase()
@@ -258,7 +258,7 @@
switch(action)
if("win")
- complete(win = TRUE, perfect_win = params["perfect"])
+ complete(win = TRUE)
if("lose")
send_alert("it got away")
complete(win = FALSE)
diff --git a/code/modules/fishing/fishing_rod.dm b/code/modules/fishing/fishing_rod.dm
index a6f623353f4..cc873036d08 100644
--- a/code/modules/fishing/fishing_rod.dm
+++ b/code/modules/fishing/fishing_rod.dm
@@ -268,16 +268,15 @@
var/line_color = line?.line_color || default_line_color
/// Line part by the rod, always visible
var/mutable_appearance/reel_appearance = mutable_appearance(icon, reel_overlay)
- reel_appearance.color = line_color;
+ reel_appearance.color = line_color
. += reel_appearance
// Line & hook is also visible when only bait is equipped but it uses default appearances then
if(hook || bait)
var/mutable_appearance/line_overlay = mutable_appearance(icon, "line_overlay")
- line_overlay.color = line_color;
+ line_overlay.color = line_color
. += line_overlay
- var/mutable_appearance/hook_overlay = mutable_appearance(icon, hook?.rod_overlay_icon_state || "hook_overlay")
- . += hook_overlay
+ . += hook?.rod_overlay_icon_state || "hook_overlay"
if(bait)
var/bait_state = "worm_overlay" //default to worm overlay for anything without specific one
@@ -512,7 +511,7 @@
name = "master fishing rod"
desc = "The mythical rod of a lost fisher king. Said to be imbued with un-paralleled fishing power. There's writing on the back of the pole. \"ä¸å›½èˆªå¤©åˆ¶é€ \""
difficulty_modifier = -10
- ui_description = "This rods makes fishing easy even for an absolute beginner."
+ ui_description = "This rod makes fishing easy even for an absolute beginner."
icon_state = "fishing_rod_master"
reel_overlay = "reel_master"
active_force = 13 //It's that sturdy
diff --git a/code/modules/fishing/sources/_fish_source.dm b/code/modules/fishing/sources/_fish_source.dm
index edcbd6b3cbf..13d2fa6c687 100644
--- a/code/modules/fishing/sources/_fish_source.dm
+++ b/code/modules/fishing/sources/_fish_source.dm
@@ -1,26 +1,9 @@
-/// Keyed list of preset sources to configuration instance
-GLOBAL_LIST_INIT(preset_fish_sources,init_fishing_configurations())
+GLOBAL_LIST_INIT(preset_fish_sources, init_subtypes_w_path_keys(/datum/fish_source, list()))
-/// These are shared between their spots
-/proc/init_fishing_configurations()
- . = list()
-
- var/datum/fish_source/ocean/beach/beach_preset = new
- .[FISHING_SPOT_PRESET_BEACH] = beach_preset
-
- var/datum/fish_source/lavaland/lava_preset = new
- .[FISHING_SPOT_PRESET_LAVALAND_LAVA] = lava_preset
-
- var/datum/fish_source/lavaland/icemoon/plasma_preset = new
- .[FISHING_SPOT_PRESET_ICEMOON_PLASMA] = plasma_preset
-
- var/datum/fish_source/chasm/chasm_preset = new
- .[FISHING_SPOT_PRESET_CHASM] = chasm_preset
-
- var/datum/fish_source/toilet/toilet_preset = new
- .[FISHING_SPOT_PRESET_TOILET] = toilet_preset
-
-/// Where the fish actually come from - every fishing spot has one assigned but multiple fishing holes can share single source, ie single shared one for ocean/lavaland river
+/**
+ * Where the fish actually come from - every fishing spot has one assigned but multiple fishing holes
+ * can share single source, ie single shared one for ocean/lavaland river
+ */
/datum/fish_source
/// Fish catch weight table - these are relative weights
var/list/fish_table = list()
@@ -39,8 +22,14 @@ GLOBAL_LIST_INIT(preset_fish_sources,init_fishing_configurations())
/datum/fish_source/proc/reason_we_cant_fish(obj/item/fishing_rod/rod, mob/fisherman)
return rod.reason_we_cant_fish(src)
-
-/// DIFFICULTY = (SPOT_BASE_VALUE + FISH_MODIFIER + ROD_MODIFIER + FAV/DISLIKED_BAIT_MODIFIER + TRAITS_ADDITIVE) * TRAITS_MULTIPLICATIVE , For non-fish it's just SPOT_BASE_VALUE
+/**
+ * Calculates the difficulty of the minigame:
+ *
+ * This includes the source's fishing difficulty, that of the fish, the rod,
+ * favorite and disliked baits, fish traits and the fisherman skill.
+ *
+ * For non-fish, it's just the source's fishing difficulty minus the fisherman skill, rod and settler modifiers.
+ */
/datum/fish_source/proc/calculate_difficulty(result, obj/item/fishing_rod/rod, mob/fisherman, datum/fishing_challenge/challenge)
. = fishing_difficulty
@@ -111,7 +100,7 @@ GLOBAL_LIST_INIT(preset_fish_sources,init_fishing_configurations())
* Proc called when the COMSIG_FISHING_CHALLENGE_COMPLETED signal is sent.
* Check if we've succeeded. If so, write into memory and dispense the reward.
*/
-/datum/fish_source/proc/on_challenge_completed(datum/fishing_challenge/source, mob/user, success, perfect)
+/datum/fish_source/proc/on_challenge_completed(datum/fishing_challenge/source, mob/user, success)
SIGNAL_HANDLER
SHOULD_CALL_PARENT(TRUE)
if(!success)
@@ -123,31 +112,34 @@ GLOBAL_LIST_INIT(preset_fish_sources,init_fishing_configurations())
source.used_rod?.consume_bait(reward)
/// Gives out the reward if possible
-/datum/fish_source/proc/dispense_reward(reward_path, mob/fisherman, fishing_spot)
+/datum/fish_source/proc/dispense_reward(reward_path, mob/fisherman, turf/fishing_spot)
if((reward_path in fish_counts)) // This is limited count result
- if(fish_counts[reward_path] > 0)
- fish_counts[reward_path] -= 1
- else
- reward_path = FISHING_DUD //Ran out of these since rolling (multiple fishermen on same source most likely)
- var/atom/movable/reward
- if(ispath(reward_path))
- reward = new reward_path(get_turf(fisherman))
- if(ispath(reward_path,/obj/item))
- if(ispath(reward_path,/obj/item/fish))
- var/obj/item/fish/caught_fish = reward
- caught_fish.randomize_size_and_weight()
- //fish caught signal if needed goes here and/or fishing achievements
- //Try to put it in hand
- INVOKE_ASYNC(fisherman, TYPE_PROC_REF(/mob, put_in_hands), reward)
- fisherman.balloon_alert(fisherman, "caught [reward]!")
- else //If someone adds fishing out carp/chests/singularities or whatever just plop it down on the fisher's turf
- fisherman.balloon_alert(fisherman, "caught something!")
- else if (reward_path == FISHING_DUD)
- //baloon alert instead
+ fish_counts[reward_path] -= 1
+ if(!fish_counts[reward_path])
+ fish_counts -= reward_path //Ran out of these since rolling (multiple fishermen on same source most likely)ù
+
+ var/atom/movable/reward = spawn_reward(reward_path, fisherman, fishing_spot)
+ if(!reward) //baloon alert instead
fisherman.balloon_alert(fisherman,pick(duds))
+ return
+ if(isitem(reward)) //Try to put it in hand
+ INVOKE_ASYNC(fisherman, TYPE_PROC_REF(/mob, put_in_hands), reward)
+ fisherman.balloon_alert(fisherman, "caught [reward]!")
SEND_SIGNAL(fisherman, COMSIG_MOB_FISHING_REWARD_DISPENSED, reward)
- if(reward)
- SEND_SIGNAL(reward, COMSIG_ATOM_FISHING_REWARD, fishing_spot)
+ return reward
+
+/// Spawns a reward from a atom path right where the fisherman is. Part of the dispense_reward() logic.
+/datum/fish_source/proc/spawn_reward(reward_path, mob/fisherman, turf/fishing_spot)
+ if(reward_path == FISHING_DUD)
+ return
+ if(ispath(reward_path, /datum/chasm_detritus))
+ return GLOB.chasm_detritus_types[reward_path].dispense_reward(fishing_spot)
+ if(!ispath(reward_path, /atom/movable))
+ CRASH("Unsupported /datum path [reward_path] passed to fish_source/proc/spawn_reward()")
+ var/atom/movable/reward = new reward_path(get_turf(fisherman))
+ if(isfish(reward))
+ var/obj/item/fish/caught_fish = reward
+ caught_fish.randomize_size_and_weight()
return reward
/// Cached fish list properties so we don't have to initalize fish every time, init deffered
diff --git a/code/modules/fishing/sources/source_types.dm b/code/modules/fishing/sources/source_types.dm
index 206d159414a..77c95f6dca6 100644
--- a/code/modules/fishing/sources/source_types.dm
+++ b/code/modules/fishing/sources/source_types.dm
@@ -23,14 +23,13 @@
/obj/item/fish/guppy = 10,
)
catalog_description = "Fish dimension (Fishing portal generator)"
-
/datum/fish_source/chasm
catalog_description = "Chasm depths"
background = "fishing_background_lavaland"
fish_table = list(
FISHING_DUD = 5,
/obj/item/fish/chasm_crab = 15,
- /obj/item/chasm_detritus = 30,
+ /datum/chasm_detritus = 30,
)
fishing_difficulty = FISHING_DEFAULT_DIFFICULTY + 5
@@ -38,7 +37,7 @@
/datum/fish_source/chasm/roll_reward(obj/item/fishing_rod/rod, mob/fisherman)
var/rolled_reward = ..()
- if(!rod.hook || !ispath(rolled_reward, /obj/item/chasm_detritus))
+ if(!rod.hook || !ispath(rolled_reward, /datum/chasm_detritus))
return rolled_reward
return rod.hook.chasm_detritus_type
@@ -130,7 +129,7 @@
if(!istype(get_area(user), /area/station/holodeck))
interrupt_challenge("exited holodeck")
-/datum/fish_source/holographic/on_challenge_completed(datum/fishing_challenge/source, mob/user, success, perfect)
+/datum/fish_source/holographic/on_challenge_completed(datum/fishing_challenge/source, mob/user, success)
. = ..()
UnregisterSignal(user, COMSIG_MOVABLE_MOVED)
diff --git a/icons/ui_icons/fishing/default.png b/icons/ui_icons/fishing/default.png
index f21074ac2dde8bae43cd811fc812ccaf70cbc985..20dabae9210ed9ace8a66a5d77fac78f16b0c952 100644
GIT binary patch
delta 119
zcmeyy*1Tc{|LL@8x?Ju9I&_ON(1CA3
zF0}?adGHARdDBt!%>LisdlxVD6uaLN^iiBu1`1JGV9;i|1H<^1ATVsHE%YqiecP(V
sOC_K8ZBd>vn8Jnr$;jB_gvnlpl)Hx)AJj1Z0n955p00i_>zopr0OuQFRsaA1
diff --git a/icons/ui_icons/fishing/lavaland.png b/icons/ui_icons/fishing/lavaland.png
index 6c97f66432e94a4db97ee48b8272d7d2325b2884..b6e2487bdc4b8f73115f83bab149a053199b3351 100644
GIT binary patch
delta 119
zcmeyy*1_FD!9W^PXx$B>G+w|5uv9tvP^y?97UWld8m
zrwG?^vomd~iF^XOO$ig0+kc;7wsP0W|CO6AYnXli{BrA_^|#6@*TpH$ax!Vn;JPTX
zNYf>_W0`>O01C{0{qe)s>q}1O?cZ}Y@BHykX2JW*x0pP>Gx48Jo2JXoQ void;
+ win: () => void;
lose: () => void;
};
@@ -60,7 +60,6 @@ class FishingMinigame extends Component<
animation_id: number;
last_frame: number;
reeling: ReelingState = ReelingState.Idle;
- perfect: boolean = true;
area_height: number = 1000;
state: FishingMinigameState;
currentVelocityLimit: number = 200;
@@ -376,7 +375,6 @@ class FishingMinigame extends Component<
completion_delta = seconds * completion_gain_per_second;
} else {
completion_delta = seconds * completion_lost_per_second;
- this.perfect = false;
}
const rawCompletion = currentState.completion + completion_delta;
const newCompletion = clamp(rawCompletion, 0, 100);
@@ -391,7 +389,7 @@ class FishingMinigame extends Component<
this.props.lose();
dispatch(backendSuspendStart());
} else if (newCompletion >= 100) {
- this.props.win(this.perfect);
+ this.props.win();
dispatch(backendSuspendStart());
}
@@ -500,7 +498,7 @@ export const Fishing = (props, context) => {
fish_ai={data.fish_ai}
special_rules={data.special_effects}
background={data.background_image}
- win={(perfect) => act('win', { perfect: perfect })}
+ win={() => act('win')}
lose={() => act('lose')}
/>
diff --git a/tgui/packages/tgui/interfaces/FishingPortalGenerator.tsx b/tgui/packages/tgui/interfaces/FishingPortalGenerator.tsx
deleted file mode 100644
index 4d34015344d..00000000000
--- a/tgui/packages/tgui/interfaces/FishingPortalGenerator.tsx
+++ /dev/null
@@ -1,40 +0,0 @@
-import { useBackend } from '../backend';
-import { Window } from '../layouts';
-import { Button, LabeledList, Section } from '../components';
-
-type FishingPortalData = {
- active: boolean;
- presets: string[];
- active_preset: string;
-};
-
-export const FishingPortalGenerator = (props, context) => {
- const { act, data } = useBackend(context);
-
- return (
-
-
-
- {!data.active && (
-
- {data.presets.map((x) => (
-
-
- ))}
-
- )}
-
-
-
- );
-};