mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-07-26 22:20:41 -04:00
Merge pull request #829 from kchadha/broadcast-message-typed-variable
Broadcast message functionality
This commit is contained in:
commit
a9e95f3b01
10 changed files with 164 additions and 39 deletions
src/engine
|
@ -175,8 +175,12 @@ const execute = function (sequencer, thread) {
|
|||
// Add all fields on this block to the argValues.
|
||||
for (const fieldName in fields) {
|
||||
if (!fields.hasOwnProperty(fieldName)) continue;
|
||||
if (fieldName === 'VARIABLE' || fieldName === 'LIST') {
|
||||
argValues[fieldName] = fields[fieldName].id;
|
||||
if (fieldName === 'VARIABLE' || fieldName === 'LIST' ||
|
||||
fieldName === 'BROADCAST_OPTION') {
|
||||
argValues[fieldName] = {
|
||||
id: fields[fieldName].id,
|
||||
name: fields[fieldName].value
|
||||
};
|
||||
} else {
|
||||
argValues[fieldName] = fields[fieldName].value;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue