From ed7753ccba23626cf59925b13c3ac2a1cc5d9971 Mon Sep 17 00:00:00 2001 From: PacifistDalek <32213277+PacifistDalek@users.noreply.github.com> Date: Mon, 4 Oct 2021 10:29:17 -0400 Subject: [PATCH 1/2] *crosses fingers that this works* --- code/modules/games/cards.dm | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/code/modules/games/cards.dm b/code/modules/games/cards.dm index 87e17efd10b..24f5342c59d 100644 --- a/code/modules/games/cards.dm +++ b/code/modules/games/cards.dm @@ -208,11 +208,12 @@ /obj/item/deck/proc/deckshuffle() var/mob/living/user = usr - if(cooldown < world.time - 5 SECONDS) - cards = shuffle(cards) - user.visible_message("[user] shuffles [src].") - playsound(user, 'sound/items/cardshuffle.ogg', 50, 1) - cooldown = world.time + if(!isobserver(user)) + if(cooldown < world.time - 5 SECONDS) + cards = shuffle(cards) + user.visible_message("[user] shuffles [src].") + playsound(user, 'sound/items/cardshuffle.ogg', 50, 1) + cooldown = world.time /obj/item/deck/MouseDrop(atom/over_object) // Code from Paper bin, so you can still pick up the deck From 10e568d93759adc1d1fc365bc3003efc5d388fee Mon Sep 17 00:00:00 2001 From: PacifistDalek <32213277+PacifistDalek@users.noreply.github.com> Date: Sun, 17 Oct 2021 07:30:09 -0400 Subject: [PATCH 2/2] I was really overthinking this, but thanks AA, this works now --- code/modules/games/cards.dm | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/code/modules/games/cards.dm b/code/modules/games/cards.dm index 24f5342c59d..599eef5b2f0 100644 --- a/code/modules/games/cards.dm +++ b/code/modules/games/cards.dm @@ -200,20 +200,20 @@ deckshuffle() /obj/item/deck/verb/verb_shuffle() - set category = "Object" - set name = "Shuffle" - set desc = "Shuffle the cards in the deck." - set src in view(1) - deckshuffle() + if(!isobserver(usr)) + set category = "Object" + set name = "Shuffle" + set desc = "Shuffle the cards in the deck." + set src in view(1) + deckshuffle() /obj/item/deck/proc/deckshuffle() var/mob/living/user = usr - if(!isobserver(user)) - if(cooldown < world.time - 5 SECONDS) - cards = shuffle(cards) - user.visible_message("[user] shuffles [src].") - playsound(user, 'sound/items/cardshuffle.ogg', 50, 1) - cooldown = world.time + if(cooldown < world.time - 5 SECONDS) + cards = shuffle(cards) + user.visible_message("[user] shuffles [src].") + playsound(user, 'sound/items/cardshuffle.ogg', 50, 1) + cooldown = world.time /obj/item/deck/MouseDrop(atom/over_object) // Code from Paper bin, so you can still pick up the deck