Commit graph

112 commits

Author SHA1 Message Date
Connor Hudson
99dc46ba80 Add x, y to changeBlock function again after change to merge logic 2018-06-07 11:27:10 -04:00
Connor Hudson
13bf932fbb Remove unnecessary arguments to requestAddMonitor 2018-06-07 10:11:15 -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
DD
8355dd662f Switch to sending end drag event to be handled by gui 2018-02-23 11:57:19 -05:00
DD
2545d1955d Repopulate blocks with ids 2018-02-20 16:09:08 -05:00
DD
fe4b3d3c01 Pass through block drag event 2018-02-20 16:09:08 -05:00
Karishma Chadha
f5813b1845 Update sprite names, plus some code cleanup. 2018-02-05 16:54:58 -05:00
Karishma Chadha
7faeed7128 Update blocks after sound/costume rename. 2018-02-05 14:35:52 -05:00
kchadha
107adad647
Revert "Push reported" 2018-02-02 12:42:09 -05:00
kchadha
490248f652
Merge pull request #914 from kchadha/bugfix-909
Keep block xml up-to-date after renaming a variable.
2018-01-29 09:30:10 -05:00
Karishma Chadha
0b2eaa9e19 Moving block updating code into blocks instead of runtime. 2018-01-26 16:58:45 -05:00
Michael "Z" Goddard
10acf3c4f5
Add BlocksExecuteCache
Add a Blocks cache available only to execute. This cache lets execute
get a blocks inputs, fields, opcode, and mutation in one request and an
object execute can further modify to store derivative values it use
this and every later execute iteration to perform its duties quicker.
2018-01-24 17:00:42 -05:00
Karishma Chadha
784341909b Update block xml for all blocks that use a variable that was just renamed. 2018-01-22 15:14:43 -05:00
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
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
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
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
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
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
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
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
DD
9048a9b9e7 Pipe through whether a monitor is sprite-specific 2017-11-14 12:20:24 -05:00
Karishma Chadha
038a65b460 Finishing up lists. 2017-11-13 14:24:30 -05:00
Karishma Chadha
70959cc7f5 First cut at turning lists into typed variables 2017-11-09 17:19:34 -05:00
Michael "Z" Goddard
888da915a5
Replace duplicate documentation on getProcedureParamNames
Replace the duplicate getProcedureDefintion documentation block above
getProcedureParamNames.
2017-11-06 17:28:34 -05:00
Paul Kaplan
d126f799d8 Prevent imported local variables from being duplicated on the stage. 2017-10-25 11:17:29 -04:00
Paul Kaplan
e8c5bbbf80 Fix tests and make chain more resilient 2017-10-10 12:19:27 -04:00