Skip to content

Commit fccd0ad

Browse files
committed
block_code/picker: Set Play sound block's db and pitch default value
https://phabricator.endlessm.com/T35501
1 parent b5b4309 commit fccd0ad

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

addons/block_code/ui/picker/categories/category_factory.gd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@ static func get_general_categories() -> Array[BlockCategory]:
244244
b.block_type = Types.BlockType.EXECUTE
245245
b.block_format = "Play the sound {name: STRING} with Volume dB {db: FLOAT} and Pitch Scale {pitch: FLOAT}"
246246
b.statement = "VAR_DICT[{name}].volume_db = {db}\nVAR_DICT[{name}].pitch_scale = {pitch}\nVAR_DICT[{name}].play()"
247+
b.defaults = {"db": "0.0", "pitch": "1.0"}
247248
sound_list.append(b)
248249

249250
var sound_category: BlockCategory = BlockCategory.new("Sound", sound_list, Color("e30fc0"))

0 commit comments

Comments
 (0)