Commit graph

437 commits

Author SHA1 Message Date
Karishma Chadha
59a865ef47 Create a new addTarget function on the runtime which populates the targets list as well as the executable targets list. 2019-01-14 11:48:11 -05:00
Karishma Chadha
fbee37e915 Populate executable targets when runtime.targets is populated so that scripts don't run before they are supposed to (e.g. before targets are done getting installed). 2019-01-11 14:52:34 -05:00
Florrie
fbb6d63e03 Clamp ghost effect
Cherry-picked from 35c8890425 (#1887)
2018-12-28 10:39:42 -04:00
Karishma Chadha
6c1031c534
Use '' instead of null
Co-Authored-By: apple502j <33279053+apple502j@users.noreply.github.com>
2018-12-14 17:35:07 +09:00
apple502j
73968895d8 Display the next ask 2018-12-11 18:39:09 +09:00
apple502j
aea7000917 Clear ask bubble when stopForTarget 2018-12-09 13:14:42 +09:00
Katie Broida
967cab8f20
Make the wait block's logic and behavior more consistent with Scratch 2 (#1759) 2018-12-04 10:35:42 -05:00
picklesrus
4a542b455d fix code review comments 2018-11-28 10:36:22 -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
Katie Broida
bb82c46f8a
Handle coordinate precision the same as Scratch 2 (#1722) 2018-11-15 15:50:56 -05:00
jokebookservice1
306996e54c
feat: Implement "point towards random direction"
We subtract 180 even though the value will be clamped, for clarity. We round so that
using the "direction" getter will yield a sensible result. Note that this
implements 'point towards random direction', not 'point towards random
position' -- they have slightly different behaviours.
2018-11-11 01:51:37 +00: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
Eric Rosenbaum
3bd0797810
Make volume a sprite-specific monitor (#1730) 2018-11-06 10:52:40 -05:00
Karishma Chadha
fd5e178d3b
Merge pull request #1703 from kchadha/cloud-io
Cloud IO
2018-10-30 11:57:20 -04:00
Karishma Chadha
be238d35d2
Merge pull request #1517 from joker314/costume-compatibility
Make "switch costume" and "switch backdrop" blocks compatible with 2.0
2018-10-29 11:39:41 -04:00
Karishma Chadha
aa200e6df3 Set the cloud provider and request updates to the cloud var when updating the variable through blocks. 2018-10-29 00:59:06 -04:00
Michael "Z" Goddard
fcafcbdd0a
return 0 from parameters outside of their procedure 2018-10-23 15:14:31 -04:00
Michael "Z" Goddard
ef4045aaf1
Merge pull request #1642 from mzgoddard/set-procedure-param-defaults
Set procedure param defaults
2018-10-23 15:13:16 -04:00
Michael "Z" Goddard
5e5655c916
Merge pull request #1632 from mzgoddard/stop-other-sounds
Stop other sounds
2018-10-23 15:11:08 -04:00
jokebookservice1
9c128db723
docs: Provide more/clearer comments
We ensure that all code whose purpose may be confusing to grasp is
commented; and we remove information that is no longer required.
2018-10-17 18:32:01 +01: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
Michael "Z" Goddard
e854d8d563
stop only waiting sounds when STOP_FOR_TARGET is emitted 2018-10-16 16:15:01 -04:00
Andrew Sliwinski
23f6346045
Merge pull request #1631 from mzgoddard/stop-other-asks
Stop other asks
2018-10-15 13:16:49 -04:00
jokebookservice1
341bd8f3d3
feat: Allow switching to specially named backdrops
The `switch costume` block accepts special values like "next costume" and
"previous costume". If you create a costume with these names, these take
priority over the special values. However, the `switch backdrop` block
keeps these special values for values like "next backdrop", "previous
backdrop", "random backdrop". It is impossible to navigate to such a
backdrop by name via block. This commit also modifies tests to allow for
this.

BREAKING CHANGE: specially-named backdrops can now be navigated
2018-10-10 20:06:54 +01:00
jokebookservice1
0c18b4952d
refactor: use better whitespace-test for backdrops too 2018-10-10 19:45:36 +01:00
jokebookservice1
df78a8345e
refactor: use utility for whitespace-testing 2018-10-10 18:36:06 +01:00
Michael "Z" Goddard
65ee6b7cac
broadcast and wait must wait for threads to be removed from runtime 2018-10-05 14:54:02 -04:00
Michael "Z" Goddard
da268ea0c1
control sound stopping in scratch3_sound.js
- Stop sound playback for target when STOP_FOR_TARGET is emitted
- Stop all sounds when PROJECT_STOP_ALL is emitted
- RenderedTarget should not manage sound stopping in `stopAll`
2018-10-03 10:38:47 -04:00
Michael "Z" Goddard
574749bbba
add STOP_FOR_TARGET runtime event and respond for ask blocks
Remove questions for targets that are individually stopping and
progress the asked question if it is from a stopping target.
2018-10-03 10:38:14 -04:00
apple502j
7b6ba8cb9a
Bubble string length limit 2018-09-14 20:56:40 +09:00
jokebookservice1
3ef61e2248
Make SWITCH COSTUME and SWITCH BACKDROP compatible with 2.0 2018-08-22 20:39:15 +03:00
Karishma Chadha
d1761466fc
Merge pull request #1427 from paulkaplan/fix-bubble-positioning
Remove heuristic for bubble positioning that was not accurate.
2018-08-22 10:39:50 -04:00
Florrie
5af79a086b Use round() instead of floor() in repeat, add unit test 2018-08-14 20:27:18 -03:00
Paul Kaplan
ae3605b00c Remove heuristic for bubble positioning that was not accurate.
"guessing" the bubble positioning before rendering is no longer needed because the positioning logic has changed, bubbles that don't fit during the positioning stage get flipped.
2018-08-06 16:00:20 -04:00
Paul Kaplan
6d4c6df692 Add UserData ioDevice for setting and getting username from blocks 2018-07-23 09:38:58 -04:00
Andrew Sliwinski
f7aafe4d9c Add opcode implementation for data_deletealloflist 2018-07-11 13:14:01 -04:00
Paul Kaplan
2c7de6380e Add implementation for "When loudness >" block 2018-07-05 09:42:00 -04:00
Paul Kaplan
63e96634bf Use bounds of the renderer instead of stage target for positioning.
Fixes the regression where bubbles almost always point left instead of right.
2018-06-28 16:45:07 -04:00
Paul Kaplan
a6a29a5437 Fix hidden bubbles not resetting on stop 2018-06-28 16:44:33 -04:00
Ray Schamp
9afe401dca Revert "Revert #1260, #1258, #1239"
This reverts commit 28f90648b0.
2018-06-22 09:33:08 -04:00
Ray Schamp
28f90648b0 Revert #1260, #1258, #1239
This reverts commits
c268bbae47
61dacfc915
30b8cb8eb1
2018-06-22 09:30:17 -04:00
Corey Frang
c087cf326a soundbank tests 2018-06-21 17:00:03 -04:00
Ray Schamp
f5234c777a
Merge pull request #1211 from mzgoddard/broadcast-and-wait-promise
yield a tick if broadcastandwait is waiting on threads waiting for a future tick
2018-06-13 15:58:37 -04:00
Michael "Z" Goddard
d161251a9b
yield a thread loop or tick in event_broadcastandwait
- yield a thread loop or tick in looks_switchbackdroptoandwait

If all threads broadcastAndWait is watching are "waiting" for a future
frame, yield until the next tick so event_broadcastandwait also defers
to a future frame.
2018-06-12 10:02:28 -04:00
Paul Kaplan
418c3837c6
Merge pull request #1209 from technoboy10/bugfix/gh-1135-bubble-edge
Check that bubble bounds do not extend past stage boundaries
2018-06-11 12:14:53 -04:00
Eric Rosenbaum
db7c56e08b Change function name and comment for clarity 2018-06-07 14:12:23 -04:00
Eric Rosenbaum
1a72512a62 Moving touchingObject into rendered target 2018-06-06 16:34:58 -04:00
Eric Rosenbaum
431d4bd66b Add when touching hat 2018-06-06 13:39:23 -04:00
Michael "Z" Goddard
84705fc463
replace new Promise(r => r()) with Promise.resolve
Promise.resolve is a Promise convenience method that creates a promise
resolved to a given argument like creating a promise with a function
that immediately calls the resolve function with the given value.
2018-06-06 09:53:45 -04:00