drwhut / tabletop-club

An open-source platform for playing tabletop games in a physics-based 3D environment for Windows, macOS, and Linux! Made with the Godot Engine.
https://tabletopclub.net
MIT License
1.27k stars 55 forks source link

Fixed card stacks being shaken by accident #136

Closed elmodor closed 1 year ago

elmodor commented 1 year ago

Fixes/Solves Fixes #116

I hope it is okay that I took the liberty to try to solve this issue with your help.

Tried the fix and it works very well! The stack is not shuffled by accident anymore. Shaking the stack while being picked up works flawlessly too.

I also changed the function is_being_shaked to return false whenever a condition is not met. Doing so we have less indents which (in my eyes) is easier to read.