Skip to content

Commit 407f9a3

Browse files
authored
Merge pull request #3412 from scratchfoundation/is-online
is online?
2 parents 17f9d8e + 00da004 commit 407f9a3

File tree

5 files changed

+99
-1
lines changed

5 files changed

+99
-1
lines changed

blocks_vertical/sensing.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,21 @@ Blockly.Blocks['sensing_dayssince2000'] = {
507507
}
508508
};
509509

510+
Blockly.Blocks['sensing_online'] = {
511+
/**
512+
* Block to report whether or not the system is online
513+
* @this Blockly.Block
514+
*/
515+
init: function() {
516+
this.jsonInit({
517+
"message0": Blockly.Msg.SENSING_ONLINE,
518+
"category": Blockly.Categories.sensing,
519+
"checkboxInFlyout": true,
520+
"extensions": ["colours_sensing", "output_boolean"]
521+
});
522+
}
523+
};
524+
510525
Blockly.Blocks['sensing_username'] = {
511526
/**
512527
* Block to report user's username

msg/js/en.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ Blockly.Msg["SENSING_CURRENT_HOUR"] = "hour";
219219
Blockly.Msg["SENSING_CURRENT_MINUTE"] = "minute";
220220
Blockly.Msg["SENSING_CURRENT_SECOND"] = "second";
221221
Blockly.Msg["SENSING_DAYSSINCE2000"] = "days since 2000";
222+
Blockly.Msg["SENSING_ONLINE"] = "is online?";
222223
Blockly.Msg["SENSING_USERNAME"] = "username";
223224
Blockly.Msg["SENSING_USERID"] = "user id";
224225
Blockly.Msg["SOUND_PLAY"] = "start sound %1";

msg/json/en.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@
213213
"SENSING_CURRENT_MINUTE": "minute",
214214
"SENSING_CURRENT_SECOND": "second",
215215
"SENSING_DAYSSINCE2000": "days since 2000",
216+
"SENSING_ONLINE": "is online?",
216217
"SENSING_USERNAME": "username",
217218
"SENSING_USERID": "user id",
218219
"SOUND_PLAY": "start sound %1",
@@ -282,4 +283,4 @@
282283
"NEW_BROADCAST_MESSAGE_TITLE": "New message name:",
283284
"BROADCAST_MODAL_TITLE": "New Message",
284285
"DEFAULT_BROADCAST_MESSAGE_NAME": "message1"
285-
}
286+
}

msg/messages.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,7 @@ Blockly.Msg.SENSING_CURRENT_HOUR = 'hour';
262262
Blockly.Msg.SENSING_CURRENT_MINUTE = 'minute';
263263
Blockly.Msg.SENSING_CURRENT_SECOND = 'second';
264264
Blockly.Msg.SENSING_DAYSSINCE2000 = 'days since 2000';
265+
Blockly.Msg.SENSING_ONLINE = 'is online?';
265266
Blockly.Msg.SENSING_USERNAME = 'username';
266267
Blockly.Msg.SENSING_USERID = 'user id';
267268

0 commit comments

Comments
 (0)