Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port playing cards from Estacao Pirata #1872

Merged
merged 28 commits into from
Sep 14, 2024

Conversation

Leander-0
Copy link
Contributor

About the PR

Ports playing cards and box of cards for everyone to enjoy from this PR rbertoche/space-station-14#104.

Why / Balance

Fun

How to test

choose playing cards loadout
spawn
open the box
buy from the fun vendor

Changelog

🆑 Leander

  • add: Trinkets loadout now comes with a pack of play cards.
  • add: Ported playing cards, now gamble away all your money playing poker and other games!

Copy link
Contributor

github-actions bot commented Aug 16, 2024

RSI Diff Bot; head commit e6d5849 merging into edae074
This PR makes changes to 1 or more RSIs. Here is a summary of all changes:

Resources/Textures/EstacaoPirata/Objects/Misc/cards.rsi

State Old New Status
black_box Added
black_box_open Added
black_hand1 Added
black_hand2 Added
black_hand3 Added
black_hand4 Added
black_hand5 Added
black_joker Added
deck_black_empty Added
deck_black_full Added
deck_black_half Added
deck_black_low Added
deck_nanotrasen_empty Added
deck_nanotrasen_full Added
deck_nanotrasen_half Added
deck_nanotrasen_low Added
deck_syndicate_empty Added
deck_syndicate_full Added
deck_syndicate_half Added
deck_syndicate_low Added
nanotrasen_box Added
nanotrasen_box_open Added
nanotrasen_hand1 Added
nanotrasen_hand2 Added
nanotrasen_hand3 Added
nanotrasen_hand4 Added
nanotrasen_hand5 Added
nanotrasen_joker Added
sc_10_of_Clubs_black Added
sc_10_of_Clubs_nanotrasen Added
sc_10_of_Clubs_syndicate Added
sc_10_of_Diamonds_black Added
sc_10_of_Diamonds_nanotrasen Added
sc_10_of_Diamonds_syndicate Added
sc_10_of_Hearts_black Added
sc_10_of_Hearts_nanotrasen Added
sc_10_of_Hearts_syndicate Added
sc_10_of_Spades_black Added
sc_10_of_Spades_nanotrasen Added
sc_10_of_Spades_syndicate Added
sc_2_of_Clubs_black Added
sc_2_of_Clubs_nanotrasen Added
sc_2_of_Clubs_syndicate Added
sc_2_of_Diamonds_black Added
sc_2_of_Diamonds_nanotrasen Added
sc_2_of_Diamonds_syndicate Added
sc_2_of_Hearts_black Added
sc_2_of_Hearts_nanotrasen Added
sc_2_of_Hearts_syndicate Added
sc_2_of_Spades_black Added
sc_2_of_Spades_nanotrasen Added
sc_2_of_Spades_syndicate Added
sc_3_of_Clubs_black Added
sc_3_of_Clubs_nanotrasen Added
sc_3_of_Clubs_syndicate Added
sc_3_of_Diamonds_black Added
sc_3_of_Diamonds_nanotrasen Added
sc_3_of_Diamonds_syndicate Added
sc_3_of_Hearts_black Added
sc_3_of_Hearts_nanotrasen Added
sc_3_of_Hearts_syndicate Added
sc_3_of_Spades_black Added
sc_3_of_Spades_nanotrasen Added
sc_3_of_Spades_syndicate Added
sc_4_of_Clubs_black Added
sc_4_of_Clubs_nanotrasen Added
sc_4_of_Clubs_syndicate Added
sc_4_of_Diamonds_black Added
sc_4_of_Diamonds_nanotrasen Added
sc_4_of_Diamonds_syndicate Added
sc_4_of_Hearts_black Added
sc_4_of_Hearts_nanotrasen Added
sc_4_of_Hearts_syndicate Added
sc_4_of_Spades_black Added
sc_4_of_Spades_nanotrasen Added
sc_4_of_Spades_syndicate Added
sc_5_of_Clubs_black Added
sc_5_of_Clubs_nanotrasen Added
sc_5_of_Clubs_syndicate Added
sc_5_of_Diamonds_black Added
sc_5_of_Diamonds_nanotrasen Added
sc_5_of_Diamonds_syndicate Added
sc_5_of_Hearts_black Added
sc_5_of_Hearts_nanotrasen Added
sc_5_of_Hearts_syndicate Added
sc_5_of_Spades_black Added
sc_5_of_Spades_nanotrasen Added
sc_5_of_Spades_syndicate Added
sc_6_of_Clubs_black Added
sc_6_of_Clubs_nanotrasen Added
sc_6_of_Clubs_syndicate Added
sc_6_of_Diamonds_black Added
sc_6_of_Diamonds_nanotrasen Added
sc_6_of_Diamonds_syndicate Added
sc_6_of_Hearts_black Added
sc_6_of_Hearts_nanotrasen Added
sc_6_of_Hearts_syndicate Added
sc_6_of_Spades_black Added
sc_6_of_Spades_nanotrasen Added
sc_6_of_Spades_syndicate Added
sc_7_of_Clubs_black Added
sc_7_of_Clubs_nanotrasen Added
sc_7_of_Clubs_syndicate Added
sc_7_of_Diamonds_black Added
sc_7_of_Diamonds_nanotrasen Added
sc_7_of_Diamonds_syndicate Added
sc_7_of_Hearts_black Added
sc_7_of_Hearts_nanotrasen Added
sc_7_of_Hearts_syndicate Added
sc_7_of_Spades_black Added
sc_7_of_Spades_nanotrasen Added
sc_7_of_Spades_syndicate Added
sc_8_of_Clubs_black Added
sc_8_of_Clubs_nanotrasen Added
sc_8_of_Clubs_syndicate Added
sc_8_of_Diamonds_black Added
sc_8_of_Diamonds_nanotrasen Added
sc_8_of_Diamonds_syndicate Added
sc_8_of_Hearts_black Added
sc_8_of_Hearts_nanotrasen Added
sc_8_of_Hearts_syndicate Added
sc_8_of_Spades_black Added
sc_8_of_Spades_nanotrasen Added
sc_8_of_Spades_syndicate Added
sc_9_of_Clubs_black Added
sc_9_of_Clubs_nanotrasen Added
sc_9_of_Clubs_syndicate Added
sc_9_of_Diamonds_black Added
sc_9_of_Diamonds_nanotrasen Added
sc_9_of_Diamonds_syndicate Added
sc_9_of_Hearts_black Added
sc_9_of_Hearts_nanotrasen Added
sc_9_of_Hearts_syndicate Added
sc_9_of_Spades_black Added
sc_9_of_Spades_nanotrasen Added
sc_9_of_Spades_syndicate Added
sc_Ace_of_Clubs_black Added
sc_Ace_of_Clubs_nanotrasen Added
sc_Ace_of_Clubs_syndicate Added
sc_Ace_of_Diamonds_black Added
sc_Ace_of_Diamonds_nanotrasen Added
sc_Ace_of_Diamonds_syndicate Added
sc_Ace_of_Hearts_black Added
sc_Ace_of_Hearts_nanotrasen Added
sc_Ace_of_Hearts_syndicate Added
sc_Ace_of_Spades_black Added
sc_Ace_of_Spades_nanotrasen Added
sc_Ace_of_Spades_syndicate Added
sc_Jack_of_Clubs_black Added
sc_Jack_of_Clubs_nanotrasen Added
sc_Jack_of_Clubs_syndicate Added
sc_Jack_of_Diamonds_black Added
sc_Jack_of_Diamonds_nanotrasen Added
sc_Jack_of_Diamonds_syndicate Added
sc_Jack_of_Hearts_black Added
sc_Jack_of_Hearts_nanotrasen Added
sc_Jack_of_Hearts_syndicate Added
sc_Jack_of_Spades_black Added
sc_Jack_of_Spades_nanotrasen Added
sc_Jack_of_Spades_syndicate Added
sc_King_of_Clubs_black Added
sc_King_of_Clubs_nanotrasen Added
sc_King_of_Clubs_syndicate Added
sc_King_of_Diamonds_black Added
sc_King_of_Diamonds_nanotrasen Added
sc_King_of_Diamonds_syndicate Added
sc_King_of_Hearts_black Added
sc_King_of_Hearts_nanotrasen Added
sc_King_of_Hearts_syndicate Added
sc_King_of_Spades_black Added
sc_King_of_Spades_nanotrasen Added
sc_King_of_Spades_syndicate Added
sc_Queen_of_Clubs_black Added
sc_Queen_of_Clubs_nanotrasen Added
sc_Queen_of_Clubs_syndicate Added
sc_Queen_of_Diamonds_black Added
sc_Queen_of_Diamonds_nanotrasen Added
sc_Queen_of_Diamonds_syndicate Added
sc_Queen_of_Hearts_black Added
sc_Queen_of_Hearts_nanotrasen Added
sc_Queen_of_Hearts_syndicate Added
sc_Queen_of_Spades_black Added
sc_Queen_of_Spades_nanotrasen Added
sc_Queen_of_Spades_syndicate Added
singlecard_down_black Added
singlecard_down_nanotrasen Added
singlecard_down_syndicate Added
syndicate_box Added
syndicate_box_open Added
syndicate_hand1 Added
syndicate_hand2 Added
syndicate_hand3 Added
syndicate_hand4 Added
syndicate_hand5 Added
syndicate_joker Added

Edit: diff updated after e6d5849

Copy link
Contributor

@whatston3 whatston3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pushed a set of changes onto whatston3:port-cards-suggestions, I think the changes improve interaction consistency.

Left-click on a deck or hand when holding a card, hand, or deck now always draws a card, and alt-click on a deck or hand always pushes the contents of your hand/card/deck onto a stack. Alt-click on a single card, even when holding a card, deck, or hand, will result in flipping it*. Picking a card to draw from a hand of two leaves the remaining card on the table, and a deck with two cards left turns into a single card when drawn from.

Did a revision pass over the fluent entries, everything seems good to my eyes. I would highly request giving that branch a test, it involved more changes than I'd like.

Reverted the access change to StorageSystem.FillStorage (as it was unused),

Nice little feature though, looking forward to seeing it in use.

  • I looked into getting this to push the entire deck onto the card, but it was fiddly.

@Leander-0
Copy link
Contributor Author

Really nice, ill give it a try.

@Leander-0
Copy link
Contributor Author

should be good to review

@Ansome101
Copy link
Contributor

Are there any plans to update Casey's or Tinnia's to have decks of cards on their gambling tables round-start like the dice bags so they're readily available? Regardless, this PR might finally breath some life into Casey's and be good fun for creating player-driven RP scenarios, really looking forward to it!

Copy link
Contributor

@whatston3 whatston3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed a few remaining issues with the one-card hand/deck dropping out of your pockets on use. One-card hands and decks are still a thing, and one-card hands are drawn properly.

Happy with the state of this. Approving on my side.

@Leander-0 Leander-0 closed this Sep 6, 2024
@Leander-0 Leander-0 deleted the port-cards branch September 6, 2024 19:43
@Leander-0 Leander-0 restored the port-cards branch September 6, 2024 19:43
@Leander-0 Leander-0 deleted the port-cards branch September 6, 2024 19:44
@Leander-0 Leander-0 restored the port-cards branch September 6, 2024 19:48
@Leander-0 Leander-0 reopened this Sep 6, 2024
@Leander-0
Copy link
Contributor Author

Did a real dumb over there, sorry.

Copy link
Contributor

github-actions bot commented Sep 7, 2024

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions github-actions bot added Changes: Shaders and removed Merge Conflict This PR has conflicts that prevent merging labels Sep 7, 2024
@github-actions github-actions bot added Map-POI Map - POI and removed YML labels Sep 9, 2024
@whatston3
Copy link
Contributor

whatston3 commented Sep 9, 2024

Mapped three deck boxes, two on Casey's, one on Tinnia's.

Added animations for pretty much all card interactions. Didn't see any server errors when testing with invalid entity references.

Cards will be sold for bugger all value, and the deck box has a price of 200 (sells from Good Clean Fun at 2k) to discourage spamming cards. Cards no longer stack infinitely, they stack to 212 (four complete decks). If you need more, play a different game, I suppose, or fiddle around with two decks and shuffle them between each other a few times.

As far as I can see, it's good to go.

@whatston3
Copy link
Contributor

Last set of changes, I swear.

Click to draw and alt+click to push all cards if any card/hand/deck is in your active hand is always true, targeting a hand, card, or deck.
Hands of cards can now be flipped and shuffled. When selecting a card from a flipped hand of cards, the name of the cards are hidden, otherwise the cards say their rank/suit. Go fish is real.
Inserting cards into hands, or forming hands from multiple cards always flips the cards into the flipped state of the target hand/card that is accepting the cards.

Small quality of life changes, but good ones. One card hands/decks are still weird, but it's better than picking up two cards occasionally or having cards fall out of your pocket/backpack when swapping cards between hands.

image

@whatston3
Copy link
Contributor

Still wasn't happy with the oddities in the deck, I've tried a new tack: activation verbs.

https://github.com/Leander-0/frontier-station-14/compare/port-cards...whatston3:frontier-station-14:port-cards-activate-verb?expand=1

With these changes, clicking a deck without anything in hand now picks it up, like any other item. Pressing E on any card, hand, or deck in the world will now draw a single card from it (a bit odd for an activation verb, but better than oddball interaction via Z/LMB). The verb to draw should show up in right-click menus, so that's normal, and the pick up verb behaves for all card sets in its correct order, same with alternate verbs.

Might rearrange shuffle and split functions for decks, and will need to give this another look with fresher eyes.

@dvir001 dvir001 self-requested a review September 14, 2024 23:29
@github-actions github-actions bot added the Status: Needs Review This PR is awaiting reviews label Sep 14, 2024
Copy link
Contributor

@dvir001 dvir001 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can use some DoAfter for mixing etc,
But still working fine as is

@whatston3
Copy link
Contributor

Cards ho.

@whatston3 whatston3 merged commit 46ce041 into new-frontiers-14:master Sep 14, 2024
15 checks passed
FrontierATC added a commit that referenced this pull request Sep 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants