prthm11 commited on
Commit
b7609aa
·
verified ·
1 Parent(s): fa61cae

Update utils/block_relation_builder.py

Browse files
Files changed (1) hide show
  1. utils/block_relation_builder.py +4 -2
utils/block_relation_builder.py CHANGED
@@ -3147,8 +3147,10 @@ def _find_all_opcodes(code_block: str) -> list[str]:
3147
  (r"\(?username\)?", "sensing_username"), #(to test muliple bracket and alone should treet as the keyword)
3148
 
3149
  # --- Sound Blocks ---
3150
- (r"play sound \[.+? v\] until done", "sound_playuntildone"),
3151
- (r"start sound \[.+? v\]", "sound_play"),
 
 
3152
  (r"stop all sounds", "sound_stopallsounds"),
3153
  (r"change volume by\s*(?:\((.+?)\)|\[(.+?)\]|(.+))", "sound_changevolumeby"),
3154
  (r"""set\ volume\ to\s+\(?\s*(?:-?\d+(?:\.\d+)?|\[?[a-zA-Z_][\w\s]*\]?(?:\ v)?)\s*\)?\s*%?""", "sound_setvolumeto"),
 
3147
  (r"\(?username\)?", "sensing_username"), #(to test muliple bracket and alone should treet as the keyword)
3148
 
3149
  # --- Sound Blocks ---
3150
+ # (r"play sound \[.+? v\] until done", "sound_playuntildone"),
3151
+ # (r"start sound \[.+? v\]", "sound_play"),
3152
+ (r"play sound\s+(?:\[\s*.+?\s*v\]|\(?\s*.+?\s*\)?)\s+until done", "sound_playuntildone"),
3153
+ (r"start sound\s+(?:\[\s*.+?\s*v\]|\(?\s*.+?\s*\)?)", "sound_play"),
3154
  (r"stop all sounds", "sound_stopallsounds"),
3155
  (r"change volume by\s*(?:\((.+?)\)|\[(.+?)\]|(.+))", "sound_changevolumeby"),
3156
  (r"""set\ volume\ to\s+\(?\s*(?:-?\d+(?:\.\d+)?|\[?[a-zA-Z_][\w\s]*\]?(?:\ v)?)\s*\)?\s*%?""", "sound_setvolumeto"),