Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions blocks_vertical/sensing.js
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,21 @@ Blockly.Blocks['sensing_dayssince2000'] = {
}
};

Blockly.Blocks['sensing_online'] = {
/**
* Block to report whether or not the system is online
* @this Blockly.Block
*/
init: function() {
this.jsonInit({
"message0": Blockly.Msg.SENSING_ONLINE,
"category": Blockly.Categories.sensing,
"checkboxInFlyout": true,
"extensions": ["colours_sensing", "output_boolean"]
});
}
};

Blockly.Blocks['sensing_username'] = {
/**
* Block to report user's username
Expand Down
1 change: 1 addition & 0 deletions msg/js/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ Blockly.Msg["SENSING_CURRENT_HOUR"] = "hour";
Blockly.Msg["SENSING_CURRENT_MINUTE"] = "minute";
Blockly.Msg["SENSING_CURRENT_SECOND"] = "second";
Blockly.Msg["SENSING_DAYSSINCE2000"] = "days since 2000";
Blockly.Msg["SENSING_ONLINE"] = "is online?";
Blockly.Msg["SENSING_USERNAME"] = "username";
Blockly.Msg["SENSING_USERID"] = "user id";
Blockly.Msg["SOUND_PLAY"] = "start sound %1";
Expand Down
3 changes: 2 additions & 1 deletion msg/json/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@
"SENSING_CURRENT_MINUTE": "minute",
"SENSING_CURRENT_SECOND": "second",
"SENSING_DAYSSINCE2000": "days since 2000",
"SENSING_ONLINE": "is online?",
"SENSING_USERNAME": "username",
"SENSING_USERID": "user id",
"SOUND_PLAY": "start sound %1",
Expand Down Expand Up @@ -282,4 +283,4 @@
"NEW_BROADCAST_MESSAGE_TITLE": "New message name:",
"BROADCAST_MODAL_TITLE": "New Message",
"DEFAULT_BROADCAST_MESSAGE_NAME": "message1"
}
}
1 change: 1 addition & 0 deletions msg/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ Blockly.Msg.SENSING_CURRENT_HOUR = 'hour';
Blockly.Msg.SENSING_CURRENT_MINUTE = 'minute';
Blockly.Msg.SENSING_CURRENT_SECOND = 'second';
Blockly.Msg.SENSING_DAYSSINCE2000 = 'days since 2000';
Blockly.Msg.SENSING_ONLINE = 'is online?';
Blockly.Msg.SENSING_USERNAME = 'username';
Blockly.Msg.SENSING_USERID = 'user id';

Expand Down
Loading