Skip to content

Commit b129a33

Browse files
authored
Merge pull request #48 from endlessm/improve-placeholder-text
Block placeholders: improve wording
2 parents 2772a46 + 51db98f commit b129a33

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,23 +44,23 @@ static func get_general_categories() -> Array[BlockCategory]:
4444
var control_list: Array[Block] = []
4545

4646
b = BLOCKS["control_block"].instantiate()
47-
b.block_formats = ["if {cond: BOOL}"]
48-
b.statements = ["if {cond}:"]
47+
b.block_formats = ["if {condition: BOOL}"]
48+
b.statements = ["if {condition}:"]
4949
control_list.append(b)
5050

5151
b = BLOCKS["control_block"].instantiate()
52-
b.block_formats = ["if {cond: BOOL}", "else"]
53-
b.statements = ["if {cond}:", "else:"]
52+
b.block_formats = ["if {condition: BOOL}", "else"]
53+
b.statements = ["if {condition}:", "else:"]
5454
control_list.append(b)
5555

5656
b = BLOCKS["control_block"].instantiate()
57-
b.block_formats = ["repeat {num: INT}"]
58-
b.statements = ["for i in {num}:"]
57+
b.block_formats = ["repeat {number: INT}"]
58+
b.statements = ["for i in {number}:"]
5959
control_list.append(b)
6060

6161
b = BLOCKS["control_block"].instantiate()
62-
b.block_formats = ["while {bool: BOOL}"]
63-
b.statements = ["while {bool}:"]
62+
b.block_formats = ["while {condition: BOOL}"]
63+
b.statements = ["while {condition}:"]
6464
control_list.append(b)
6565

6666
b = BLOCKS["statement_block"].instantiate()
@@ -226,7 +226,7 @@ static func get_general_categories() -> Array[BlockCategory]:
226226
b = BLOCKS["parameter_block"].instantiate()
227227
b.variant_type = TYPE_BOOL
228228
b.block_format = "Not {bool: BOOL}"
229-
b.statement = "(!{bool})"
229+
b.statement = "(not {bool})"
230230
logic_list.append(b)
231231

232232
var logic_category: BlockCategory = BlockCategory.new("Logic", logic_list, Color("42b8e3"))

test_game/test_game.tscn

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ path_child_pairs = []
104104
[sub_resource type="Resource" id="Resource_tu70f"]
105105
script = ExtResource("3_dpt5n")
106106
block_class = &"ControlBlock"
107-
serialized_props = [["block_name", "control_block"], ["label", "Control Block"], ["color", Color(1, 0.678431, 0.462745, 1)], ["block_type", 2], ["position", Vector2(0, 0)], ["block_formats", ["if {cond: BOOL}"]], ["statements", ["if {cond}:"]], ["param_input_strings_array", [{
107+
serialized_props = [["block_name", "control_block"], ["label", "Control Block"], ["color", Color(1, 0.678431, 0.462745, 1)], ["block_type", 2], ["position", Vector2(0, 0)], ["block_formats", ["if {condition: BOOL}"]], ["statements", ["if {cond}:"]], ["param_input_strings_array", [{
108108
"cond": ""
109109
}]]]
110110

@@ -210,7 +210,7 @@ path_child_pairs = []
210210
[sub_resource type="Resource" id="Resource_qy43j"]
211211
script = ExtResource("3_dpt5n")
212212
block_class = &"ControlBlock"
213-
serialized_props = [["block_name", "control_block"], ["label", "Control Block"], ["color", Color(1, 0.678431, 0.462745, 1)], ["block_type", 1], ["position", Vector2(0, 0)], ["block_formats", ["if {cond: BOOL}", "else"]], ["statements", ["if {cond}:", "else:"]], ["param_input_strings_array", [{
213+
serialized_props = [["block_name", "control_block"], ["label", "Control Block"], ["color", Color(1, 0.678431, 0.462745, 1)], ["block_type", 1], ["position", Vector2(0, 0)], ["block_formats", ["if {condition: BOOL}", "else"]], ["statements", ["if {cond}:", "else:"]], ["param_input_strings_array", [{
214214
"cond": ""
215215
}, {}]]]
216216

@@ -332,7 +332,7 @@ path_child_pairs = []
332332
[sub_resource type="Resource" id="Resource_cta2p"]
333333
script = ExtResource("3_dpt5n")
334334
block_class = &"ControlBlock"
335-
serialized_props = [["block_name", "control_block"], ["label", "Control Block"], ["color", Color(1, 0.678431, 0.462745, 1)], ["block_type", 1], ["position", Vector2(0, 0)], ["block_formats", ["if {cond: BOOL}"]], ["statements", ["if {cond}:"]], ["param_input_strings_array", [{
335+
serialized_props = [["block_name", "control_block"], ["label", "Control Block"], ["color", Color(1, 0.678431, 0.462745, 1)], ["block_type", 1], ["position", Vector2(0, 0)], ["block_formats", ["if {condition: BOOL}"]], ["statements", ["if {cond}:"]], ["param_input_strings_array", [{
336336
"cond": ""
337337
}]]]
338338

@@ -665,7 +665,7 @@ path_child_pairs = []
665665
[sub_resource type="Resource" id="Resource_v6sl5"]
666666
script = ExtResource("3_dpt5n")
667667
block_class = &"ControlBlock"
668-
serialized_props = [["block_name", "control_block"], ["label", "Control Block"], ["color", Color(1, 0.678431, 0.462745, 1)], ["block_type", 1], ["position", Vector2(0, 0)], ["block_formats", ["if {cond: BOOL}", "else"]], ["statements", ["if {cond}:", "else:"]], ["param_input_strings_array", [{
668+
serialized_props = [["block_name", "control_block"], ["label", "Control Block"], ["color", Color(1, 0.678431, 0.462745, 1)], ["block_type", 1], ["position", Vector2(0, 0)], ["block_formats", ["if {condition: BOOL}", "else"]], ["statements", ["if {cond}:", "else:"]], ["param_input_strings_array", [{
669669
"cond": ""
670670
}, {}]]]
671671

@@ -962,7 +962,7 @@ path_child_pairs = [[NodePath("VBoxContainer/TopMarginContainer/MarginContainer/
962962
[sub_resource type="Resource" id="Resource_kqv2n"]
963963
script = ExtResource("3_dpt5n")
964964
block_class = &"ControlBlock"
965-
serialized_props = [["block_name", "control_block"], ["label", "Control Block"], ["color", Color(1, 0.678431, 0.462745, 1)], ["block_type", 1], ["position", Vector2(0, 0)], ["block_formats", ["if {cond: BOOL}"]], ["statements", ["if {cond}:"]], ["param_input_strings_array", [{
965+
serialized_props = [["block_name", "control_block"], ["label", "Control Block"], ["color", Color(1, 0.678431, 0.462745, 1)], ["block_type", 1], ["position", Vector2(0, 0)], ["block_formats", ["if {condition: BOOL}"]], ["statements", ["if {cond}:"]], ["param_input_strings_array", [{
966966
"cond": ""
967967
}]]]
968968

0 commit comments

Comments
 (0)