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
2 changes: 1 addition & 1 deletion docs/javascripts/goboscript.tmGrammar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ patterns:
- name: support.function.builtin
match: "\\b(move|turn_left|turn_right|goto_random_position|goto_mouse_pointer|goto|glide|glide_to_random_position|glide_to_mouse_pointer|point_in_direction|point_towards_mouse_pointer|point_towards_random_direction|point_towards|change_x|set_x|change_y|set_y|if_on_edge_bounce|set_rotation_style_left_right|set_rotation_style_do_not_rotate|set_rotation_style_all_around|say|think|switch_costume|next_costume|switch_backdrop|previous_backdrop|random_backdrop|next_backdrop|set_size|change_size|change_color_effect|change_fisheye_effect|change_whirl_effect|change_pixelate_effect|change_mosaic_effect|change_brightness_effect|change_ghost_effect|set_color_effect|set_fisheye_effect|set_whirl_effect|set_pixelate_effect|set_mosaic_effect|set_brightness_effect|set_ghost_effect|clear_graphic_effects|show|hide|goto_front|goto_back|go_forward|go_backward|play_sound_until_done|start_sound|stop_all_sounds|change_pitch_effect|change_pan_effect|set_pitch_effect|set_pan_effect|change_volume|set_volume|clear_sound_effects|broadcast|broadcast_and_wait|wait|stop_all|stop_this_script|stop_other_scripts|delete_this_clone|clone|ask|set_drag_mode_draggable|set_drag_mode_not_draggable|reset_timer|erase_all|stamp|pen_down|pen_up|set_pen_color|change_pen_size|set_pen_size|set_pen_hue|set_pen_saturation|set_pen_brightness|set_pen_transparency|change_pen_hue|change_pen_saturation|change_pen_brightness|change_pen_transparency|rest|set_tempo|change_tempo)\\b"
- name: entity.name.type
match: "\\b(x_position|y_position|direction|size|costume_number|costume_name|backdrop_number|backdrop_name|volume|distance_to_mouse_pointer|distance_to|touching_mouse_pointer|touching_edge|touching|key_pressed|mouse_down|mouse_x|mouse_y|loudness|timer|current_year|current_month|current_date|current_day_of_week|current_hour|current_minute|current_second|days_since_2000|username|online|touching_color|color_is_touching_color|answer|random|contains)\\b"
match: "\\b(x_position|y_position|direction|size|costume_number|costume_name|backdrop_number|backdrop_name|volume|distance_to_mouse_pointer|distance_to|touching_mouse_pointer|touching_edge|touching|key_pressed|mouse_down|mouse_x|mouse_y|loudness|timer|current_year|current_month|current_date|current_day_of_week|current_hour|current_minute|current_second|days_since_2000|username|online|touching_color|color_is_touching_color|answer|random|contains|tempo)\\b"
- name: punctuation
match: ",|;"
- name: keyword.operator
Expand Down
11 changes: 11 additions & 0 deletions docs/language/reporters/music.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Music Reporters

### tempo

```goboscript
current_tempo = tempo();
```

```scratchblocks
(tempo)
```
2 changes: 1 addition & 1 deletion editors/code/syntaxes/goboscript.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@
},
{
"name": "support.function.builtin.goboscript",
"match": "\\b(x_position|y_position|direction|size|costume_number|costume_name|backdrop_number|backdrop_name|volume|distance_to_mouse_pointer|distance_to|touching_mouse_pointer|touching_edge|touching|key_pressed|mouse_down|mouse_x|mouse_y|loudness|timer|current_year|current_month|current_date|current_day_of_week|current_hour|current_minute|current_second|days_since_2000|username|online|touching_color|color_is_touching_color|answer|random|contains)\\b"
"match": "\\b(x_position|y_position|direction|size|costume_number|costume_name|backdrop_number|backdrop_name|volume|distance_to_mouse_pointer|distance_to|touching_mouse_pointer|touching_edge|touching|key_pressed|mouse_down|mouse_x|mouse_y|loudness|timer|current_year|current_month|current_date|current_day_of_week|current_hour|current_minute|current_second|days_since_2000|username|online|touching_color|color_is_touching_color|answer|random|contains|tempo)\\b"
},
{
"name": "support.function.goboscript",
Expand Down
2 changes: 1 addition & 1 deletion editors/notepad++/goboscript.udl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<Keywords name="Keywords5">on onflag onkey onclick onbackdrop onloudness ontimer onclone on</Keywords>
<Keywords name="Keywords6">show hide add to delete insert at of as and or</Keywords>
<Keywords name="Keywords7">move turn_left turn_right goto_random_position goto_mouse_pointer goto glide glide_to_random_position glide_to_mouse_pointer point_in_direction point_towards_mouse_pointer point_towards_random_direction point_towards change_x set_x change_y set_y if_on_edge_bounce set_rotation_style_left_right set_rotation_style_do_not_rotate set_rotation_style_all_around say think switch_costume next_costume switch_backdrop next_backdrop set_size change_size change_color_effect change_fisheye_effect change_whirl_effect change_pixelate_effect change_mosaic_effect change_brightness_effect change_ghost_effect set_color_effect set_fisheye_effect set_whirl_effect set_pixelate_effect set_mosaic_effect set_brightness_effect set_ghost_effect clear_graphic_effects show hide goto_front goto_back go_forward go_backward play_sound_until_done start_sound stop_all_sounds change_pitch_effect change_pan_effect set_pitch_effect set_pan_effect change_volume set_volume clear_sound_effects broadcast broadcast_and_wait wait stop_all stop_this_script stop_other_scripts delete_this_clone clone ask set_drag_mode_draggable set_drag_mode_not_draggable reset_timer erase_all stamp pen_down pen_up set_pen_color change_pen_size set_pen_size set_pen_hue set_pen_saturation set_pen_brightness set_pen_transparency change_pen_hue change_pen_saturation change_pen_brightness change_pen_transparency rest set_tempo change_tempo</Keywords>
<Keywords name="Keywords8">x_position y_position direction size costume_number costume_name backdrop_number backdrop_name volume distance_to_mouse_pointer distance_to touching_mouse_pointer touching_edge touching key_pressed mouse_down mouse_x mouse_y loudness timer current_year current_month current_date current_day_of_week current_hour current_minute current_second days_since_2000 username online touching_color color_is_touching_color answer random contains</Keywords>
<Keywords name="Keywords8">x_position y_position direction size costume_number costume_name backdrop_number backdrop_name volume distance_to_mouse_pointer distance_to touching_mouse_pointer touching_edge touching key_pressed mouse_down mouse_x mouse_y loudness timer current_year current_month current_date current_day_of_week current_hour current_minute current_second days_since_2000 username online touching_color color_is_touching_color answer random contains tempo</Keywords>
<Keywords name="Delimiters">00&quot; 01\&quot; 02&quot; 03 04 05 06``` 07 08``` 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23</Keywords>
</KeywordLists>
<Styles>
Expand Down
2 changes: 2 additions & 0 deletions gdsl.txt
Original file line number Diff line number Diff line change
Expand Up @@ -200,3 +200,5 @@ answer answer |
[operator]=======================================================|====================|=
random random FROM,TO | |
contains contains STRING1,STRING2| |
[music]==========================================================|====================|=
tempo getTempo | |
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ nav:
- Looks: language/reporters/looks.md
- Sound: language/reporters/sound.md
- Sensing: language/reporters/sensing.md
- Music: language/reporters/music.md
- Custom Blocks: language/custom-blocks.md
- Functions: language/functions.md
- Enums: language/enums.md
Expand Down
7 changes: 7 additions & 0 deletions src/blocks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1134,6 +1134,7 @@ pub enum Repr {
Answer,
Random,
Contains,
Tempo,
}

impl Repr {
Expand Down Expand Up @@ -1220,6 +1221,7 @@ impl Repr {
("answer", _) => Some(Self::Answer),
("random", _) => Some(Self::Random),
("contains", _) => Some(Self::Contains),
("tempo", _) => Some(Self::Tempo),
_ => None,
}
}
Expand Down Expand Up @@ -1261,6 +1263,7 @@ impl Repr {
Self::Answer => "answer",
Self::Random => "random",
Self::Contains => "contains",
Self::Tempo => "tempo",
}
}

Expand Down Expand Up @@ -1301,6 +1304,7 @@ impl Repr {
"answer",
"random",
"contains",
"tempo",
]
}

Expand Down Expand Up @@ -1341,6 +1345,7 @@ impl Repr {
Self::Answer => "sensing_answer",
Self::Random => "operator_random",
Self::Contains => "operator_contains",
Self::Tempo => "music_getTempo",
}
}

Expand Down Expand Up @@ -1381,6 +1386,7 @@ impl Repr {
Self::Answer => &[],
Self::Random => &["FROM", "TO"],
Self::Contains => &["STRING1", "STRING2"],
Self::Tempo => &[],
}
}

Expand Down Expand Up @@ -1421,6 +1427,7 @@ impl Repr {
Self::Answer => None,
Self::Random => None,
Self::Contains => None,
Self::Tempo => None,
}
}
}
Loading