Commit Graph
398 Commits
Author SHA1 Message Date
DD fce83dc2c3 make it work for non-droppable inputs 2018-01-10 17:50:48 -05:00
DD db662b8584 fix lint 2018-01-09 14:55:46 -05:00
DD Liu 0b6d7adf3e Update monitor on dropdown change 2018-01-08 20:22:18 -05:00
Karishma Chadha c0e4ae455c Streamlining broadcast block execution. When arg information is provided to execute function, corresponding broadcast message is looked up by id, if provided, or if not, then name. If neither id nor name is provided, we can't look up the broadcast message and something is wrong, so an error is logged. We no longer need to differentiate between the shadow menu vs. plugged in input cases via the argValue name (e.g. 'BROADCAST_OPTION' vs. 'BROADCAST_INPUT'). This refactor also helps with sb2 import, coming in the next commit. 2017-12-21 19:06:11 -05:00
Karishma Chadha 413d113dda Adding support for blocks to be plugged into the input of broadcast blocks. SB2 Import to come. 2017-12-21 19:06:11 -05:00
Eric Rosenbaum 2d6e91fa59 Merge branch 'develop' into feature/extension-category-icons 2017-12-19 15:39:00 -05:00
Eric Rosenbaum 9613046b2f Add optional menuIcon for extension blocks 2017-12-19 14:47:11 -05:00
Eric Rosenbaum 7c853ab7f3 Merge pull request #869 from ericrosenbaum/feature/add-extension-separator
Add separator to extension block definition
2017-12-19 13:58:28 -05:00
Eric Rosenbaum 00d6e9e8e7 Merge pull request #863 from ericrosenbaum/feature/blockly-extension-for-scratch-extensions
Add blockly extension for scratch extensions
2017-12-15 15:27:26 -05:00
Eric Rosenbaum 5cb0f5d76d Add separator to extension block definition 2017-12-15 14:09:29 -05:00
Eric Rosenbaum 5e6187bee7 Add blockly extension for scratch extensions 2017-12-14 14:37:08 -05:00
Paul Kaplan 0f82e2a84d Be more cautious about parsing json. 2017-12-14 14:23:16 -05:00
Paul Kaplan 256d7b3d6c Parse the warp property from the mutation instead of using directly. 2017-12-13 15:53:55 -05:00
Eric Rosenbaum 25ded4cff7 Fix spelling of coloUrTertiary 2017-12-11 17:01:23 -05:00
chrisgarrity f51cf9877e Preliminary localization (#777)
* localize the block and menu strings in the pen extension
* adds .tx/config to be able to push translations to transifex
* includes format-message to localize strings and extracting them.
* add setLocale function to VM to allow GUI to pass in locale data.
* refresh block definitions when the locale changes.

### Still to be decided
For now just extracting messages from the pen extension into their own file. We’ll need to decide if each category gets its own file, or group all the strings into one resource.
2017-12-11 15:41:45 -05:00
Chris Willis-Ford e7bbad60e8 Merge pull request #793 from cwillisf/remove-threads-safely
Make _removeThread safe during thread iteration
2017-12-06 17:18:10 -08:00
Paul Kaplan e6bd474720 Merge pull request #845 from kchadha/broadcast-msg-extra-create-bugfix
Broadcast Msg Bugfix
2017-12-05 15:38:12 -05:00
Paul Kaplan bb69d157cd Merge pull request #832 from paulkaplan/custom-procedure-updates
Updates for editable custom procedures
2017-12-05 15:37:56 -05:00
Karishma Chadha 34b0aff637 Bugfix for scratch-gui issue #994, where executing a broadcast block from the flyout was creating a conflicting variable, causing a fatal error. 2017-12-04 18:01:29 -05:00
sjhuang26 eede8105d1 Clear answer on green flag 2017-12-01 20:06:55 -05:00
Paul Kaplan a9e95f3b01 Merge pull request #829 from kchadha/broadcast-message-typed-variable
Broadcast message functionality
2017-12-01 11:51:38 -05:00
Paul Kaplan 5a53323715 Update to use explicit procedure names and ids 2017-11-29 12:00:00 -05:00
Karishma Chadha e5378d323d Adding unit tests for new lookupOrCreate funciton, fixing a bug that came up during testing (using lookupVariableById on a null target). Skipping integration tests that do not work right now because SB2 import of broadcast message blocks has not been implemented yet. 2017-11-29 10:43:07 -05:00
Paul Kaplan 80b4dab104 Decode the encoded argument information 2017-11-29 10:34:59 -05:00
Karishma Chadha b674a0c047 Code cleanup and refactoring, and getting scratch3_event broadcast functionality to look up the variable name instead of getting it ad-hoc. 2017-11-28 22:33:27 -05:00
Karishma Chadha 0a15190b85 Broadcast message functionality (works with creating new messages, and switching back and forth between them as well). This commit includes a temporary workaround for the issue where the default broadcast message, 'message1' wasn't triggering a var_create event (filed in LLK/scratch-blocks#1258). 2017-11-21 16:48:48 -05:00
DD Liu 58dd57fe48 Merge pull request #784 from fsih/perSpriteMonitors
Execute monitors on a given target ID when block is sprite-specific
2017-11-21 10:23:53 -05:00
DD ec9d8094bd fix review comments 2017-11-20 17:23:59 -05:00
DD 6d26023104 revert unnecessary changes'
:
2017-11-20 13:00:37 -05:00
griffpatch 6ed2ca6caa Cache Block Inputs & Procedure Definitions
* Cache Block Inputs & Procedure Definitions

* @mzgoddard requested changes on this pull request

* Move all caching into a single reusable field _cache.
* Invalidate 'all' caches on any change.
* Use 'typeof' instead of hasOwnProperty.
* Take caching out of Block and use lookup instead.
2017-11-20 10:22:51 -05:00
Christopher Willis-Ford b19af399fa Make _removeThread safe during thread iteration
Before: `_removeThread` stops a thread and immediately removes it from
the runtime's thread array. If this happens while iterating over the
thread array, such as in the case of clone deletion, some elements of
the array can be missed.

After: `_removeThread` has been renamed to `_stopThread`. It still stops
the thread immediately but it no longer removes the thread from the
runtime's thread array. Instead, `_stopThread` marks the thread for
later removal. Such threads are removed at the top of the next `_step`.
2017-11-17 12:56:25 -08:00
DD Liu 2d9722e69c Merge pull request #787 from fsih/deleteMonitorBlocks
Delete monitor block when variable is deleted
2017-11-16 17:20:26 -05:00
DD 255e160ebb Change it so we dont have to do string manipulation on IDs to get data out of events 2017-11-16 17:19:51 -05:00
Paul Kaplan bbb8904467 Merge pull request #789 from paulkaplan/custom-procedure-update
Update naming and implementation for custom procedure blocks
2017-11-16 17:07:03 -05:00
Paul Kaplan 34dfbb50ba Update naming and implementation for custom procedure blocks 2017-11-16 14:17:08 -05:00
Michael "Z" Goddard 3d92553459 Return restarted threads in list from startHats
Add restarted threads to the list of newThreads returned by startHats.
2017-11-16 11:23:51 -05:00
Michael "Z" Goddard 9864403bc9 A thread in the runtime but with the DONE status is not active
return false from isActiveThread if thread's status is done even when
its contained in the runtime threads list. As it is done, the thread
will not be run until either its replaced by a new copy of the thread
or the thread is removed from the list and another is added at a later
time.
2017-11-16 11:23:51 -05:00
kchadha 9df3b8ad86 Merge pull request #780 from mzgoddard/runtime-profiler
Runtime profiler
2017-11-16 10:02:37 -05:00
DD 0958db2618 Move data to blocks files 2017-11-15 17:53:43 -05:00
Paul Kaplan 1e27d21b15 Merge pull request #782 from kchadha/list-typed-variable
List typed variable
2017-11-15 12:48:56 -05:00
DD c8d5ba1d5e Delete block does nothing if the block doesnt exist 2017-11-15 11:56:49 -05:00
DD aa0064948a Delete monitor block when variable is deleted 2017-11-15 11:37:27 -05:00
Karishma Chadha fe86e38210 Addressing PR review comments. 2017-11-15 09:17:20 -05:00
DD 757dccd565 Move is sprite specific verification into VM in a temporary way. Remove monitors when their sprites are deleted. 2017-11-14 18:25:54 -05:00
Michael "Z" Goddard f73dae828e Add enableProfiling and disableProfiling to Runtime 2017-11-14 14:57:32 -05:00
Michael "Z" Goddard 516d4f6f30 Add Profiler events to Runtime, Sequencer and execute 2017-11-14 14:57:32 -05:00
Michael "Z" Goddard a5b55a5128 Add runtime Profiler
Profile internal virtual machine performance down to which blocks take
how long.
2017-11-14 14:57:31 -05:00
DD 9048a9b9e7 Pipe through whether a monitor is sprite-specific 2017-11-14 12:20:24 -05:00
Karishma Chadha 386045f033 Some code cleanup. 2017-11-13 16:55:57 -05:00
Karishma Chadha 26d4a3a069 Refactoring representation of variable type. 2017-11-13 16:29:38 -05:00