Skip to content

Commit 56c2031

Browse files
committed
fixup! Add Blocks Catalog
1 parent ca1c8eb commit 56c2031

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

addons/block_code/blocks_catalog.gd

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,11 @@ extends Object
33
const BlockDefinition = preload("res://addons/block_code/block_definition.gd")
44
const Types = preload("res://addons/block_code/types/types.gd")
55

6-
static var _created: bool = false
76
static var _catalog: Dictionary
87

98

109
static func setup():
11-
if _created:
10+
if _catalog:
1211
return
1312

1413
_catalog = {}
@@ -27,8 +26,6 @@ static func setup():
2726
block_definition.category = "Log"
2827
_catalog[&"print"] = block_definition
2928

30-
_created = true
31-
3229

3330
static func get_block(block_name: StringName):
3431
return _catalog.get(block_name)

0 commit comments

Comments
 (0)