From 2bac953ad02f4455cf906fed41256ba4e84bab69 Mon Sep 17 00:00:00 2001 From: GenericDM <34109002+GenericDM@users.noreply.github.com> Date: Fri, 22 Dec 2023 00:06:21 -0800 Subject: [PATCH] crate shelf UX tweaks (#2605) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## About The Pull Request changes up description and UI interactions of crate shelves. Mouse cursor will now switch to a drag+drop cursor when clickdragging crates, and the description is more descriptive. also changes spans to use the cleaner span_blahblah() proc ## Why It's Good For The Game ## Changelog 🆑 tweak: cursor will now switch to a clickdrag cursor when clickdragging crates tweak: crate shelf description improved /:cl: --- .../structures/crates_lockers/crates.dm | 1 + code/game/objects/structures/crateshelf.dm | 24 +++++++++---------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/code/game/objects/structures/crates_lockers/crates.dm b/code/game/objects/structures/crates_lockers/crates.dm index e2430be999b6..3729f41af36e 100644 --- a/code/game/objects/structures/crates_lockers/crates.dm +++ b/code/game/objects/structures/crates_lockers/crates.dm @@ -10,6 +10,7 @@ allow_dense = TRUE dense_when_open = TRUE climbable = TRUE + mouse_drag_pointer = TRUE climb_time = 10 //real fast, because let's be honest stepping into or onto a crate is easy delivery_icon = "deliverycrate" open_sound = 'sound/machines/crate_open.ogg' diff --git a/code/game/objects/structures/crateshelf.dm b/code/game/objects/structures/crateshelf.dm index a2234cc45ad9..3b1387f5490b 100644 --- a/code/game/objects/structures/crateshelf.dm +++ b/code/game/objects/structures/crateshelf.dm @@ -15,7 +15,7 @@ var/use_delay = DEFAULT_SHELF_USE_DELAY var/list/shelf_contents -/obj/structure/crate_shelf/tall +/obj/structure/crate_shelf/debug capacity = 12 /obj/structure/crate_shelf/Initialize() @@ -38,12 +38,12 @@ /obj/structure/crate_shelf/examine(mob/user) . = ..() - . += "There are some bolts holding [src] together." + . += span_notice("There are some bolts holding [src] together.") if(shelf_contents.Find(null)) // If there's an empty space in the shelf, let the examiner know. - . += "You could drag a crate into [src]." + . += span_notice("You could drag and drop a crate into [src].") if(contents.len) // If there are any crates in the shelf, let the examiner know. - . += "You could drag a crate out of [src]." - . += "[src] contains:" + . += span_notice("You could drag and drop a crate out of [src].") + . += span_notice("[src] contains:") for(var/obj/structure/closet/crate/crate in shelf_contents) . += " [icon2html(crate, user)] [crate]" @@ -56,13 +56,13 @@ return ..() /obj/structure/crate_shelf/relay_container_resist_act(mob/living/user, obj/structure/closet/crate) - to_chat(user, "You begin attempting to knock [crate] out of [src].") + to_chat(user, span_notice("You begin attempting to knock [crate] out of [src]")) if(do_after(user, 30 SECONDS, target = crate)) if(!user || user.stat != CONSCIOUS || user.loc != crate || crate.loc != src) return // If the user is in a strange condition, return early. - visible_message("[crate] falls off of [src]!", - "You manage to knock [crate] free of [src].", - "[crate]'s lid falls open!") + crate.visible_message(span_warning("[crate]'s lid falls open!")) else // If we somehow fail to open the crate, just break it instead! - crate.visible_message("[crate] falls apart!") + crate.visible_message(span_warning("[crate] falls apart!")) crate.deconstruct() if(3) // Break that crate! - crate.visible_message("[crate] falls apart!") + crate.visible_message(span_warning("[crate] falls apart!")) crate.deconstruct() shelf_contents[shelf_contents.Find(crate)] = null if(!(flags_1&NODECONSTRUCT_1))