From 2b46d87742533a61a1de255fad7e6327073044c4 Mon Sep 17 00:00:00 2001 From: SmArtKar <44720187+SmArtKar@users.noreply.github.com> Date: Mon, 15 Feb 2021 21:15:08 +0300 Subject: [PATCH] Packs now put cards into your hand --- code/modules/tcg/cards.dm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/code/modules/tcg/cards.dm b/code/modules/tcg/cards.dm index cc67bb3fa7..54c4c8bb75 100644 --- a/code/modules/tcg/cards.dm +++ b/code/modules/tcg/cards.dm @@ -275,8 +275,12 @@ /obj/item/cardpack/attack_self(mob/user) . = ..() var/list/cards = buildCardListWithRarity(card_count, guaranteed_count) + var/obj/item/tcgcard_hand/hand = new(get_turf(user)) for(var/template in cards) - new /obj/item/tcg_card(get_turf(user), template, illegal) + var/obj/item/tcg_card/card = new(hand, template, illegal) + hand.cards.Add(card) + user.put_in_hands(hand) + hand.update_icon() to_chat(user, "Wow! Check out these cards!") playsound(loc, 'sound/items/poster_ripped.ogg', 20, TRUE) if(prob(contains_coin))