Chris Willis-Ford
18b1551cdb
remove redundant check
...
Co-Authored-By: Karishma Chadha <kchadha@media.mit.edu>
2019-06-17 13:22:52 -07:00
Christopher Willis-Ford
33a6071466
for compatibility, make all existing extension menus accept reporters
2019-06-14 12:29:32 -07:00
Christopher Willis-Ford
cfee656306
fix tests: empty menus
shouldn't be an array
2019-06-14 12:29:32 -07:00
Christopher Willis-Ford
3fbed88a95
switch from rejectReporters
flag to acceptReporters
...
Also add more extensive documentation around extension menu definitions,
including some considerations to think about before making a menu accept
reporters.
2019-06-14 12:29:32 -07:00
Christopher Willis-Ford
e7bf49c8df
support non-droppable menus in extensions
2019-06-14 12:29:32 -07:00
Christopher Willis-Ford
ab715901a6
add tests for new e16n support features
2019-06-12 13:01:28 -07:00
Karishma Chadha
de8ef1224a
Merge pull request #2141 from kchadha/toolbox-update
...
Add a runtime event for requesting a toolbox update
2019-04-25 11:36:52 -04:00
Karishma Chadha
39f15d3699
Update comment for new extension update event
2019-04-25 11:36:31 -04:00
Karishma Chadha
92a73fef55
Add a runtime event to track when the toolbox extension blocks need updating.
2019-04-24 11:28:02 -04:00
Christopher Willis-Ford
91f0d59be0
fix extension block color application
2019-04-23 12:31:31 -07:00
Karishma Chadha
297047a6b9
Fix serialization of blockInfo mutation property to XML
2019-04-23 11:44:45 -04:00
Christopher Willis-Ford
a27ea76d25
add "scratch_extension" only if a block has an icon
2019-04-22 17:47:31 -07:00
Christopher Willis-Ford
107e49245f
adjust getBlocksXML to return categories separately
...
before: getBlocksXML returns one big XML string
after: getBlocksXML returns an array of {id,xml}, one entry per category
2019-04-22 12:32:52 -07:00
Christopher Willis-Ford
0247447792
embed extension blockInfo into block XML
2019-04-22 09:53:05 -07:00
Christopher Willis-Ford
bd1aaecdf3
add category info to extension add & update events
2019-04-19 16:06:11 -07:00
Christopher Willis-Ford
833d33355c
retrieve blockInfo from args when isDynamic is set
2019-04-19 16:06:11 -07:00
Christopher Willis-Ford
3b395a10d1
add test for extension methods receiving blockInfo
2019-04-19 14:35:35 -07:00
Christopher Willis-Ford
638062e982
pass blockInfo
to extension methods
...
Sometimes a single extension method needs to service several different
instances of the same opcode. This can happen with variables or custom
procedures, for example. This change allows the extension method to
inspect the `blockInfo` for instance data, including arbitrary
extension-specific properties if necessary.
2019-04-19 14:35:35 -07:00
Chris Willis-Ford
9135780c55
Merge pull request #2123 from cwillisf/extensions-xml-escape
...
use xmlEscape instead of escape-html for extensions
2019-04-18 14:38:41 -07:00
Chris Willis-Ford
26cf90228a
Merge pull request #2098 from cwillisf/extension-docs
...
Extension docs
2019-04-18 09:21:49 -07:00
Eric Rosenbaum
2b32b265a1
Merge pull request #2071 from ericrosenbaum/bugfix/stub-timer-for-test
...
Stub timer to fix flaky test
2019-04-18 11:29:36 -04:00
Christopher Willis-Ford
a308b1e02f
use xmlEscape instead of escape-html for extensions
2019-04-17 16:48:58 -07:00
Karishma Chadha
cc75154f9a
Merge pull request #2122 from LLK/revert-1930-runtime-script-cache
...
Revert "Cache hat block information for the runtime"
2019-04-17 16:06:49 -04:00
Karishma Chadha
23136ad9c3
Revert "Cache hat block information for the runtime"
2019-04-17 16:05:24 -04:00
Karishma Chadha
a984d1ae9d
Merge pull request #1930 from mzgoddard/runtime-script-cache
...
Cache hat block information for the runtime
2019-04-17 15:55:47 -04:00
Christopher Willis-Ford
519a37bb00
add require
lines for arg/block types in getInfo
intro snippet
2019-04-16 14:13:49 -07:00
Eric Rosenbaum
ddd5bb2d7b
Merge pull request #2119 from ericrosenbaum/bugfix/boost-color-sensing-fixes
...
BOOST color sensing fixes
2019-04-16 15:44:13 -04:00
Eric Rosenbaum
8dc4832100
Reorganize color ids and indices
2019-04-16 15:24:39 -04:00
Katie Broida
eedc0b16e0
Merge pull request #2041 from ktbee/use-empty-bitmap-size
...
Set height and width to zero for the canvas and costume size if bitmap's sourceHeight or sourceWidth are zero
2019-04-16 14:50:42 -04:00
Kevin Nørby Andersen
1c8dfea382
Merge pull request #2115 from knandersen/bugfix/2108
...
Fix #2108 by making setMotorPower() and setMotorDirection() yield for a tick
2019-04-15 18:41:28 -04:00
Kevin Nørby Andersen
8504d077c5
Merge pull request #2111 from knandersen/bugfix/2103
...
Fix #2103 and #2110 by clearly defining motor state and how it's modified
2019-04-15 18:41:03 -04:00
Eric Rosenbaum
07768652f9
clean up whencolor is seeingcolor functions
2019-04-15 11:34:02 -04:00
Eric Rosenbaum
1381d2c4c0
Add boolean “seeing color brick?”
2019-04-15 09:59:03 -04:00
Eric Rosenbaum
bd5bc7947b
rename hat to “when color brick seen”
2019-04-15 09:58:44 -04:00
Eric Rosenbaum
0cadf685b2
Remove color reporter
2019-04-12 17:14:34 -04:00
Eric Rosenbaum
d77944beff
Clean up detection of color any
2019-04-12 17:09:10 -04:00
Eric Rosenbaum
c25b84d510
Clean up color sensing using IDs
2019-04-12 16:56:09 -04:00
Kevin Andersen
6611abec9e
Makes setMotorPower() and setMotorDirection() yield for a tick
2019-04-12 14:12:43 -04:00
Kevin Andersen
12e969119a
Simplified the return value for when power is 0 in motorOnForRotation()
2019-04-12 14:07:26 -04:00
Kevin Andersen
a98f3af2e1
Added a special case in motorOnForRotation() to avoid hanging blocks if power is 0
2019-04-12 13:56:29 -04:00
Kevin Andersen
8ece9757aa
changes BoostMotor.status(value) to reset all motor state
2019-04-12 12:27:54 -04:00
Kevin Andersen
3f0816bac8
This commit addresses point 1 from the discussion with @ericrosenbaum around moving the setting of motor-state into the BoostMotor-class rather than having it in the opcodes.
...
- turnOn() renamed to _turnOn() and marked as a private function, i.e. it should only be called by BoostMotor-functions, not opcodes.
- New function turnOnForever() to be called by opcodes.
- turnOff() now sets the motor state.
- _clearRotationState now does a check for null rather than a truthy value
- all motor state setting removed from Boost-class and opcodes: stopAllMotors(), motorOnFor(), motorOnForRotation(), motorOn(), motorOff()
- turnOnForever(), turnOnFor() and turnOnForDegrees() now have a resetState-parameter with the default value of true. This allows the setMotorPower() and setMotorDirection()-functions to not reset state, to avoid them resolving the promises of the original motor commands that they are affecting.
2019-04-12 11:33:10 -04:00
Kevin Andersen
cd7319d044
Added state-change for Boost.stopAllMotors()
2019-04-11 14:07:07 -04:00
Kevin Andersen
c3908b5f2c
removed power wrongly being set in setMotorDirection()
2019-04-11 11:16:51 -04:00
Kevin Andersen
ba2aaf90dd
Corrected documentation for BoostMotor._clearRotationState()
2019-04-11 11:12:52 -04:00
Kevin Andersen
63726044e4
Major change of motor state handling to increase reliability, clear responsibility of handling state, and readability of the code.
...
BoostMotor now has a status getter/setter that replaces isOn() and is responsible for clearing various motor state parameters.
A new BoostMotorState-enum contains the possible states a motor can be in.
Since time-based motor commands really just trigger a BoostMotor.turnOn(), it's the opcodes that are responsible for setting the motor state.
2019-04-11 10:39:56 -04:00
Eric Rosenbaum
66ff92433e
Merge pull request #2107 from ericrosenbaum/bugfix/boost-when-color
...
Fix BOOST whenColor hat
2019-04-10 10:30:20 -04:00
picklesrus
d182659a57
Merge pull request #2065 from picklesrus/duplicate-sprites
...
Fix #4573 by using an existing utitlity that re-ids blocks when we du…
2019-04-10 09:05:53 -04:00
Karishma Chadha
51ad4185d1
Update src/sprites/sprite.js
...
Don't use object.values because it doesn't work in old Safaris.
Co-Authored-By: picklesrus <picklesrus@users.noreply.github.com>
2019-04-10 08:55:54 -04:00
Eric Rosenbaum
c0ea5be1d3
Fix whenColor hat
2019-04-09 17:36:14 -04:00