Skip to content

Commit

Permalink
Merge pull request #303 from endlessm/fix-property-labels
Browse files Browse the repository at this point in the history
Switch property labels back to human readable
  • Loading branch information
dbnicholson authored Nov 4, 2024
2 parents 1e94e46 + 4e59b31 commit 097d046
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions addons/block_code/code_generation/blocks_catalog.gd
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ static func _add_property_definitions(_class_name: String, property_list: Array[
block_settings.category,
Types.BlockType.STATEMENT,
TYPE_NIL,
"set %s to {value: %s}" % [property.name.to_lower(), type_string],
"set %s to {value: %s}" % [property.name.capitalize().to_lower(), type_string],
"%s = {value}" % property.name,
{"value": block_settings.get("default_set", _FALLBACK_SET_FOR_TYPE[property.type])},
)
Expand All @@ -136,7 +136,7 @@ static func _add_property_definitions(_class_name: String, property_list: Array[
block_settings.category,
Types.BlockType.STATEMENT,
TYPE_NIL,
"change %s by {value: %s}" % [property.name.to_lower(), type_string],
"change %s by {value: %s}" % [property.name.capitalize().to_lower(), type_string],
"%s += {value}" % property.name,
{"value": block_settings.get("default_change", _FALLBACK_CHANGE_FOR_TYPE[property.type])},
)
Expand All @@ -153,7 +153,7 @@ static func _add_property_definitions(_class_name: String, property_list: Array[
block_settings.category,
Types.BlockType.VALUE,
property.type,
"%s" % property.name.to_lower(),
"%s" % property.name.capitalize().to_lower(),
"%s" % property.name,
)
)
Expand Down

0 comments on commit 097d046

Please sign in to comment.