Skip to content

Commit 145aaa5

Browse files
committed
category_factory: Add BOOL data type's SET & CHANGE fallback values
To generate set and change blocks of node's property in boolean type automatically, add property in boolean type's set and change fallback value.
1 parent d61e28d commit 145aaa5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -494,13 +494,15 @@ static func property_to_blocklist(property: Dictionary) -> Array[Block]:
494494
var variant_type = property.type
495495

496496
const FALLBACK_SET_FOR_TYPE = {
497+
TYPE_BOOL: false,
497498
TYPE_INT: "0",
498499
TYPE_FLOAT: "0",
499500
TYPE_VECTOR2: "0,0",
500501
TYPE_COLOR: "DARK_ORANGE",
501502
}
502503

503504
const FALLBACK_CHANGE_FOR_TYPE = {
505+
TYPE_BOOL: true,
504506
TYPE_INT: "1",
505507
TYPE_FLOAT: "1",
506508
TYPE_VECTOR2: "1,1",

0 commit comments

Comments
 (0)