Skip to content

Commit 6c2ef3a

Browse files
dylanmccallmanuq
andauthored
Apply suggestions from code review
Co-authored-by: manuq <manuel.por.aca@gmail.com>
1 parent 8dfa35c commit 6c2ef3a

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

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

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,8 @@ static func get_general_categories() -> Array[BlockCategory]:
160160

161161
b = BLOCKS["parameter_block"].instantiate()
162162
b.block_type = Types.BlockType.STRING
163-
b.block_format = "Get String {var: STRING} from {object: NODE}"
164-
b.statement = "{object}.VAR_DICT[{var}]"
163+
b.block_format = "Get String {var: STRING} from {node: NODE}"
164+
b.statement = "{node}.VAR_DICT[{var}]"
165165
variable_list.append(b)
166166

167167
b = BLOCKS["statement_block"].instantiate()
@@ -182,18 +182,18 @@ static func get_general_categories() -> Array[BlockCategory]:
182182

183183
b = BLOCKS["parameter_block"].instantiate()
184184
b.block_type = Types.BlockType.INT
185-
b.block_format = "Get Int {var: INT} from {object: NODE}"
186-
b.statement = "{object}.VAR_DICT[{var}]"
185+
b.block_format = "Get Int {var: INT} from {node: NODE}"
186+
b.statement = "{node}.VAR_DICT[{var}]"
187187
variable_list.append(b)
188188

189189
var variable_category: BlockCategory = BlockCategory.new("Variables", variable_list, Color("4f975d"))
190190

191-
# Objects & Types
191+
# Nodes & Types
192192
var type_list: Array[Block] = []
193193

194194
b = BLOCKS["parameter_block"].instantiate()
195195
b.block_type = Types.BlockType.NODE
196-
b.block_format = "This object"
196+
b.block_format = "This node"
197197
b.statement = "self"
198198
type_list.append(b)
199199

@@ -229,16 +229,16 @@ static func get_general_categories() -> Array[BlockCategory]:
229229

230230
b = BLOCKS["parameter_block"].instantiate()
231231
b.block_type = Types.BlockType.VARIANT
232-
b.block_format = "Get property {key: STRING} from {object: NODE}"
233-
b.statement = "{object}.get({key})"
232+
b.block_format = "Get property {key: STRING} from {node: NODE}"
233+
b.statement = "{node}.get({key})"
234234
type_list.append(b)
235235

236236
b = BLOCKS["statement_block"].instantiate()
237-
b.block_format = "Set property {key: STRING} in {object: NODE} to {value: VARIANT}"
238-
b.statement = "{object}.set({key}, {value})"
237+
b.block_format = "Set property {key: STRING} in {node: NODE} to {value: VARIANT}"
238+
b.statement = "{node}.set({key}, {value})"
239239
type_list.append(b)
240240

241-
var type_category: BlockCategory = BlockCategory.new("Objects & Types", type_list, Color("c12f8e"))
241+
var type_category: BlockCategory = BlockCategory.new("Nodes & Types", type_list, Color("c12f8e"))
242242

243243
# Math
244244
var math_list: Array[Block] = []

test_game/test_game.tscn

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -346,9 +346,9 @@ path_child_pairs = []
346346
[sub_resource type="Resource" id="Resource_ol1n5"]
347347
script = ExtResource("3_dpt5n")
348348
block_class = &"ParameterBlock"
349-
serialized_props = [["block_name", "parameter_block"], ["label", "Param"], ["color", Color(0.756863, 0.184314, 0.556863, 1)], ["block_type", 3], ["position", Vector2(0, 0)], ["block_format", "Get property {key: STRING} from {object: NODE}"], ["statement", "{object}.get({key})"], ["param_input_strings", {
349+
serialized_props = [["block_name", "parameter_block"], ["label", "Param"], ["color", Color(0.756863, 0.184314, 0.556863, 1)], ["block_type", 3], ["position", Vector2(0, 0)], ["block_format", "Get property {key: STRING} from {node: NODE}"], ["statement", "{node}.get({key})"], ["param_input_strings", {
350350
"key": "visible",
351-
"object": ""
351+
"node": ""
352352
}]]
353353

354354
[sub_resource type="Resource" id="Resource_u88ch"]
@@ -383,8 +383,8 @@ path_child_pairs = []
383383
[sub_resource type="Resource" id="Resource_hsjj8"]
384384
script = ExtResource("3_dpt5n")
385385
block_class = &"ParameterBlock"
386-
serialized_props = [["block_name", "parameter_block"], ["label", "Param"], ["color", Color(0.309804, 0.592157, 0.364706, 1)], ["block_type", 4], ["position", Vector2(0, 0)], ["block_format", "Get String {var: STRING} from {object: NODE}"], ["statement", "{object}.VAR_DICT[{var}]"], ["param_input_strings", {
387-
"object": "",
386+
serialized_props = [["block_name", "parameter_block"], ["label", "Param"], ["color", Color(0.309804, 0.592157, 0.364706, 1)], ["block_type", 4], ["position", Vector2(0, 0)], ["block_format", "Get String {var: STRING} from {node: NODE}"], ["statement", "{node}.VAR_DICT[{var}]"], ["param_input_strings", {
387+
"node": "",
388388
"var": "hat"
389389
}]]
390390

0 commit comments

Comments
 (0)