Skip to content

Commit 4e59b31

Browse files
committed
Switch property labels back to human readable
In commit c18ab3f we regressed the property names from capitalized to lower case. We actually want both: capitalize them and then lower case them. Fixes #302
1 parent 1e94e46 commit 4e59b31

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

addons/block_code/code_generation/blocks_catalog.gd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ static func _add_property_definitions(_class_name: String, property_list: Array[
118118
block_settings.category,
119119
Types.BlockType.STATEMENT,
120120
TYPE_NIL,
121-
"set %s to {value: %s}" % [property.name.to_lower(), type_string],
121+
"set %s to {value: %s}" % [property.name.capitalize().to_lower(), type_string],
122122
"%s = {value}" % property.name,
123123
{"value": block_settings.get("default_set", _FALLBACK_SET_FOR_TYPE[property.type])},
124124
)
@@ -136,7 +136,7 @@ static func _add_property_definitions(_class_name: String, property_list: Array[
136136
block_settings.category,
137137
Types.BlockType.STATEMENT,
138138
TYPE_NIL,
139-
"change %s by {value: %s}" % [property.name.to_lower(), type_string],
139+
"change %s by {value: %s}" % [property.name.capitalize().to_lower(), type_string],
140140
"%s += {value}" % property.name,
141141
{"value": block_settings.get("default_change", _FALLBACK_CHANGE_FOR_TYPE[property.type])},
142142
)
@@ -153,7 +153,7 @@ static func _add_property_definitions(_class_name: String, property_list: Array[
153153
block_settings.category,
154154
Types.BlockType.VALUE,
155155
property.type,
156-
"%s" % property.name.to_lower(),
156+
"%s" % property.name.capitalize().to_lower(),
157157
"%s" % property.name,
158158
)
159159
)

0 commit comments

Comments
 (0)