Karishma Chadha
e5723e299a
Add runtime to blocks container since it was getting passed in everywhere where it was being referenced. Update calls to blocks constructor.
2019-01-23 18:18:38 -05:00
Katie Broida
8256b3d5c5
Add early exit for non-existent block
2019-01-15 11:15:23 -05:00
Paul Kaplan
e0b314d3fb
Fix an issue where the targetId of a monitor could be reassigned
...
This caused a local variable monitor to try running its thread on a different sprite, causing a new local variable to be created with the same monitor id.
2018-12-05 15:02:27 -05:00
picklesrus
90b627982c
fix todo
2018-11-28 12:34:49 -05:00
picklesrus
eefe021425
add todo and remove a newline
2018-11-28 12:33:04 -05:00
picklesrus
f214d3a191
VM changes for the sensing_of block. This handles lists properly (by ignoring them like Scratch2 and makes the attribute menu update based on what was chosen in the target menu.
2018-11-28 10:35:35 -05:00
Ray Schamp
5022227c15
Add "project changed" event
...
And emit it whenever we think the project has changed. Try to not emit it when a change has happened internally that shouldn't affect the serialized project.
This iteration fires the event too frequently, e.g., when switching sprites. This is meant as a simple initial implementation that can be improved.
2018-11-26 17:10:43 -05:00
Karishma Chadha
0c9da5d963
Merge pull request #1755 from kchadha/cloud-var-create
...
Create cloud variables
2018-11-14 21:39:29 -05:00
Paul Kaplan
8aa88fa2a2
Merge pull request #1723 from mzgoddard/blocks-monitored-cache
...
Cache the set of actively monitored blocks
2018-11-14 14:16:36 -05:00
Karishma Chadha
3fc1b89b30
Add ability to create cloud variables, and have cloud provider wait for confirmation from server.
2018-11-13 16:43:51 -05:00
Karishma Chadha
7ea310a194
Fix typo in comment
2018-11-08 14:43:07 -05:00
Karishma Chadha
5db3db3a92
monitor id getter should use block fields instead of a list of strings
2018-11-08 01:33:26 -05:00
Karishma Chadha
0e7eae98d5
Separate out monitors for blocks reporter blocks that have parameters.
2018-11-08 00:37:28 -05:00
Michael "Z" Goddard
a3f9aa1e22
cache the set of actively monitored blocks
...
Projects can have 100's of potentially monitored blocks. Caching the
set of monitored blocks can save time in Runtime._step every frame.
2018-11-02 15:24:05 -04:00
Paul Kaplan
596d0c4f5f
Include the origin blockId of the top block being dragged.
...
This is required by the GUI in order to take a snapshot of the blocks for the backpack. Only the ID is needed, the rest can be done by the GUI.
2018-11-01 14:13:07 -04:00
Michael "Z" Goddard
2b257dde57
add getProcedureParamNamesIdsAndDefaults
...
Use getProcedureParamNamesIdsAndDefaults to get the defaults along with
names and ids so defaults may be set for a procedure call if the
parameter is not provided.
2018-10-16 16:31:45 -04:00
Karishma Chadha
62bf790d8f
Fix stack glows so that stacks glow as soon as the first block in the stack starts running as opposed to after the first block has finished. Make sure that monitored reporters in the flyout are not glowing.
2018-08-22 14:44:06 -04:00
Karishma Chadha
ee9a99b928
Fix variable deletion bug.
2018-07-15 19:00:55 -04:00
Karishma Chadha
a8fc399746
Fix var rename bug where variable would go back to old name after switching sprites.
2018-07-15 18:58:56 -04:00
Karishma Chadha
406e59fc18
Fix variable conflicts that arise when sharing the love of a sprite-local variable with the stage.
2018-07-13 09:36:43 -04:00
kchadha
6c118cf8e0
Merge pull request #1301 from kchadha/variable-scope
...
Variable scope
2018-07-06 14:39:56 -04:00
Karishma Chadha
ed608ffe6f
Refactor to fix issue with global var not checking for name conflicts on all sprites.
2018-07-03 23:20:49 -04:00
Ray Schamp
4525139d59
Merge pull request #1212 from mzgoddard/unwrapped
...
execute optimization by unwrapping recursion
2018-07-02 11:20:01 -04:00
Karishma Chadha
92dfebdae6
Add variables from var_create events to appropriate target based on isLocal flag.
2018-06-27 16:32:10 -04:00
Karishma Chadha
9646e3d11e
Refactor and move variable reference fixup function into target.
2018-06-19 15:31:08 -04:00
Karishma Chadha
f2aacbc79c
Fix up variable references after deserializing a .sprite2 or .sprite3 to avoid conflicts with pre-existing variables.
2018-06-19 14:02:54 -04:00
Karishma Chadha
5086eced15
Position for block comments imported from 2.0 should be updated when receiving a create event from scratch-blocks.
2018-06-12 17:10:16 -04:00
Michael "Z" Goddard
728769ea24
do not enumerate Blocks._cache
...
Do not stringify or enumerate Blocks._cache items.
2018-06-12 14:21:40 -04:00
Michael "Z" Goddard
e0ec1ad08f
add id to block execute cache data
2018-06-12 10:05:54 -04:00
Connor Hudson
244ffb38c4
Merge pull request #1218 from technoboy10/bugfix/gh-1165-monitor-import
...
Fix importing hidden monitors from Scratch 2 projects
2018-06-11 10:27:45 -04:00
Connor Hudson
78da15c09c
Remove blocks.mode reference
2018-06-08 17:04:52 -04:00
Connor Hudson
a6629628cd
Use monitor show/hide monitor functions, remove incorrect block property references
2018-06-08 16:00:12 -04:00
Connor Hudson
99dc46ba80
Add x, y to changeBlock function again after change to merge logic
2018-06-07 11:27:10 -04:00
Karishma Chadha
6bc04c4bef
Let comment change event handler multitask.
2018-06-07 11:04:03 -04:00
Karishma Chadha
7b55d8e7ab
Undo change that moves block comment relative to block move.
2018-06-07 10:18:34 -04:00
Connor Hudson
13bf932fbb
Remove unnecessary arguments to requestAddMonitor
2018-06-07 10:11:15 -04:00
Karishma Chadha
d99a082952
CommentChange events now store text changes in an object with property text, instead of just a string.
2018-06-07 10:09:38 -04:00
Connor Hudson
0d0543810f
Properly capture all variable monitor values on add
2018-06-06 16:00:59 -04:00
Karishma Chadha
644fab0135
Track block comment movement when block moves.
2018-06-05 15:40:19 -04:00
Karishma Chadha
d58bb8bcfb
Clean up optRuntime checks in blocklyListen
2018-06-05 15:13:03 -04:00
Karishma Chadha
2171cb69d0
No need to floor workspace coordinates in vm runtime.
2018-06-05 15:12:25 -04:00
Karishma Chadha
522706ccf8
Persist comment state.
2018-06-01 18:10:25 -04:00
Karishma Chadha
1639444a4d
Fix lint and tests.
2018-05-30 21:18:45 -04:00
Karishma Chadha
1401d54add
Parse SB2 comments and attach block comments to the blocks they belong to. Send comment xml on workspace update so they can be rendered.
2018-05-30 21:15:14 -04:00
Paul Kaplan
f3404f4275
Merge pull request #1128 from paulkaplan/sb2-monitors
...
Import monitors from sb2 files.
2018-05-09 13:52:29 -04:00
Paul Kaplan
4713f47fb7
Import monitors from sb2 files.
...
Paired with @kchadha on all of this.
2018-05-08 17:06:19 -04:00
Michael "Z" Goddard
2db2287d12
BlockCached instances are always initialized
2018-05-07 15:32:30 -04:00
Michael "Z" Goddard
9b82530f51
Use a constructor to create the execute cache objects
2018-05-07 15:32:30 -04:00
Michael "Z" Goddard
d04d6b2c6a
Revert "Revert "Push reported""
...
This reverts commit 107adad647
.
2018-04-16 13:21:53 -04:00
Paul Kaplan
140094a7ad
Make "when clicked" blocks target dependent.
...
This involves adding a new opcode, event_whenstageclicked, and adding a
method to the blocks container to update the opcode pair depending on
whether the target is the stage. This method is then called in two
places: first after the sb2 import parses the blocks (not done in the
sb2 parsing itself because no other blocks are target specific) and then
again when blocks are shared between targets.
Also added tests for the block container method, and a fixture project
that tests the opcode splitting on sb2 import.
2018-03-20 10:41:50 -04:00