Skip to content

Commit

Permalink
Merge pull request #116 from endlessm/static-callable-4.2.1
Browse files Browse the repository at this point in the history
category_factory: Fix static Callable use in Godot 4.2.1
  • Loading branch information
dylanmccall authored Jul 3, 2024
2 parents ef620ce + 29bef8c commit ab3eeda
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion addons/block_code/ui/picker/categories/category_factory.gd
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,10 @@ static func get_categories(blocks: Array[Block], extra_categories: Array[BlockCa
# convert an array type besides Array.assign().
var cats: Array[BlockCategory] = []
cats.assign(cat_map.values())
cats.sort_custom(_category_cmp)
# Accessing a static Callable from a static function fails in 4.2.1.
# Use the fully qualified name.
# https://github.com/godotengine/godot/issues/86032
cats.sort_custom(CategoryFactory._category_cmp)
return cats


Expand Down

0 comments on commit ab3eeda

Please sign in to comment.