aboutsummaryrefslogtreecommitdiff
path: root/codegen/lib/code/blocks.py
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2026-03-05 12:12:44 +0400
committermat <git@matdoes.dev>2026-03-05 02:27:49 -0545
commit6be947e79d91479ddfc7f1199a81ebbc64658fac (patch)
tree34b610437ab1b156d67ce94785b0f94c47f732e2 /codegen/lib/code/blocks.py
parentd726f369cfb902c767009268e3c8a77806451131 (diff)
downloadazalea-drasl-6be947e79d91479ddfc7f1199a81ebbc64658fac.tar.xz
don't unnecessarily disambiguate some block property enums
Diffstat (limited to 'codegen/lib/code/blocks.py')
-rw-r--r--codegen/lib/code/blocks.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/codegen/lib/code/blocks.py b/codegen/lib/code/blocks.py
index e3becfe5..722a0581 100644
--- a/codegen/lib/code/blocks.py
+++ b/codegen/lib/code/blocks.py
@@ -236,13 +236,12 @@ def get_property_struct_name(
return "StructureMode"
if "harp" in property_variants and "didgeridoo" in property_variants:
return "Sound"
- if is_list_of_string_integers(property_variants):
- # if the values are all integers, then prepend the block name
- return to_camel_case(block_id) + to_camel_case(property_id)
if property_variants == ["up", "side", "none"]:
return "Wire" + to_camel_case(property_id)
if property_variants == ["none", "low", "tall"]:
return "Wall" + to_camel_case(property_id)
+ if property_id in {"age", "level", "distance"}:
+ return to_camel_case(block_id) + to_camel_case(property_id)
return to_camel_case(property_id)