AltClick() Deck Shuffle (#22924)

* Update tarot.dm

Allow shuffle through AltClick(), reduce shuffle time.

* Update cards.dm

Allow AltClick to shuffle the deck.

* Updated tarot.dm

Removed the tarot shuffle, as it was already inherited from deck's new AltClick shuffle option.

* Update cards.dm

Lowered cooldown on cards.dm to match tarot.dm

* Change tarot.dm and cards.dm

Changed shuffling cooldown time from 5 seconds to one second.
This commit is contained in:
Varelion
2023-10-22 12:54:09 -04:00
committed by GitHub
parent b508640e39
commit a60bfdf934
2 changed files with 6 additions and 2 deletions
+4 -1
View File
@@ -239,6 +239,9 @@
/obj/item/deck/attack_self()
deckshuffle()
/obj/item/deck/AltClick()
deckshuffle()
/obj/item/deck/verb/verb_shuffle()
if(!isobserver(usr))
set category = "Object"
@@ -249,7 +252,7 @@
/obj/item/deck/proc/deckshuffle()
var/mob/living/user = usr
if(cooldown < world.time - 5 SECONDS)
if(cooldown < world.time - 1 SECONDS)
cards = shuffle(cards)
user.visible_message("<span class='notice'>[user] shuffles [src].</span>")
playsound(user, 'sound/items/cardshuffle.ogg', 50, 1)
+2 -1
View File
@@ -15,7 +15,7 @@
/obj/item/deck/tarot/deckshuffle()
var/mob/living/user = usr
if(cooldown < world.time - 5 SECONDS)
if(cooldown < world.time - 1 SECONDS)
var/list/newcards = list()
while(cards.len)
var/datum/playingcard/P = pick(cards)
@@ -28,3 +28,4 @@
playsound(user, 'sound/items/cardshuffle.ogg', 50, 1)
user.visible_message("<span class='notice'>[user] shuffles [src].</span>", "<span class='notice'>You shuffle [src].</span>")
cooldown = world.time