Skip to content

Commit

Permalink
block: Use Dictionary.merged()
Browse files Browse the repository at this point in the history
Now that Godot 4.3 is the minimum supported version, we can use this
new method to merge two dictionaries a little more tersely.
  • Loading branch information
wjt committed Dec 18, 2024
1 parent 6f4335c commit c59c6a1
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions addons/block_code/ui/blocks/block/block.gd
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,7 @@ func _get_parameter_defaults() -> Dictionary:
if not block_extension:
return definition.defaults

# Use Dictionary.merge instead of Dictionary.merged for Godot 4.2 compatibility
var new_defaults := block_extension.get_defaults()
new_defaults.merge(definition.defaults)
return new_defaults
return block_extension.get_defaults().merged(definition.defaults)


func _get_or_create_block_extension() -> BlockExtension:
Expand Down

0 comments on commit c59c6a1

Please sign in to comment.