mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-21 19:17:50 +01:00
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:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user