mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-04-20 11:14:42 +01:00
## About The Pull Request Rolling the reward up to 30 seconds before the minigame starts leaves ample room for conditions to mutate and unforeseeable events to happen, which can lead to more frequent issues. Furthermore, it makes more sense this way, since you aren't pulling a carp until it bites the hook. Also TIL that the difficulty of the fishing sources is added to the default difficulty of the minigame, which is 15 and doesn't replace it, which means most fishing spots have a default difficulty of 35 to 40, so I thought it'd be nice if you somehow were able to skip the minigame if you reduce the difficulty to 0 or less, which is totally possible with some prep. IIRC, using the athletics fishing gloves at maximum fitness level (21) + max fishing level (10) + settler quirk (5) + a favorite bait (5) can lower the difficulty by a whooping 41 points, so it's totally possible to achieve the skips on many fishing spots. Doing this however won't train your fishing skill. ## Why It's Good For The Game More stability. Also we skip the minigame entirely if it gets so easy it becomes another waiting phase with little to no input. ## Changelog 🆑 balance: With enough preparation, good skills and equipment, you can manage to skip the minigame phase of fishing by reducing the difficulty all the way down to 0. /🆑
66 lines
2.3 KiB
Plaintext
66 lines
2.3 KiB
Plaintext
ADMIN_VERB(fishing_calculator, R_DEBUG, "Fishing Calculator", "A calculator... for fishes?", ADMIN_CATEGORY_DEBUG)
|
|
var/datum/fishing_calculator/ui = new
|
|
ui.ui_interact(user.mob)
|
|
|
|
/datum/fishing_calculator
|
|
var/list/current_table
|
|
|
|
/datum/fishing_calculator/ui_interact(mob/user, datum/tgui/ui)
|
|
ui = SStgui.try_update_ui(user, src, ui)
|
|
if(!ui)
|
|
ui = new(user, src, "FishingCalculator")
|
|
ui.open()
|
|
|
|
/datum/fishing_calculator/ui_state(mob/user)
|
|
return GLOB.admin_state
|
|
|
|
/datum/fishing_calculator/ui_close(mob/user)
|
|
qdel(src)
|
|
|
|
/datum/fishing_calculator/ui_static_data(mob/user)
|
|
. = ..()
|
|
.["rod_types"] = typesof(/obj/item/fishing_rod)
|
|
.["hook_types"] = typesof(/obj/item/fishing_hook)
|
|
.["line_types"] = typesof(/obj/item/fishing_line)
|
|
.["spot_types"] = subtypesof(/datum/fish_source)
|
|
|
|
/datum/fishing_calculator/ui_data(mob/user)
|
|
return list("info" = current_table)
|
|
|
|
/datum/fishing_calculator/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state)
|
|
. = ..()
|
|
var/mob/user = usr
|
|
switch(action)
|
|
if("recalc")
|
|
var/rod_type = text2path(params["rod"])
|
|
var/bait_type = text2path(params["bait"])
|
|
var/hook_type = text2path(params["hook"])
|
|
var/line_type = text2path(params["line"])
|
|
var/datum/fish_source/spot = GLOB.preset_fish_sources[text2path(params["spot"])]
|
|
|
|
var/obj/item/fishing_rod/temporary_rod = new rod_type
|
|
qdel(temporary_rod.bait)
|
|
qdel(temporary_rod.line)
|
|
qdel(temporary_rod.hook)
|
|
|
|
if(bait_type)
|
|
temporary_rod.set_slot(new bait_type(temporary_rod), ROD_SLOT_BAIT)
|
|
if(hook_type)
|
|
temporary_rod.set_slot(new hook_type(temporary_rod), ROD_SLOT_HOOK)
|
|
if(line_type)
|
|
temporary_rod.set_slot(new line_type(temporary_rod), ROD_SLOT_LINE)
|
|
|
|
var/result_table = list()
|
|
var/modified_table = spot.get_modified_fish_table(temporary_rod, user, null)
|
|
for(var/result_type in spot.fish_table) // through this not modified to display 0 chance ones too
|
|
var/list/info = list()
|
|
info["result"] = result_type
|
|
info["weight"] = modified_table[result_type] || 0
|
|
info["difficulty"] = spot.calculate_difficulty(result_type, temporary_rod, user) + /datum/fishing_challenge::difficulty
|
|
info["count"] = spot.fish_counts[result_type] || "Infinite"
|
|
result_table += list(info)
|
|
current_table = result_table
|
|
|
|
qdel(temporary_rod)
|
|
return TRUE
|