Skip to content

Comments

improve kitchen tiles performance#4

Open
nnmrts wants to merge 2 commits intoScribbleIsError:mainfrom
pumpncode:improve-kitchen-tiles-performance
Open

improve kitchen tiles performance#4
nnmrts wants to merge 2 commits intoScribbleIsError:mainfrom
pumpncode:improve-kitchen-tiles-performance

Conversation

@nnmrts
Copy link

@nnmrts nnmrts commented Feb 19, 2026

The Card.is_suit hook ran SMODS.find_card('j_moss_kitchen') on every single suit check in the game, even when the Kitchen Tiles joker isn't in play. This causes a noticeable FPS drop (~50 fps) while idling because the game constantly reevaluates hand types for the UI, each calling is_suit dozens of times.

This caches the joker's presence in a boolean that's toggled via add_to_deck/remove_from_deck, so the override short-circuits to the original function immediately when Kitchen Tiles isn't active.

I've added tests to confirm the joker still works as expected.

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