Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🪲 Fix bug in custom Skulpt module extensions (#5763)
This PR addresses the following issues: - When the body of an if-pressed command contains more than one turtle functions, only the first one will be executed. - When the body of an if-pressed command contains time.sleep(), the execution would terminate when reaching this line. Fixes #5729 #5681 **How to test** Run locally, go to level 15 and run the following scenarios: 1. Check that the code below outputs all items in the list. Note that they should not appear at once, but with a tiny delay in between: ``` lijstje is "1", "2", "3", "4", "5" if x is pressed for dier in lijstje print dier else print 'onbekend dier' ``` 2. Check that when pressing x, all statements are executed. Note that the waiting-for-key-press modal should appear and then disappear while the action is being executed. Note that pressing the x button while the turtle is moving should not trigger a new run. If an error occurs, the keys should not be animated anymore. ``` i = 0 while i < 20 if x is pressed turn 10 color 'blue' turn 90 forward 50 color 'red' turn 90 forward 50 color 'orange' turn 90 forward 50 color 'green' turn 90 forward 50 else turn -15 color 'blue' turn -90 forward 50 color 'red' turn -90 forward 50 color 'orange' turn -90 forward 50 color 'green' turn -90 forward 50 i = i + 1 ```
- Loading branch information