Skip to content

Commit 22877e7

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 4ed905f commit 22877e7

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
@@ -566,13 +566,15 @@ static func property_to_blocklist(property: Dictionary) -> Array[Block]:
566566
var variant_type = property.type
567567

568568
const FALLBACK_SET_FOR_TYPE = {
569+
TYPE_BOOL: false,
569570
TYPE_INT: "0",
570571
TYPE_FLOAT: "0",
571572
TYPE_VECTOR2: "0,0",
572573
TYPE_COLOR: "DARK_ORANGE",
573574
}
574575

575576
const FALLBACK_CHANGE_FOR_TYPE = {
577+
TYPE_BOOL: true,
576578
TYPE_INT: "1",
577579
TYPE_FLOAT: "1",
578580
TYPE_VECTOR2: "1,1",

0 commit comments

Comments
 (0)