Skip to content

Fixed double-sided hybrid crash + visual issue with blank face of double-sided playing cards#855

Open
paulkent-coder wants to merge 9 commits into
SpectralPack:mainfrom
paulkent-coder:fix_hybrid_double_sided_crash
Open

Fixed double-sided hybrid crash + visual issue with blank face of double-sided playing cards#855
paulkent-coder wants to merge 9 commits into
SpectralPack:mainfrom
paulkent-coder:fix_hybrid_double_sided_crash

Conversation

@paulkent-coder
Copy link
Copy Markdown
Contributor

This PR makes the following fixes to the functionality of the Double-Sided edition:

  1. There exists a fairly glaring visual glitch where the blank side of an unmerged double-faced playing card appears to still have the rank and suit of the front face. This can easily lead to situations where a player gets the two sides confused, which causes all sorts of UX problems. From what I can tell, the cause of the glitch is that (possibly due to some sort of change in Steamodded or Talisman?) the current method of hiding the rank and suit (deleting card.children.front) is ineffective. To fix this, this PR instead hides the rank and suit by hooking Steamodded's provided Card:should_hide_front function to return true for blank faces of umerged double-sided playing cards.
  2. If a double-sided playing card is moved to the joker tray with Quantify and merged with a joker, the game crashes upon mousing over the joker side of the resulting hybrid card. The crash happens because the game still considers the hybrid card to be a playing card, so it tries to generate an appropriate tooltip for a playing card, only to fail to find the rank and suit because the joker side doesn't have those. This PR fixes the crash by keeping track of the playing_card field of each face separately, to toggle whether or not a card is considered a playing card depending on which side is in front.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant