Skip to content

Commit

Permalink
[MIRROR] Fixes TGC decks being capped to 31 cards rather than 30. [MD…
Browse files Browse the repository at this point in the history
…B IGNORE] (Skyrat-SS13#20450)

* Fixes TGC decks being capped to 31 cards rather than 30. (#74602)

## About The Pull Request

Fixes #72701 (closed but the issue seems to have been misunderstood.)

TGC decks are limited to 30 cards when inserting cards by using the deck
on individual cards (the legal amount) but using individual cards on a
deck has a limit of 31 cards instead, the 30 card limit is now correctly
checked on card insertions.
## Why It's Good For The Game

Bugfix.
## Changelog
:cl:
fix: TGC decks will no longer allow you to insert an illegal 31st card.
/:cl:

* Fixes TGC decks being capped to 31 cards rather than 30.

---------

Co-authored-by: NamelessFairy <[email protected]>
  • Loading branch information
SkyratBot and NamelessFairy authored Apr 10, 2023
1 parent b2a0cff commit 5b4a594
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/game/objects/items/tcg/tcg.dm
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ GLOBAL_LIST_EMPTY(tcgcard_radial_choices)
/obj/item/tcgcard_deck/attackby(obj/item/item, mob/living/user, params)
. = ..()
if(istype(item, /obj/item/tcgcard))
if(contents.len > 30)
if(contents.len >= 30)
to_chat(user, span_notice("This pile has too many cards for a regular deck!"))
return FALSE
var/obj/item/tcgcard/new_card = item
Expand Down

0 comments on commit 5b4a594

Please sign in to comment.