Skip to content

Commit e6940e5

Browse files
authored
Merge pull request #254 from endlessm/allow-casting-vector2-to-bool
Allow using Vector2 in boolean context
2 parents a45e51c + 80a8fc2 commit e6940e5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

addons/block_code/types/types.gd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ const cast_relationships = [
4141
[TYPE_FLOAT, TYPE_STRING, "str(%s)"],
4242
[TYPE_COLOR, TYPE_STRING, "str(%s)"],
4343
[TYPE_VECTOR2, TYPE_STRING, "str(%s)"],
44+
[TYPE_VECTOR2, TYPE_BOOL, "%s"],
4445
]
4546

4647
# Directed graph, edges are CastGraphEdge

0 commit comments

Comments
 (0)