UnitedLexCorp / SimpleTalk

An implementation of HyperTalk in Ohm-js
Apache License 2.0
7 stars 1 forks source link

Hand can initially be invisible when switching stacks if it is currently grabbing #192

Open ApproximateIdentity opened 3 years ago

ApproximateIdentity commented 3 years ago

This was found when messing with this PR https://github.com/UnitedLexCorp/SimpleTalk/pull/190 but it is a little different.

Basically the when the hand grabs an object it sets itself as invisible and instead redirect move commands to that object. If you change the stacks while it is grabbed, then it will still be holding that object. This means that it sends moves to that same object even when on another stack until it is released. Once released it will only grab things on the correct stack, but that doensn't help with this corner case.

Basically whenever a stack change occurs and the hand is running it needs to force release any object it is holding.