diff --git a/code/game/objects/items/weapons/storage/storage.dm b/code/game/objects/items/weapons/storage/storage.dm index af1ff7275b3..026189fea17 100644 --- a/code/game/objects/items/weapons/storage/storage.dm +++ b/code/game/objects/items/weapons/storage/storage.dm @@ -113,7 +113,7 @@ //If we found a turf, pick up things from there if(location_to_pickup) - pickup_items_from_loc_and_feedback(user, location_to_pickup) + pickup_items_from_loc_and_feedback(user, location_to_pickup, explicit_request = TRUE) //Pick up one thing at a time else @@ -127,13 +127,15 @@ * * * user - The user trying to pick up things * * location - A `/turf` to pick up things from + * * explicit_request - Boolean, if the request to pick up was explicit (eg. user clicking on something) or not (eg. auto-grabbing), + * suppresses the failure if nothing was picked up */ -/obj/item/storage/proc/pickup_items_from_loc_and_feedback(mob/user, turf/location) +/obj/item/storage/proc/pickup_items_from_loc_and_feedback(mob/user, turf/location, explicit_request = FALSE) set waitfor = FALSE //pickup_result[1] is if there's any success, pickup_result[2] is if there's any failure //both are booleans - var/list/pickup_result = pickup_items_from_loc(user, location) + var/list/pickup_result = pickup_items_from_loc(user, location, detail_insertions = explicit_request) //Choose the feedback message depending on what happened and send it to the user var/pickup_feedback_message @@ -143,7 +145,7 @@ else if(pickup_result[1] && pickup_result[2]) pickup_feedback_message = SPAN_NOTICE("You put some things in \the [src].") - else if(!pickup_result[1] && pickup_result[2]) + else if(explicit_request && (!pickup_result[1] && pickup_result[2])) pickup_feedback_message = SPAN_NOTICE("You fail to pick anything up with \the [src].") //Check if we got a feedback message and, if so, send it to the user @@ -158,8 +160,9 @@ * * * user - The user trying to pick up things * * location - A `/turf` to pick up things from + * * detail_insertions - A boolean, if `TRUE`, `can_be_inserted()` will be told to give feedbacks */ -/obj/item/storage/proc/pickup_items_from_loc(mob/user, turf/location) +/obj/item/storage/proc/pickup_items_from_loc(mob/user, turf/location, detail_insertions = TRUE) //In the format of list(SUCCESS, FAILURE) var/list/return_status = list(FALSE, FALSE) @@ -177,7 +180,7 @@ if (user && get_turf(user) != original_location) break - if(!can_be_inserted(item)) // Note can_be_inserted still makes noise when the answer is no + if(!can_be_inserted(item, !detail_insertions)) // Note can_be_inserted still makes noise when the answer is no rejections[item.type] = TRUE // therefore full bags are still a little spammy return_status[2] = TRUE CHECK_TICK diff --git a/code/modules/mining/ore_satchel.dm b/code/modules/mining/ore_satchel.dm index fcda172e6f7..c68391660bb 100644 --- a/code/modules/mining/ore_satchel.dm +++ b/code/modules/mining/ore_satchel.dm @@ -45,7 +45,7 @@ var/turf/location = get_turf(user) if(location) - pickup_items_from_loc_and_feedback(user, location) + pickup_items_from_loc_and_feedback(user, location, explicit_request = FALSE) /obj/item/storage/bag/ore/get_examine_text(mob/user, distance, is_adjacent, infix, suffix) . = ..() diff --git a/html/changelogs/fluffyghost-pickupsilencing.yml b/html/changelogs/fluffyghost-pickupsilencing.yml new file mode 100644 index 00000000000..d7bb5518b51 --- /dev/null +++ b/html/changelogs/fluffyghost-pickupsilencing.yml @@ -0,0 +1,41 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +# balance +# admin +# backend +# security +# refactor +################################# + +# Your name. +author: FluffyGhost + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - bugfix: "Ore satchel won't spam failed pickups anymore unless the user does an explicit pickup request (clicking on a turf/item)."