From 493c7f8bc9dfea0a2e8dde09dc3e4eee8a07d392 Mon Sep 17 00:00:00 2001 From: Bloop Date: Fri, 21 Apr 2023 17:19:26 -0400 Subject: [PATCH] Reduces the amount of dead bodies in the chasm when using the rescue hook (#74880) ## About The Pull Request When trying to fish for bodies with a rescue hook, the chance of getting a random 'default' generic skeleton is too high. On top of that, there can be a number of legion skeletons clogging up the contents list, making catching a sentient mob a RNG based nightmare. --- This PR makes it far more likely to catch an actual person that has fallen into the chasm when using the rescue hook, which is how it's supposed to work, by doing two things: 1) Reduced the chance of getting a default skeleton regardless of the chasm's contents from 50% to 12.5%. 2) If a body that once belonged to a sentient player is down there, that will always be fished up before any of the non sentient ones are. ## Why It's Good For The Game Makes using a rescue hook far less annoying to use when you just want to save someone who has fallen in. Duds can still happen as usual, and there is still a small chance of getting a generic skeleton if you fail the 87.5% chance roll...but overall, fishing someone up with the rescue rod is a lot better now. ## Changelog :cl: qol: the rescue hook has a much greater chance at catching actual fallen player bodies as opposed to generic skeletons/other npc corpses /:cl: --------- Co-authored-by: san7890 --- code/modules/fishing/fish/chasm_detritus.dm | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/code/modules/fishing/fish/chasm_detritus.dm b/code/modules/fishing/fish/chasm_detritus.dm index 4960387526b..ef6674c04e4 100644 --- a/code/modules/fishing/fish/chasm_detritus.dm +++ b/code/modules/fishing/fish/chasm_detritus.dm @@ -46,10 +46,13 @@ create_default_object() return - var/atom/movable/detritus = pick(chasm_stuff) + var/atom/movable/detritus = determine_detritus(chasm_stuff) detritus.forceMove(get_turf(src)) qdel(src) +/// Returns the chosen detritus from the given list of things to choose from +/obj/item/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() @@ -94,6 +97,14 @@ return chasm_contents +/// 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) + for(var/mob/fallen_mob as anything in chasm_stuff) + if(fallen_mob.mind) + return fallen_mob + return ..() /obj/item/chasm_detritus/restricted/objects default_contents_chance = 12.5 @@ -101,7 +112,7 @@ /obj/item/chasm_detritus/restricted/bodies - default_contents_chance = 50 + default_contents_chance = 12.5 default_contents_key = BODIES_ONLY chasm_storage_restricted_type = /mob