From d4bbf2f60eae4318b1e4e01f3fc3de2d570029ea Mon Sep 17 00:00:00 2001 From: Doxxmedearly <38594443+Doxxmedearly@users.noreply.github.com> Date: Mon, 27 Jul 2020 15:04:17 -0500 Subject: [PATCH] Bedsheet Bedbugs (#9481) --- code/game/objects/structures/bedsheet_bin.dm | 56 +++++++++---------- .../doxxmedearly - bedsheet_blues.yml | 6 ++ 2 files changed, 34 insertions(+), 28 deletions(-) create mode 100644 html/changelogs/doxxmedearly - bedsheet_blues.yml diff --git a/code/game/objects/structures/bedsheet_bin.dm b/code/game/objects/structures/bedsheet_bin.dm index b7aebe6707a..4cca8c062fb 100644 --- a/code/game/objects/structures/bedsheet_bin.dm +++ b/code/game/objects/structures/bedsheet_bin.dm @@ -37,35 +37,35 @@ LINEN BINS add_fingerprint(user) return -/obj/item/bedsheet/attack_hand(mob/user as mob) +/obj/item/bedsheet/attack_hand(mob/user) if(fold || inside_storage_item) if(inside_storage_item) inside_storage_item = FALSE - if(!istype(loc,/mob)) + if(!ismob(loc)) user.put_in_hands(src) - if(!istype(loc,/mob)) + if(!ismob(loc)) toggle_roll(user) else ..() add_fingerprint(user) -/obj/item/bedsheet/on_enter_storage(obj/item/storage/S as obj) +/obj/item/bedsheet/on_enter_storage(obj/item/storage/S) inside_storage_item = TRUE return -/obj/item/bedsheet/on_exit_storage(obj/item/storage/S as obj) +/obj/item/bedsheet/on_exit_storage(obj/item/storage/S) inside_storage_item = FALSE return -/obj/item/bedsheet/AltClick(mob/user as mob) +/obj/item/bedsheet/AltClick(mob/user) if(!istype(loc,/mob)) toggle_fold(user) else - user.show_message("Drop \the [src] first.") + user.show_message(SPAN_WARNING("Drop \the [src] first.")) ..() add_fingerprint(user) -/obj/item/bedsheet/MouseDrop(mob/user as mob) +/obj/item/bedsheet/MouseDrop(mob/user) if((user && (!use_check(user))) && (user.contents.Find(src) || in_range(src, user))) if(!istype(user, /mob/living/carbon/slime) && !istype(user, /mob/living/simple_animal)) if( !user.get_active_hand() ) //if active hand is empty @@ -74,10 +74,10 @@ LINEN BINS if (H.hand) temp = H.organs_by_name["l_hand"] if(temp && !temp.is_usable()) - to_chat(user, "You try to move your [temp.name], but cannot!") + to_chat(user, SPAN_NOTICE("You try to move your [temp.name], but cannot!")) return - to_chat(user, "You pick up the [src].") + to_chat(user, SPAN_NOTICE("You pick up \the [src].")) user.put_in_hands(src) return @@ -97,13 +97,13 @@ LINEN BINS else layer = initial(layer) -/obj/item/bedsheet/verb/fold_verb(var/mob/living/user) +/obj/item/bedsheet/verb/fold_verb() set name = "Fold Bedsheet" set category = "Object" set src in view(1) - if(ishuman(user)) - toggle_fold(user) + if(ishuman(usr)) + toggle_fold(usr) /obj/item/bedsheet/proc/toggle_fold(var/mob/living/user) // Fold sheets to make them more portable through secret janitor-fu. if(!user) @@ -111,7 +111,7 @@ LINEN BINS if(inuse) return FALSE if(roll) - user.show_message("Unroll \the [src] first.") + user.show_message(SPAN_WARNING("Unroll \the [src] first.")) return FALSE inuse = TRUE if (do_after(user, 25, src)) @@ -119,7 +119,8 @@ LINEN BINS user.do_attack_animation(src) playsound(get_turf(loc), "rustle", 15, 1, -5) var/folds = fold - user.visible_message("\The [user] [folds ? "unfolds" : "folds"] \the [src].", "You [fold ? "unfold" : "fold"] \the [src].") + user.visible_message(SPAN_NOTICE("\The [user] [folds ? "unfolds" : "folds"] \the [src]."), + SPAN_NOTICE("You [fold ? "unfold" : "fold"] \the [src].")) if(!fold) fold = TRUE slot_flags = null @@ -135,20 +136,16 @@ LINEN BINS inuse = FALSE return FALSE -/obj/item/bedsheet/verb/roll_verb(var/mob/living/user) +/obj/item/bedsheet/verb/roll_verb() set name = "Roll Bedsheet" set category = "Object" set src in view(1) - if(ishuman(user)) - toggle_roll(user) + if(ishuman(usr)) + toggle_roll(usr) /obj/item/bedsheet/proc/toggle_roll(var/mob/living/user) // Tuck yourself in just by clicking. Also automatically rests you (if you're under it) - if(!user) - return FALSE - if(inuse) - return FALSE - if(fold) + if(!user || inuse || fold) return FALSE inuse = TRUE if (do_after(user, 6, src)) @@ -156,7 +153,8 @@ LINEN BINS user.do_attack_animation(src) playsound(get_turf(loc), "rustle", 15, 1, -5) var/rolls = roll - user.visible_message("\The [user] [rolls ? "unrolls" : "rolls"] \the [src].", "You [roll ? "unroll" : "roll"] \the [src].") + user.visible_message(SPAN_NOTICE("\The [user] [rolls ? "unrolls" : "rolls"] \the [src]."), + SPAN_NOTICE("You [roll ? "unroll" : "roll"] \the [src].")) if(!roll) roll = TRUE slot_flags = null @@ -180,16 +178,18 @@ LINEN BINS /obj/item/bedsheet/attackby(obj/item/I, mob/user) if(I.isscrewdriver()) - user.visible_message("\The [user] begins poking eyeholes in \the [src] with \the [I].", "You begin poking eyeholes in \the [src] with \the [I].") + user.visible_message(SPAN_NOTICE("\The [user] begins poking eyeholes in \the [src] with \the [I]."), + SPAN_NOTICE("You begin poking eyeholes in \the [src] with \the [I].")) if(do_after(user, 50/I.toolspeed)) - to_chat(user, "You poke eyeholes in \the [src]!") + to_chat(user, SPAN_NOTICE("You poke eyeholes in \the [src]!")) new /obj/item/bedsheet/costume(get_turf(src)) qdel(src) return else if(is_sharp(I)) - user.visible_message("\The [user] begins cutting up [src] with [I].", "You begin cutting up [src] with [I].") + user.visible_message(SPAN_NOTICE("\The [user] begins cutting up [src] with [I]."), + SPAN_NOTICE("You begin cutting up [src] with [I].")) if(do_after(user, 50/I.toolspeed)) - to_chat(user, "You cut [src] into pieces!") + to_chat(user, SPAN_NOTICE("You cut [src] into pieces!")) for(var/i in 1 to rand(2,5)) new /obj/item/reagent_containers/glass/rag(get_turf(src)) qdel(src) diff --git a/html/changelogs/doxxmedearly - bedsheet_blues.yml b/html/changelogs/doxxmedearly - bedsheet_blues.yml new file mode 100644 index 00000000000..ba4b7b5a27d --- /dev/null +++ b/html/changelogs/doxxmedearly - bedsheet_blues.yml @@ -0,0 +1,6 @@ +author: Doxxmedearly + +delete-after: True + +changes: + - bugfix: "Folding/unfolding and rolling/unrolling a bedsheet will no longer bring up a list of mobs in view. You can't force others to do it for you."