From e6d34a50a5c3291ca47630bdc46ef28744f9e164 Mon Sep 17 00:00:00 2001 From: Altaezio Date: Fri, 13 Feb 2026 11:18:34 +0100 Subject: [PATCH] branches and one texture --- entities/plants/assets/parts/bases/base1.tscn | 37 ------ entities/plants/assets/parts/bases/base2.tscn | 40 ------ entities/plants/assets/parts/bases/base3.tscn | 37 ------ entities/plants/assets/parts/bases/base4.tscn | 37 ------ .../parts/bottom_leaves/bottom_leaf1.tscn | 18 --- .../parts/bottom_leaves/bottom_leaf2.tscn | 18 --- .../parts/bottom_leaves/bottom_leaf3.tscn | 18 --- .../parts/bottom_leaves/bottom_leaf4.tscn | 18 --- .../parts/bottom_leaves/bottom_leaf5.tscn | 18 --- .../parts/bottom_leaves/bottom_leaf6.tscn | 18 --- .../parts/bottom_leaves/bottom_leaf7.tscn | 19 --- .../parts/bottom_leaves/bottom_leaf8.tscn | 18 --- .../parts/bottom_leaves/bottom_leaf9.tscn | 18 --- .../plants/assets/parts/branches/branch1.tscn | 18 --- .../assets/parts/branches/branch10.tscn | 26 ---- .../assets/parts/branches/branch11.tscn | 23 ---- .../assets/parts/branches/branch12.tscn | 26 ---- .../assets/parts/branches/branch13.tscn | 24 ---- .../assets/parts/branches/branch14.tscn | 23 ---- .../assets/parts/branches/branch15.tscn | 26 ---- .../assets/parts/branches/branch16.tscn | 24 ---- .../assets/parts/branches/branch17.tscn | 23 ---- .../assets/parts/branches/branch18.tscn | 23 ---- .../plants/assets/parts/branches/branch2.tscn | 17 --- .../plants/assets/parts/branches/branch3.tscn | 26 ---- .../plants/assets/parts/branches/branch4.tscn | 27 ---- .../plants/assets/parts/branches/branch5.tscn | 26 ---- .../plants/assets/parts/branches/branch6.tscn | 24 ---- .../plants/assets/parts/branches/branch7.tscn | 26 ---- .../plants/assets/parts/branches/branch8.tscn | 27 ---- .../plants/assets/parts/branches/branch9.tscn | 26 ---- .../plants/assets/parts/flowers/flower1.tscn | 18 --- .../plants/assets/parts/flowers/flower2.tscn | 19 --- .../plants/assets/parts/flowers/flower3.tscn | 18 --- .../plants/assets/parts/flowers/flower4.tscn | 18 --- .../plants/assets/parts/leaves/leaf1.tscn | 19 --- .../plants/assets/parts/leaves/leaf10.tscn | 19 --- .../plants/assets/parts/leaves/leaf11.tscn | 19 --- .../plants/assets/parts/leaves/leaf12.tscn | 19 --- .../plants/assets/parts/leaves/leaf13.tscn | 19 --- .../plants/assets/parts/leaves/leaf14.tscn | 19 --- .../plants/assets/parts/leaves/leaf15.tscn | 19 --- .../plants/assets/parts/leaves/leaf16.tscn | 19 --- .../plants/assets/parts/leaves/leaf2.tscn | 19 --- .../plants/assets/parts/leaves/leaf3.tscn | 19 --- .../plants/assets/parts/leaves/leaf4.tscn | 19 --- .../plants/assets/parts/leaves/leaf5.tscn | 19 --- .../plants/assets/parts/leaves/leaf6.tscn | 19 --- .../plants/assets/parts/leaves/leaf7.tscn | 19 --- .../plants/assets/parts/leaves/leaf8.tscn | 19 --- .../plants/assets/parts/leaves/leaf9.tscn | 20 --- entities/plants/plant_part_buider.tscn | 30 +++++ entities/plants/plant_sprite.tscn | 116 ++++++++++++++++- .../plant_mutations/precocious_mutation.tres | 10 -- .../plants/resources/plant_parts/Base1.tres | 2 +- .../plants/resources/plant_parts/Base3.tres | 2 +- .../plants/resources/plant_parts/Base4.tres | 2 +- entities/plants/scripts/plant_archetype.gd | 10 +- entities/plants/scripts/plant_data.gd | 10 +- entities/plants/scripts/plant_mutation.gd | 7 +- .../plant_mutation/ancient_mutation.gd | 3 + .../plant_mutation/precocious_mutation.gd | 3 + .../plant_mutation/quality_mutation.gd | 3 + .../scripts/plant_mutation/quick_mutation.gd | 3 + entities/plants/scripts/plant_sprite.gd | 4 +- .../part_archetypr_association.gd | 6 + .../part_archetypr_association.gd.uid | 1 + .../scripts/texture_builder/part_assembler.gd | 47 ++----- .../part_mutation_association.gd | 5 + .../part_mutation_association.gd.uid | 1 + .../scripts/texture_builder/plant_part.gd | 2 +- .../texture_builder/plant_part_builder.gd | 82 ++++++++++++ ...scene.gd.uid => plant_part_builder.gd.uid} | 0 .../texture_builder/plant_part_scene.gd | 30 ----- .../texture_builder/texture_builder.gd | 119 +++++++++++------ entities/plants/test_sprites.tscn | 120 +----------------- 76 files changed, 359 insertions(+), 1386 deletions(-) delete mode 100644 entities/plants/assets/parts/bases/base1.tscn delete mode 100644 entities/plants/assets/parts/bases/base2.tscn delete mode 100644 entities/plants/assets/parts/bases/base3.tscn delete mode 100644 entities/plants/assets/parts/bases/base4.tscn delete mode 100644 entities/plants/assets/parts/bottom_leaves/bottom_leaf1.tscn delete mode 100644 entities/plants/assets/parts/bottom_leaves/bottom_leaf2.tscn delete mode 100644 entities/plants/assets/parts/bottom_leaves/bottom_leaf3.tscn delete mode 100644 entities/plants/assets/parts/bottom_leaves/bottom_leaf4.tscn delete mode 100644 entities/plants/assets/parts/bottom_leaves/bottom_leaf5.tscn delete mode 100644 entities/plants/assets/parts/bottom_leaves/bottom_leaf6.tscn delete mode 100644 entities/plants/assets/parts/bottom_leaves/bottom_leaf7.tscn delete mode 100644 entities/plants/assets/parts/bottom_leaves/bottom_leaf8.tscn delete mode 100644 entities/plants/assets/parts/bottom_leaves/bottom_leaf9.tscn delete mode 100644 entities/plants/assets/parts/branches/branch1.tscn delete mode 100644 entities/plants/assets/parts/branches/branch10.tscn delete mode 100644 entities/plants/assets/parts/branches/branch11.tscn delete mode 100644 entities/plants/assets/parts/branches/branch12.tscn delete mode 100644 entities/plants/assets/parts/branches/branch13.tscn delete mode 100644 entities/plants/assets/parts/branches/branch14.tscn delete mode 100644 entities/plants/assets/parts/branches/branch15.tscn delete mode 100644 entities/plants/assets/parts/branches/branch16.tscn delete mode 100644 entities/plants/assets/parts/branches/branch17.tscn delete mode 100644 entities/plants/assets/parts/branches/branch18.tscn delete mode 100644 entities/plants/assets/parts/branches/branch2.tscn delete mode 100644 entities/plants/assets/parts/branches/branch3.tscn delete mode 100644 entities/plants/assets/parts/branches/branch4.tscn delete mode 100644 entities/plants/assets/parts/branches/branch5.tscn delete mode 100644 entities/plants/assets/parts/branches/branch6.tscn delete mode 100644 entities/plants/assets/parts/branches/branch7.tscn delete mode 100644 entities/plants/assets/parts/branches/branch8.tscn delete mode 100644 entities/plants/assets/parts/branches/branch9.tscn delete mode 100644 entities/plants/assets/parts/flowers/flower1.tscn delete mode 100644 entities/plants/assets/parts/flowers/flower2.tscn delete mode 100644 entities/plants/assets/parts/flowers/flower3.tscn delete mode 100644 entities/plants/assets/parts/flowers/flower4.tscn delete mode 100644 entities/plants/assets/parts/leaves/leaf1.tscn delete mode 100644 entities/plants/assets/parts/leaves/leaf10.tscn delete mode 100644 entities/plants/assets/parts/leaves/leaf11.tscn delete mode 100644 entities/plants/assets/parts/leaves/leaf12.tscn delete mode 100644 entities/plants/assets/parts/leaves/leaf13.tscn delete mode 100644 entities/plants/assets/parts/leaves/leaf14.tscn delete mode 100644 entities/plants/assets/parts/leaves/leaf15.tscn delete mode 100644 entities/plants/assets/parts/leaves/leaf16.tscn delete mode 100644 entities/plants/assets/parts/leaves/leaf2.tscn delete mode 100644 entities/plants/assets/parts/leaves/leaf3.tscn delete mode 100644 entities/plants/assets/parts/leaves/leaf4.tscn delete mode 100644 entities/plants/assets/parts/leaves/leaf5.tscn delete mode 100644 entities/plants/assets/parts/leaves/leaf6.tscn delete mode 100644 entities/plants/assets/parts/leaves/leaf7.tscn delete mode 100644 entities/plants/assets/parts/leaves/leaf8.tscn delete mode 100644 entities/plants/assets/parts/leaves/leaf9.tscn create mode 100644 entities/plants/plant_part_buider.tscn create mode 100644 entities/plants/scripts/texture_builder/part_archetypr_association.gd create mode 100644 entities/plants/scripts/texture_builder/part_archetypr_association.gd.uid create mode 100644 entities/plants/scripts/texture_builder/part_mutation_association.gd create mode 100644 entities/plants/scripts/texture_builder/part_mutation_association.gd.uid create mode 100644 entities/plants/scripts/texture_builder/plant_part_builder.gd rename entities/plants/scripts/texture_builder/{plant_part_scene.gd.uid => plant_part_builder.gd.uid} (100%) delete mode 100644 entities/plants/scripts/texture_builder/plant_part_scene.gd diff --git a/entities/plants/assets/parts/bases/base1.tscn b/entities/plants/assets/parts/bases/base1.tscn deleted file mode 100644 index 23cfe76..0000000 --- a/entities/plants/assets/parts/bases/base1.tscn +++ /dev/null @@ -1,37 +0,0 @@ -[gd_scene format=3 uid="uid://cg6r56x11bvk2"] - -[ext_resource type="Texture2D" uid="uid://doo2cxxa2p70a" path="res://entities/plants/assets/sprites/plante-teste.png" id="1_1b4au"] -[ext_resource type="Script" uid="uid://c360ic1aost1n" path="res://entities/plants/scripts/texture_builder/plant_part_scene.gd" id="2_45pib"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_mypt2"] -atlas = ExtResource("1_1b4au") -region = Rect2(46, 30, 308, 671) - -[node name="Base1" type="Sprite2D" unique_id=1642167049 node_paths=PackedStringArray("root", "attaches", "bottom_attaches")] -texture = SubResource("AtlasTexture_mypt2") -script = ExtResource("2_45pib") -root = NodePath("Root") -attaches = [NodePath("Attaches/Attach1"), NodePath("Attaches/Attach4"), NodePath("Attaches/Attach5")] -bottom_attaches = [NodePath("BottomAttaches/BottomAttach1"), NodePath("BottomAttaches/BottomAttach2")] - -[node name="Root" type="Node2D" parent="." unique_id=1974108401] -position = Vector2(14, 263) - -[node name="Attaches" type="Node" parent="." unique_id=2082226435] - -[node name="Attach1" type="Node2D" parent="Attaches" unique_id=861204621] -position = Vector2(81, 81) - -[node name="Attach4" type="Node2D" parent="Attaches" unique_id=1382379037] -position = Vector2(6, -85) - -[node name="Attach5" type="Node2D" parent="Attaches" unique_id=901072086] -position = Vector2(0, -251) - -[node name="BottomAttaches" type="Node" parent="." unique_id=456407982] - -[node name="BottomAttach1" type="Node2D" parent="BottomAttaches" unique_id=235792020] -position = Vector2(48, 293) - -[node name="BottomAttach2" type="Node2D" parent="BottomAttaches" unique_id=1929029464] -position = Vector2(-13, 287) diff --git a/entities/plants/assets/parts/bases/base2.tscn b/entities/plants/assets/parts/bases/base2.tscn deleted file mode 100644 index 9a4a9f9..0000000 --- a/entities/plants/assets/parts/bases/base2.tscn +++ /dev/null @@ -1,40 +0,0 @@ -[gd_scene format=3 uid="uid://72s8382x2ouu"] - -[ext_resource type="Texture2D" uid="uid://doo2cxxa2p70a" path="res://entities/plants/assets/sprites/plante-teste.png" id="1_46ffg"] -[ext_resource type="Script" uid="uid://c360ic1aost1n" path="res://entities/plants/scripts/texture_builder/plant_part_scene.gd" id="2_wq53h"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_mypt2"] -atlas = ExtResource("1_46ffg") -region = Rect2(52, 724, 363, 448) - -[node name="Base2" type="Sprite2D" unique_id=1642167049 node_paths=PackedStringArray("root", "attaches", "bottom_attaches")] -texture = SubResource("AtlasTexture_mypt2") -script = ExtResource("2_wq53h") -root = NodePath("Root") -attaches = [NodePath("Attaches/Attach1"), NodePath("Attaches/Attach3"), NodePath("Attaches/Attach4"), NodePath("Attaches/Attach6")] -bottom_attaches = [NodePath("BottomAttaches/BottomAttach1"), NodePath("BottomAttaches/BottomAttach4")] - -[node name="Root" type="Node2D" parent="." unique_id=1974108401] -position = Vector2(89, 180) - -[node name="Attaches" type="Node" parent="." unique_id=2082226435] - -[node name="Attach1" type="Node2D" parent="Attaches" unique_id=861204621] -position = Vector2(82, 84) - -[node name="Attach3" type="Node2D" parent="Attaches" unique_id=482542203] -position = Vector2(-27, 5) - -[node name="Attach4" type="Node2D" parent="Attaches" unique_id=1382379037] -position = Vector2(-121, -64) - -[node name="Attach6" type="Node2D" parent="Attaches" unique_id=940226899] -position = Vector2(-94, -159) - -[node name="BottomAttaches" type="Node" parent="." unique_id=456407982] - -[node name="BottomAttach1" type="Node2D" parent="BottomAttaches" unique_id=235792020] -position = Vector2(114, 191) - -[node name="BottomAttach4" type="Node2D" parent="BottomAttaches" unique_id=1750915659] -position = Vector2(61, 187) diff --git a/entities/plants/assets/parts/bases/base3.tscn b/entities/plants/assets/parts/bases/base3.tscn deleted file mode 100644 index c3a137e..0000000 --- a/entities/plants/assets/parts/bases/base3.tscn +++ /dev/null @@ -1,37 +0,0 @@ -[gd_scene format=3 uid="uid://dl0kae3or8wn5"] - -[ext_resource type="Texture2D" uid="uid://doo2cxxa2p70a" path="res://entities/plants/assets/sprites/plante-teste.png" id="1_gcipq"] -[ext_resource type="Script" uid="uid://c360ic1aost1n" path="res://entities/plants/scripts/texture_builder/plant_part_scene.gd" id="2_dc2ka"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_mypt2"] -atlas = ExtResource("1_gcipq") -region = Rect2(58, 1268, 141, 393) - -[node name="Base3" type="Sprite2D" unique_id=1642167049 node_paths=PackedStringArray("root", "attaches", "bottom_attaches")] -texture = SubResource("AtlasTexture_mypt2") -script = ExtResource("2_dc2ka") -root = NodePath("Root") -attaches = [NodePath("Attaches/Attach2"), NodePath("Attaches/Attach3"), NodePath("Attaches/Attach5")] -bottom_attaches = [NodePath("BottomAttaches/BottomAttach1"), NodePath("BottomAttaches/BottomAttach2")] - -[node name="Root" type="Node2D" parent="." unique_id=1974108401] -position = Vector2(7, 156) - -[node name="Attaches" type="Node" parent="." unique_id=2082226435] - -[node name="Attach2" type="Node2D" parent="Attaches" unique_id=1344917470] -position = Vector2(0, 52) - -[node name="Attach3" type="Node2D" parent="Attaches" unique_id=482542203] -position = Vector2(-9, -53) - -[node name="Attach5" type="Node2D" parent="Attaches" unique_id=901072086] -position = Vector2(19, -149) - -[node name="BottomAttaches" type="Node" parent="." unique_id=456407982] - -[node name="BottomAttach1" type="Node2D" parent="BottomAttaches" unique_id=235792020] -position = Vector2(21, 161) - -[node name="BottomAttach2" type="Node2D" parent="BottomAttaches" unique_id=1929029464] -position = Vector2(-7, 162) diff --git a/entities/plants/assets/parts/bases/base4.tscn b/entities/plants/assets/parts/bases/base4.tscn deleted file mode 100644 index 849d940..0000000 --- a/entities/plants/assets/parts/bases/base4.tscn +++ /dev/null @@ -1,37 +0,0 @@ -[gd_scene format=3 uid="uid://dnl6yculy2lub"] - -[ext_resource type="Texture2D" uid="uid://doo2cxxa2p70a" path="res://entities/plants/assets/sprites/plante-teste.png" id="1_u26j6"] -[ext_resource type="Script" uid="uid://c360ic1aost1n" path="res://entities/plants/scripts/texture_builder/plant_part_scene.gd" id="2_suu34"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_mypt2"] -atlas = ExtResource("1_u26j6") -region = Rect2(223, 1265, 200, 386) - -[node name="Base4" type="Sprite2D" unique_id=1642167049 node_paths=PackedStringArray("root", "attaches", "bottom_attaches")] -texture = SubResource("AtlasTexture_mypt2") -script = ExtResource("2_suu34") -root = NodePath("Root") -attaches = [NodePath("Attaches/Attach1"), NodePath("Attaches/Attach2"), NodePath("Attaches/Attach3")] -bottom_attaches = [NodePath("BottomAttaches/BottomAttach1"), NodePath("BottomAttaches/BottomAttach2")] - -[node name="Root" type="Node2D" parent="." unique_id=1974108401] -position = Vector2(31, 158) - -[node name="Attaches" type="Node" parent="." unique_id=2082226435] - -[node name="Attach1" type="Node2D" parent="Attaches" unique_id=861204621] -position = Vector2(14, 59) - -[node name="Attach2" type="Node2D" parent="Attaches" unique_id=1344917470] -position = Vector2(-9, 24) - -[node name="Attach3" type="Node2D" parent="Attaches" unique_id=482542203] -position = Vector2(-22, -114) - -[node name="BottomAttaches" type="Node" parent="." unique_id=456407982] - -[node name="BottomAttach1" type="Node2D" parent="BottomAttaches" unique_id=235792020] -position = Vector2(49, 165) - -[node name="BottomAttach2" type="Node2D" parent="BottomAttaches" unique_id=1929029464] -position = Vector2(19, 169) diff --git a/entities/plants/assets/parts/bottom_leaves/bottom_leaf1.tscn b/entities/plants/assets/parts/bottom_leaves/bottom_leaf1.tscn deleted file mode 100644 index ad4f6d6..0000000 --- a/entities/plants/assets/parts/bottom_leaves/bottom_leaf1.tscn +++ /dev/null @@ -1,18 +0,0 @@ -[gd_scene format=3 uid="uid://27iessjdhgmu"] - -[ext_resource type="Texture2D" uid="uid://doo2cxxa2p70a" path="res://entities/plants/assets/sprites/plante-teste.png" id="1_cjkw8"] -[ext_resource type="Script" uid="uid://c360ic1aost1n" path="res://entities/plants/scripts/texture_builder/plant_part_scene.gd" id="2_njx70"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_mypt2"] -atlas = ExtResource("1_cjkw8") -region = Rect2(117, 1662, 70, 100) - -[node name="BottomLeaf1" type="Sprite2D" unique_id=1642167049 node_paths=PackedStringArray("root")] -texture = SubResource("AtlasTexture_mypt2") -script = ExtResource("2_njx70") -root = NodePath("Root") -type = 2 -bottom_attachable = true - -[node name="Root" type="Node2D" parent="." unique_id=1974108401] -position = Vector2(1, 32) diff --git a/entities/plants/assets/parts/bottom_leaves/bottom_leaf2.tscn b/entities/plants/assets/parts/bottom_leaves/bottom_leaf2.tscn deleted file mode 100644 index c975ea6..0000000 --- a/entities/plants/assets/parts/bottom_leaves/bottom_leaf2.tscn +++ /dev/null @@ -1,18 +0,0 @@ -[gd_scene format=3 uid="uid://bdtxnigwyarjf"] - -[ext_resource type="Texture2D" uid="uid://doo2cxxa2p70a" path="res://entities/plants/assets/sprites/plante-teste.png" id="1_thc30"] -[ext_resource type="Script" uid="uid://c360ic1aost1n" path="res://entities/plants/scripts/texture_builder/plant_part_scene.gd" id="2_n2lgp"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_mypt2"] -atlas = ExtResource("1_thc30") -region = Rect2(9, 1751, 100, 94) - -[node name="BottomLeaf2" type="Sprite2D" unique_id=1642167049 node_paths=PackedStringArray("root")] -texture = SubResource("AtlasTexture_mypt2") -script = ExtResource("2_n2lgp") -root = NodePath("Root") -type = 2 -bottom_attachable = true - -[node name="Root" type="Node2D" parent="." unique_id=1974108401] -position = Vector2(10, 35) diff --git a/entities/plants/assets/parts/bottom_leaves/bottom_leaf3.tscn b/entities/plants/assets/parts/bottom_leaves/bottom_leaf3.tscn deleted file mode 100644 index b7e6eda..0000000 --- a/entities/plants/assets/parts/bottom_leaves/bottom_leaf3.tscn +++ /dev/null @@ -1,18 +0,0 @@ -[gd_scene format=3 uid="uid://bg4cl3q0g3sfj"] - -[ext_resource type="Texture2D" uid="uid://doo2cxxa2p70a" path="res://entities/plants/assets/sprites/plante-teste.png" id="1_gaifj"] -[ext_resource type="Script" uid="uid://c360ic1aost1n" path="res://entities/plants/scripts/texture_builder/plant_part_scene.gd" id="2_v2pdq"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_mypt2"] -atlas = ExtResource("1_gaifj") -region = Rect2(210, 1644, 112, 220) - -[node name="BottomLeaf3" type="Sprite2D" unique_id=1642167049 node_paths=PackedStringArray("root")] -texture = SubResource("AtlasTexture_mypt2") -script = ExtResource("2_v2pdq") -root = NodePath("Root") -type = 2 -bottom_attachable = true - -[node name="Root" type="Node2D" parent="." unique_id=1974108401] -position = Vector2(26, 79) diff --git a/entities/plants/assets/parts/bottom_leaves/bottom_leaf4.tscn b/entities/plants/assets/parts/bottom_leaves/bottom_leaf4.tscn deleted file mode 100644 index 9e448e2..0000000 --- a/entities/plants/assets/parts/bottom_leaves/bottom_leaf4.tscn +++ /dev/null @@ -1,18 +0,0 @@ -[gd_scene format=3 uid="uid://ds7qd2ed1jfdd"] - -[ext_resource type="Texture2D" uid="uid://doo2cxxa2p70a" path="res://entities/plants/assets/sprites/plante-teste.png" id="1_ag13l"] -[ext_resource type="Script" uid="uid://c360ic1aost1n" path="res://entities/plants/scripts/texture_builder/plant_part_scene.gd" id="2_udnmw"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_mypt2"] -atlas = ExtResource("1_ag13l") -region = Rect2(328, 1665, 118, 196) - -[node name="BottomLeaf4" type="Sprite2D" unique_id=1642167049 node_paths=PackedStringArray("root")] -texture = SubResource("AtlasTexture_mypt2") -script = ExtResource("2_udnmw") -root = NodePath("Root") -type = 2 -bottom_attachable = true - -[node name="Root" type="Node2D" parent="." unique_id=1974108401] -position = Vector2(-29, 81) diff --git a/entities/plants/assets/parts/bottom_leaves/bottom_leaf5.tscn b/entities/plants/assets/parts/bottom_leaves/bottom_leaf5.tscn deleted file mode 100644 index 2c8abae..0000000 --- a/entities/plants/assets/parts/bottom_leaves/bottom_leaf5.tscn +++ /dev/null @@ -1,18 +0,0 @@ -[gd_scene format=3 uid="uid://dts2dg0bq3603"] - -[ext_resource type="Texture2D" uid="uid://doo2cxxa2p70a" path="res://entities/plants/assets/sprites/plante-teste.png" id="1_wu46l"] -[ext_resource type="Script" uid="uid://c360ic1aost1n" path="res://entities/plants/scripts/texture_builder/plant_part_scene.gd" id="2_7u6ch"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_mypt2"] -atlas = ExtResource("1_wu46l") -region = Rect2(6, 1868, 101, 246) - -[node name="BottomLeaf5" type="Sprite2D" unique_id=1642167049 node_paths=PackedStringArray("root")] -texture = SubResource("AtlasTexture_mypt2") -script = ExtResource("2_7u6ch") -root = NodePath("Root") -type = 2 -bottom_attachable = true - -[node name="Root" type="Node2D" parent="." unique_id=1974108401] -position = Vector2(-21, 102) diff --git a/entities/plants/assets/parts/bottom_leaves/bottom_leaf6.tscn b/entities/plants/assets/parts/bottom_leaves/bottom_leaf6.tscn deleted file mode 100644 index 9660553..0000000 --- a/entities/plants/assets/parts/bottom_leaves/bottom_leaf6.tscn +++ /dev/null @@ -1,18 +0,0 @@ -[gd_scene format=3 uid="uid://bjawv0tbtex8o"] - -[ext_resource type="Texture2D" uid="uid://doo2cxxa2p70a" path="res://entities/plants/assets/sprites/plante-teste.png" id="1_ia34u"] -[ext_resource type="Script" uid="uid://c360ic1aost1n" path="res://entities/plants/scripts/texture_builder/plant_part_scene.gd" id="2_rgpp8"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_mypt2"] -atlas = ExtResource("1_ia34u") -region = Rect2(100, 1930, 121, 181) - -[node name="BottomLeaf6" type="Sprite2D" unique_id=1642167049 node_paths=PackedStringArray("root")] -texture = SubResource("AtlasTexture_mypt2") -script = ExtResource("2_rgpp8") -root = NodePath("Root") -type = 2 -bottom_attachable = true - -[node name="Root" type="Node2D" parent="." unique_id=1974108401] -position = Vector2(7, 68) diff --git a/entities/plants/assets/parts/bottom_leaves/bottom_leaf7.tscn b/entities/plants/assets/parts/bottom_leaves/bottom_leaf7.tscn deleted file mode 100644 index fe93f0f..0000000 --- a/entities/plants/assets/parts/bottom_leaves/bottom_leaf7.tscn +++ /dev/null @@ -1,19 +0,0 @@ -[gd_scene format=3 uid="uid://o4h8osgnh8os"] - -[ext_resource type="Texture2D" uid="uid://doo2cxxa2p70a" path="res://entities/plants/assets/sprites/plante-teste.png" id="1_qfp1p"] -[ext_resource type="Script" uid="uid://c360ic1aost1n" path="res://entities/plants/scripts/texture_builder/plant_part_scene.gd" id="2_ml4r4"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_mypt2"] -atlas = ExtResource("1_qfp1p") -region = Rect2(238, 1897, 80, 82) - -[node name="BottomLeaf7" type="Sprite2D" unique_id=1642167049 node_paths=PackedStringArray("root")] -texture = SubResource("AtlasTexture_mypt2") -script = ExtResource("2_ml4r4") -root = NodePath("Root") -type = 2 -is_back = true -bottom_attachable = true - -[node name="Root" type="Node2D" parent="." unique_id=1974108401] -position = Vector2(12, 25) diff --git a/entities/plants/assets/parts/bottom_leaves/bottom_leaf8.tscn b/entities/plants/assets/parts/bottom_leaves/bottom_leaf8.tscn deleted file mode 100644 index fea8617..0000000 --- a/entities/plants/assets/parts/bottom_leaves/bottom_leaf8.tscn +++ /dev/null @@ -1,18 +0,0 @@ -[gd_scene format=3 uid="uid://ba5jgwaoswxnt"] - -[ext_resource type="Texture2D" uid="uid://doo2cxxa2p70a" path="res://entities/plants/assets/sprites/plante-teste.png" id="1_1ir7j"] -[ext_resource type="Script" uid="uid://c360ic1aost1n" path="res://entities/plants/scripts/texture_builder/plant_part_scene.gd" id="2_vpbpe"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_mypt2"] -atlas = ExtResource("1_1ir7j") -region = Rect2(347, 1935, 87, 89) - -[node name="BottomLeaf8" type="Sprite2D" unique_id=1642167049 node_paths=PackedStringArray("root")] -texture = SubResource("AtlasTexture_mypt2") -script = ExtResource("2_vpbpe") -root = NodePath("Root") -type = 2 -bottom_attachable = true - -[node name="Root" type="Node2D" parent="." unique_id=1974108401] -position = Vector2(-5, 25) diff --git a/entities/plants/assets/parts/bottom_leaves/bottom_leaf9.tscn b/entities/plants/assets/parts/bottom_leaves/bottom_leaf9.tscn deleted file mode 100644 index fe67aa1..0000000 --- a/entities/plants/assets/parts/bottom_leaves/bottom_leaf9.tscn +++ /dev/null @@ -1,18 +0,0 @@ -[gd_scene format=3 uid="uid://drehv2x5oieno"] - -[ext_resource type="Texture2D" uid="uid://doo2cxxa2p70a" path="res://entities/plants/assets/sprites/plante-teste.png" id="1_rxqri"] -[ext_resource type="Script" uid="uid://c360ic1aost1n" path="res://entities/plants/scripts/texture_builder/plant_part_scene.gd" id="2_dlq8k"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_mypt2"] -atlas = ExtResource("1_rxqri") -region = Rect2(281, 2022, 97, 94) - -[node name="BottomLeaf9" type="Sprite2D" unique_id=1642167049 node_paths=PackedStringArray("root")] -texture = SubResource("AtlasTexture_mypt2") -script = ExtResource("2_dlq8k") -root = NodePath("Root") -type = 2 -bottom_attachable = true - -[node name="Root" type="Node2D" parent="." unique_id=1974108401] -position = Vector2(11, 25) diff --git a/entities/plants/assets/parts/branches/branch1.tscn b/entities/plants/assets/parts/branches/branch1.tscn deleted file mode 100644 index 57dd237..0000000 --- a/entities/plants/assets/parts/branches/branch1.tscn +++ /dev/null @@ -1,18 +0,0 @@ -[gd_scene format=3 uid="uid://gxrgk123q4s4"] - -[ext_resource type="Texture2D" uid="uid://doo2cxxa2p70a" path="res://entities/plants/assets/sprites/plante-teste.png" id="1_as67b"] -[ext_resource type="Script" uid="uid://c360ic1aost1n" path="res://entities/plants/scripts/texture_builder/plant_part_scene.gd" id="2_waeb8"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_mypt2"] -atlas = ExtResource("1_as67b") -region = Rect2(518, 116, 147, 110) - -[node name="Branch1" type="Sprite2D" unique_id=1642167049 node_paths=PackedStringArray("root")] -texture = SubResource("AtlasTexture_mypt2") -script = ExtResource("2_waeb8") -root = NodePath("Root") -type = 1 -is_back = true - -[node name="Root" type="Node2D" parent="." unique_id=1974108401] -position = Vector2(-34, 2) diff --git a/entities/plants/assets/parts/branches/branch10.tscn b/entities/plants/assets/parts/branches/branch10.tscn deleted file mode 100644 index 69b7e24..0000000 --- a/entities/plants/assets/parts/branches/branch10.tscn +++ /dev/null @@ -1,26 +0,0 @@ -[gd_scene format=3 uid="uid://cs36w4mum4ps7"] - -[ext_resource type="Texture2D" uid="uid://doo2cxxa2p70a" path="res://entities/plants/assets/sprites/plante-teste.png" id="1_lmm1b"] -[ext_resource type="Script" uid="uid://c360ic1aost1n" path="res://entities/plants/scripts/texture_builder/plant_part_scene.gd" id="2_jvgon"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_mypt2"] -atlas = ExtResource("1_lmm1b") -region = Rect2(716, 966, 212, 172) - -[node name="Branch10" type="Sprite2D" unique_id=1642167049 node_paths=PackedStringArray("root", "attaches")] -texture = SubResource("AtlasTexture_mypt2") -script = ExtResource("2_jvgon") -root = NodePath("Root") -attaches = [NodePath("Attaches/Attach1"), NodePath("Attaches/Attach3")] -type = 1 - -[node name="Root" type="Node2D" parent="." unique_id=1974108401] -position = Vector2(-66, 11) - -[node name="Attaches" type="Node" parent="." unique_id=2082226435] - -[node name="Attach1" type="Node2D" parent="Attaches" unique_id=861204621] -position = Vector2(-14, 39) - -[node name="Attach3" type="Node2D" parent="Attaches" unique_id=482542203] -position = Vector2(58, -39) diff --git a/entities/plants/assets/parts/branches/branch11.tscn b/entities/plants/assets/parts/branches/branch11.tscn deleted file mode 100644 index 3d26bae..0000000 --- a/entities/plants/assets/parts/branches/branch11.tscn +++ /dev/null @@ -1,23 +0,0 @@ -[gd_scene format=3 uid="uid://dkacu801335p5"] - -[ext_resource type="Texture2D" uid="uid://doo2cxxa2p70a" path="res://entities/plants/assets/sprites/plante-teste.png" id="1_hja3v"] -[ext_resource type="Script" uid="uid://c360ic1aost1n" path="res://entities/plants/scripts/texture_builder/plant_part_scene.gd" id="2_wpn4e"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_mypt2"] -atlas = ExtResource("1_hja3v") -region = Rect2(487, 1206, 111, 164) - -[node name="Branch11" type="Sprite2D" unique_id=1642167049 node_paths=PackedStringArray("root", "attaches")] -texture = SubResource("AtlasTexture_mypt2") -script = ExtResource("2_wpn4e") -root = NodePath("Root") -attaches = [NodePath("Attaches/Attach1")] -type = 1 - -[node name="Root" type="Node2D" parent="." unique_id=1974108401] -position = Vector2(28, 47) - -[node name="Attaches" type="Node" parent="." unique_id=2082226435] - -[node name="Attach1" type="Node2D" parent="Attaches" unique_id=861204621] -position = Vector2(4, 29) diff --git a/entities/plants/assets/parts/branches/branch12.tscn b/entities/plants/assets/parts/branches/branch12.tscn deleted file mode 100644 index 62b7f47..0000000 --- a/entities/plants/assets/parts/branches/branch12.tscn +++ /dev/null @@ -1,26 +0,0 @@ -[gd_scene format=3 uid="uid://cwdpgq8ot27tn"] - -[ext_resource type="Texture2D" uid="uid://doo2cxxa2p70a" path="res://entities/plants/assets/sprites/plante-teste.png" id="1_apyfg"] -[ext_resource type="Script" uid="uid://c360ic1aost1n" path="res://entities/plants/scripts/texture_builder/plant_part_scene.gd" id="2_71js2"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_mypt2"] -atlas = ExtResource("1_apyfg") -region = Rect2(753, 1188, 172, 191) - -[node name="Branch12" type="Sprite2D" unique_id=1642167049 node_paths=PackedStringArray("root", "attaches")] -texture = SubResource("AtlasTexture_mypt2") -script = ExtResource("2_71js2") -root = NodePath("Root") -attaches = [NodePath("Attaches/Attach1"), NodePath("Attaches/Attach2")] -type = 1 - -[node name="Root" type="Node2D" parent="." unique_id=1974108401] -position = Vector2(-19, 57) - -[node name="Attaches" type="Node" parent="." unique_id=2082226435] - -[node name="Attach1" type="Node2D" parent="Attaches" unique_id=861204621] -position = Vector2(6, 31) - -[node name="Attach2" type="Node2D" parent="Attaches" unique_id=1779531108] -position = Vector2(1, -12) diff --git a/entities/plants/assets/parts/branches/branch13.tscn b/entities/plants/assets/parts/branches/branch13.tscn deleted file mode 100644 index c698e6a..0000000 --- a/entities/plants/assets/parts/branches/branch13.tscn +++ /dev/null @@ -1,24 +0,0 @@ -[gd_scene format=3 uid="uid://b812ypiab5bhu"] - -[ext_resource type="Texture2D" uid="uid://doo2cxxa2p70a" path="res://entities/plants/assets/sprites/plante-teste.png" id="1_j6yuv"] -[ext_resource type="Script" uid="uid://c360ic1aost1n" path="res://entities/plants/scripts/texture_builder/plant_part_scene.gd" id="2_ubkdw"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_mypt2"] -atlas = ExtResource("1_j6yuv") -region = Rect2(515, 1445, 123, 171) - -[node name="Branch13" type="Sprite2D" unique_id=1642167049 node_paths=PackedStringArray("root", "attaches")] -texture = SubResource("AtlasTexture_mypt2") -script = ExtResource("2_ubkdw") -root = NodePath("Root") -attaches = [NodePath("Attaches/Attach2")] -type = 1 -is_back = true - -[node name="Root" type="Node2D" parent="." unique_id=1974108401] -position = Vector2(-19, 57) - -[node name="Attaches" type="Node" parent="." unique_id=2082226435] - -[node name="Attach2" type="Node2D" parent="Attaches" unique_id=1779531108] -position = Vector2(12, 16) diff --git a/entities/plants/assets/parts/branches/branch14.tscn b/entities/plants/assets/parts/branches/branch14.tscn deleted file mode 100644 index c0dd2bf..0000000 --- a/entities/plants/assets/parts/branches/branch14.tscn +++ /dev/null @@ -1,23 +0,0 @@ -[gd_scene format=3 uid="uid://c7bbylk6t5a3m"] - -[ext_resource type="Texture2D" uid="uid://doo2cxxa2p70a" path="res://entities/plants/assets/sprites/plante-teste.png" id="1_bd85j"] -[ext_resource type="Script" uid="uid://c360ic1aost1n" path="res://entities/plants/scripts/texture_builder/plant_part_scene.gd" id="2_sqybd"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_mypt2"] -atlas = ExtResource("1_bd85j") -region = Rect2(708, 1421, 178, 204) - -[node name="Branch14" type="Sprite2D" unique_id=1642167049 node_paths=PackedStringArray("root", "attaches")] -texture = SubResource("AtlasTexture_mypt2") -script = ExtResource("2_sqybd") -root = NodePath("Root") -attaches = [NodePath("Attaches/Attach2")] -type = 1 - -[node name="Root" type="Node2D" parent="." unique_id=1974108401] -position = Vector2(34, 75) - -[node name="Attaches" type="Node" parent="." unique_id=2082226435] - -[node name="Attach2" type="Node2D" parent="Attaches" unique_id=1779531108] -position = Vector2(18, 21) diff --git a/entities/plants/assets/parts/branches/branch15.tscn b/entities/plants/assets/parts/branches/branch15.tscn deleted file mode 100644 index 941e20d..0000000 --- a/entities/plants/assets/parts/branches/branch15.tscn +++ /dev/null @@ -1,26 +0,0 @@ -[gd_scene format=3 uid="uid://dohr0df6a2cct"] - -[ext_resource type="Texture2D" uid="uid://doo2cxxa2p70a" path="res://entities/plants/assets/sprites/plante-teste.png" id="1_swkx6"] -[ext_resource type="Script" uid="uid://c360ic1aost1n" path="res://entities/plants/scripts/texture_builder/plant_part_scene.gd" id="2_twff7"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_mypt2"] -atlas = ExtResource("1_swkx6") -region = Rect2(450, 1656, 194, 235) - -[node name="Branch15" type="Sprite2D" unique_id=1642167049 node_paths=PackedStringArray("root", "attaches")] -texture = SubResource("AtlasTexture_mypt2") -script = ExtResource("2_twff7") -root = NodePath("Root") -attaches = [NodePath("Attaches/Attach1"), NodePath("Attaches/Attach2")] -type = 1 - -[node name="Root" type="Node2D" parent="." unique_id=1974108401] -position = Vector2(33, 85) - -[node name="Attaches" type="Node" parent="." unique_id=2082226435] - -[node name="Attach1" type="Node2D" parent="Attaches" unique_id=861204621] -position = Vector2(-6, 19) - -[node name="Attach2" type="Node2D" parent="Attaches" unique_id=1779531108] -position = Vector2(-33, -25) diff --git a/entities/plants/assets/parts/branches/branch16.tscn b/entities/plants/assets/parts/branches/branch16.tscn deleted file mode 100644 index c9ce6e8..0000000 --- a/entities/plants/assets/parts/branches/branch16.tscn +++ /dev/null @@ -1,24 +0,0 @@ -[gd_scene format=3 uid="uid://gva05r3c8gby"] - -[ext_resource type="Texture2D" uid="uid://doo2cxxa2p70a" path="res://entities/plants/assets/sprites/plante-teste.png" id="1_kveac"] -[ext_resource type="Script" uid="uid://c360ic1aost1n" path="res://entities/plants/scripts/texture_builder/plant_part_scene.gd" id="2_3xj1s"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_mypt2"] -atlas = ExtResource("1_kveac") -region = Rect2(745, 1655, 214, 183) - -[node name="Branch16" type="Sprite2D" unique_id=1642167049 node_paths=PackedStringArray("root", "attaches")] -texture = SubResource("AtlasTexture_mypt2") -script = ExtResource("2_3xj1s") -root = NodePath("Root") -attaches = [NodePath("Attaches/Attach2")] -type = 1 -is_back = true - -[node name="Root" type="Node2D" parent="." unique_id=1974108401] -position = Vector2(-42, 53) - -[node name="Attaches" type="Node" parent="." unique_id=2082226435] - -[node name="Attach2" type="Node2D" parent="Attaches" unique_id=1779531108] -position = Vector2(19, 3) diff --git a/entities/plants/assets/parts/branches/branch17.tscn b/entities/plants/assets/parts/branches/branch17.tscn deleted file mode 100644 index 3bc8304..0000000 --- a/entities/plants/assets/parts/branches/branch17.tscn +++ /dev/null @@ -1,23 +0,0 @@ -[gd_scene format=3 uid="uid://cyj8ssk8qkleo"] - -[ext_resource type="Texture2D" uid="uid://doo2cxxa2p70a" path="res://entities/plants/assets/sprites/plante-teste.png" id="1_vxsqt"] -[ext_resource type="Script" uid="uid://c360ic1aost1n" path="res://entities/plants/scripts/texture_builder/plant_part_scene.gd" id="2_deuen"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_mypt2"] -atlas = ExtResource("1_vxsqt") -region = Rect2(453, 1996, 156, 102) - -[node name="Branch17" type="Sprite2D" unique_id=1642167049 node_paths=PackedStringArray("root", "attaches")] -texture = SubResource("AtlasTexture_mypt2") -script = ExtResource("2_deuen") -root = NodePath("Root") -attaches = [NodePath("Attaches/Attach2")] -type = 1 - -[node name="Root" type="Node2D" parent="." unique_id=1974108401] -position = Vector2(47, 30) - -[node name="Attaches" type="Node" parent="." unique_id=2082226435] - -[node name="Attach2" type="Node2D" parent="Attaches" unique_id=1779531108] -position = Vector2(-11, 5) diff --git a/entities/plants/assets/parts/branches/branch18.tscn b/entities/plants/assets/parts/branches/branch18.tscn deleted file mode 100644 index 064c32c..0000000 --- a/entities/plants/assets/parts/branches/branch18.tscn +++ /dev/null @@ -1,23 +0,0 @@ -[gd_scene format=3 uid="uid://bf2mi7dxuj14g"] - -[ext_resource type="Texture2D" uid="uid://doo2cxxa2p70a" path="res://entities/plants/assets/sprites/plante-teste.png" id="1_4wnt4"] -[ext_resource type="Script" uid="uid://c360ic1aost1n" path="res://entities/plants/scripts/texture_builder/plant_part_scene.gd" id="2_tsqkm"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_mypt2"] -atlas = ExtResource("1_4wnt4") -region = Rect2(723, 1895, 198, 194) - -[node name="Branch18" type="Sprite2D" unique_id=1642167049 node_paths=PackedStringArray("root", "attaches")] -texture = SubResource("AtlasTexture_mypt2") -script = ExtResource("2_tsqkm") -root = NodePath("Root") -attaches = [NodePath("Attaches/Attach2")] -type = 1 - -[node name="Root" type="Node2D" parent="." unique_id=1974108401] -position = Vector2(-49, 73) - -[node name="Attaches" type="Node" parent="." unique_id=2082226435] - -[node name="Attach2" type="Node2D" parent="Attaches" unique_id=1779531108] -position = Vector2(18, 21) diff --git a/entities/plants/assets/parts/branches/branch2.tscn b/entities/plants/assets/parts/branches/branch2.tscn deleted file mode 100644 index 9d0362e..0000000 --- a/entities/plants/assets/parts/branches/branch2.tscn +++ /dev/null @@ -1,17 +0,0 @@ -[gd_scene format=3 uid="uid://dcgv0iyl5j573"] - -[ext_resource type="Texture2D" uid="uid://doo2cxxa2p70a" path="res://entities/plants/assets/sprites/plante-teste.png" id="1_lrnkx"] -[ext_resource type="Script" uid="uid://c360ic1aost1n" path="res://entities/plants/scripts/texture_builder/plant_part_scene.gd" id="2_p28in"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_mypt2"] -atlas = ExtResource("1_lrnkx") -region = Rect2(735, 104, 118, 109) - -[node name="Branch2" type="Sprite2D" unique_id=1642167049 node_paths=PackedStringArray("root")] -texture = SubResource("AtlasTexture_mypt2") -script = ExtResource("2_p28in") -root = NodePath("Root") -type = 1 - -[node name="Root" type="Node2D" parent="." unique_id=1974108401] -position = Vector2(28, 5) diff --git a/entities/plants/assets/parts/branches/branch3.tscn b/entities/plants/assets/parts/branches/branch3.tscn deleted file mode 100644 index 237c66b..0000000 --- a/entities/plants/assets/parts/branches/branch3.tscn +++ /dev/null @@ -1,26 +0,0 @@ -[gd_scene format=3 uid="uid://d0ltcm3nau23g"] - -[ext_resource type="Texture2D" uid="uid://doo2cxxa2p70a" path="res://entities/plants/assets/sprites/plante-teste.png" id="1_78qqg"] -[ext_resource type="Script" uid="uid://c360ic1aost1n" path="res://entities/plants/scripts/texture_builder/plant_part_scene.gd" id="2_oc53o"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_mypt2"] -atlas = ExtResource("1_78qqg") -region = Rect2(487, 242, 188, 176) - -[node name="Branch3" type="Sprite2D" unique_id=1642167049 node_paths=PackedStringArray("root", "attaches")] -texture = SubResource("AtlasTexture_mypt2") -script = ExtResource("2_oc53o") -root = NodePath("Root") -attaches = [NodePath("Attaches/Attach1"), NodePath("Attaches/Attach2")] -type = 1 - -[node name="Root" type="Node2D" parent="." unique_id=1974108401] -position = Vector2(39, 45) - -[node name="Attaches" type="Node" parent="." unique_id=2082226435] - -[node name="Attach1" type="Node2D" parent="Attaches" unique_id=861204621] -position = Vector2(6, 35) - -[node name="Attach2" type="Node2D" parent="Attaches" unique_id=1344917470] -position = Vector2(-24, -34) diff --git a/entities/plants/assets/parts/branches/branch4.tscn b/entities/plants/assets/parts/branches/branch4.tscn deleted file mode 100644 index 8d2ef05..0000000 --- a/entities/plants/assets/parts/branches/branch4.tscn +++ /dev/null @@ -1,27 +0,0 @@ -[gd_scene format=3 uid="uid://dcjqtbeyiimo6"] - -[ext_resource type="Texture2D" uid="uid://doo2cxxa2p70a" path="res://entities/plants/assets/sprites/plante-teste.png" id="1_4w77n"] -[ext_resource type="Script" uid="uid://c360ic1aost1n" path="res://entities/plants/scripts/texture_builder/plant_part_scene.gd" id="2_g11v2"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_mypt2"] -atlas = ExtResource("1_4w77n") -region = Rect2(743, 246, 192, 185) - -[node name="Branch4" type="Sprite2D" unique_id=1642167049 node_paths=PackedStringArray("root", "attaches")] -texture = SubResource("AtlasTexture_mypt2") -script = ExtResource("2_g11v2") -root = NodePath("Root") -attaches = [NodePath("Attaches/Attach1"), NodePath("Attaches/Attach3")] -type = 1 -is_back = true - -[node name="Root" type="Node2D" parent="." unique_id=1974108401] -position = Vector2(-30, 56) - -[node name="Attaches" type="Node" parent="." unique_id=2082226435] - -[node name="Attach1" type="Node2D" parent="Attaches" unique_id=861204621] -position = Vector2(1, 27) - -[node name="Attach3" type="Node2D" parent="Attaches" unique_id=482542203] -position = Vector2(43, -54) diff --git a/entities/plants/assets/parts/branches/branch5.tscn b/entities/plants/assets/parts/branches/branch5.tscn deleted file mode 100644 index 5d58387..0000000 --- a/entities/plants/assets/parts/branches/branch5.tscn +++ /dev/null @@ -1,26 +0,0 @@ -[gd_scene format=3 uid="uid://c27tu2a8dklos"] - -[ext_resource type="Texture2D" uid="uid://doo2cxxa2p70a" path="res://entities/plants/assets/sprites/plante-teste.png" id="1_vy86m"] -[ext_resource type="Script" uid="uid://c360ic1aost1n" path="res://entities/plants/scripts/texture_builder/plant_part_scene.gd" id="2_3nniq"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_mypt2"] -atlas = ExtResource("1_vy86m") -region = Rect2(458, 495, 226, 204) - -[node name="Branch5" type="Sprite2D" unique_id=1642167049 node_paths=PackedStringArray("root", "attaches")] -texture = SubResource("AtlasTexture_mypt2") -script = ExtResource("2_3nniq") -root = NodePath("Root") -attaches = [NodePath("Attaches/Attach2"), NodePath("Attaches/Attach3")] -type = 1 - -[node name="Root" type="Node2D" parent="." unique_id=1974108401] -position = Vector2(54, 70) - -[node name="Attaches" type="Node" parent="." unique_id=2082226435] - -[node name="Attach2" type="Node2D" parent="Attaches" unique_id=1344917470] -position = Vector2(18, 6) - -[node name="Attach3" type="Node2D" parent="Attaches" unique_id=482542203] -position = Vector2(-55, -52) diff --git a/entities/plants/assets/parts/branches/branch6.tscn b/entities/plants/assets/parts/branches/branch6.tscn deleted file mode 100644 index 572d510..0000000 --- a/entities/plants/assets/parts/branches/branch6.tscn +++ /dev/null @@ -1,24 +0,0 @@ -[gd_scene format=3 uid="uid://bxs8jmqgpdbm"] - -[ext_resource type="Texture2D" uid="uid://doo2cxxa2p70a" path="res://entities/plants/assets/sprites/plante-teste.png" id="1_pcp5q"] -[ext_resource type="Script" uid="uid://c360ic1aost1n" path="res://entities/plants/scripts/texture_builder/plant_part_scene.gd" id="2_a30kx"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_mypt2"] -atlas = ExtResource("1_pcp5q") -region = Rect2(728, 493, 203, 179) - -[node name="Branch6" type="Sprite2D" unique_id=1642167049 node_paths=PackedStringArray("root", "attaches")] -texture = SubResource("AtlasTexture_mypt2") -script = ExtResource("2_a30kx") -root = NodePath("Root") -attaches = [NodePath("Attaches/Attach1")] -type = 1 -is_back = true - -[node name="Root" type="Node2D" parent="." unique_id=1974108401] -position = Vector2(-36, 59) - -[node name="Attaches" type="Node" parent="." unique_id=2082226435] - -[node name="Attach1" type="Node2D" parent="Attaches" unique_id=861204621] -position = Vector2(16, 27) diff --git a/entities/plants/assets/parts/branches/branch7.tscn b/entities/plants/assets/parts/branches/branch7.tscn deleted file mode 100644 index d9a8b60..0000000 --- a/entities/plants/assets/parts/branches/branch7.tscn +++ /dev/null @@ -1,26 +0,0 @@ -[gd_scene format=3 uid="uid://jsjcxyqt4pnx"] - -[ext_resource type="Texture2D" uid="uid://doo2cxxa2p70a" path="res://entities/plants/assets/sprites/plante-teste.png" id="1_m4np3"] -[ext_resource type="Script" uid="uid://c360ic1aost1n" path="res://entities/plants/scripts/texture_builder/plant_part_scene.gd" id="2_qiogr"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_mypt2"] -atlas = ExtResource("1_m4np3") -region = Rect2(446, 743, 234, 186) - -[node name="Branch7" type="Sprite2D" unique_id=1642167049 node_paths=PackedStringArray("root", "attaches")] -texture = SubResource("AtlasTexture_mypt2") -script = ExtResource("2_qiogr") -root = NodePath("Root") -attaches = [NodePath("Attaches/Attach1"), NodePath("Attaches/Attach3")] -type = 1 - -[node name="Root" type="Node2D" parent="." unique_id=1974108401] -position = Vector2(67, 31) - -[node name="Attaches" type="Node" parent="." unique_id=2082226435] - -[node name="Attach1" type="Node2D" parent="Attaches" unique_id=861204621] -position = Vector2(-4, 14) - -[node name="Attach3" type="Node2D" parent="Attaches" unique_id=482542203] -position = Vector2(-63, -45) diff --git a/entities/plants/assets/parts/branches/branch8.tscn b/entities/plants/assets/parts/branches/branch8.tscn deleted file mode 100644 index a270637..0000000 --- a/entities/plants/assets/parts/branches/branch8.tscn +++ /dev/null @@ -1,27 +0,0 @@ -[gd_scene format=3 uid="uid://eitataf7s4k6"] - -[ext_resource type="Texture2D" uid="uid://doo2cxxa2p70a" path="res://entities/plants/assets/sprites/plante-teste.png" id="1_d00bu"] -[ext_resource type="Script" uid="uid://c360ic1aost1n" path="res://entities/plants/scripts/texture_builder/plant_part_scene.gd" id="2_h1ojo"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_mypt2"] -atlas = ExtResource("1_d00bu") -region = Rect2(714, 787, 187, 129) - -[node name="Branch8" type="Sprite2D" unique_id=1642167049 node_paths=PackedStringArray("root", "attaches")] -texture = SubResource("AtlasTexture_mypt2") -script = ExtResource("2_h1ojo") -root = NodePath("Root") -attaches = [NodePath("Attaches/Attach1"), NodePath("Attaches/Attach3")] -type = 1 -is_back = true - -[node name="Root" type="Node2D" parent="." unique_id=1974108401] -position = Vector2(-55, -5) - -[node name="Attaches" type="Node" parent="." unique_id=2082226435] - -[node name="Attach1" type="Node2D" parent="Attaches" unique_id=861204621] -position = Vector2(-18, 16) - -[node name="Attach3" type="Node2D" parent="Attaches" unique_id=482542203] -position = Vector2(55, 2) diff --git a/entities/plants/assets/parts/branches/branch9.tscn b/entities/plants/assets/parts/branches/branch9.tscn deleted file mode 100644 index 0ea1036..0000000 --- a/entities/plants/assets/parts/branches/branch9.tscn +++ /dev/null @@ -1,26 +0,0 @@ -[gd_scene format=3 uid="uid://00qwec7mi4tx"] - -[ext_resource type="Texture2D" uid="uid://doo2cxxa2p70a" path="res://entities/plants/assets/sprites/plante-teste.png" id="1_02was"] -[ext_resource type="Script" uid="uid://c360ic1aost1n" path="res://entities/plants/scripts/texture_builder/plant_part_scene.gd" id="2_kovt2"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_mypt2"] -atlas = ExtResource("1_02was") -region = Rect2(442, 964, 199, 159) - -[node name="Branch9" type="Sprite2D" unique_id=1642167049 node_paths=PackedStringArray("root", "attaches")] -texture = SubResource("AtlasTexture_mypt2") -script = ExtResource("2_kovt2") -root = NodePath("Root") -attaches = [NodePath("Attaches/Attach2"), NodePath("Attaches/Attach3")] -type = 1 - -[node name="Root" type="Node2D" parent="." unique_id=1974108401] -position = Vector2(67, 23) - -[node name="Attaches" type="Node" parent="." unique_id=2082226435] - -[node name="Attach2" type="Node2D" parent="Attaches" unique_id=1344917470] -position = Vector2(13, 31) - -[node name="Attach3" type="Node2D" parent="Attaches" unique_id=482542203] -position = Vector2(-29, -14) diff --git a/entities/plants/assets/parts/flowers/flower1.tscn b/entities/plants/assets/parts/flowers/flower1.tscn deleted file mode 100644 index 0f6213c..0000000 --- a/entities/plants/assets/parts/flowers/flower1.tscn +++ /dev/null @@ -1,18 +0,0 @@ -[gd_scene format=3 uid="uid://igga16rhmb2p"] - -[ext_resource type="Texture2D" uid="uid://doo2cxxa2p70a" path="res://entities/plants/assets/sprites/plante-teste.png" id="1_h8j1h"] -[ext_resource type="Script" uid="uid://c360ic1aost1n" path="res://entities/plants/scripts/texture_builder/plant_part_scene.gd" id="2_576ug"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_mypt2"] -atlas = ExtResource("1_h8j1h") -region = Rect2(1597, 5, 152, 159) - -[node name="Flower1" type="Sprite2D" unique_id=1642167049 node_paths=PackedStringArray("root")] -texture = SubResource("AtlasTexture_mypt2") -script = ExtResource("2_576ug") -root = NodePath("Root") -type = 3 -branch_attachable = true - -[node name="Root" type="Node2D" parent="." unique_id=1974108401] -position = Vector2(49, 63) diff --git a/entities/plants/assets/parts/flowers/flower2.tscn b/entities/plants/assets/parts/flowers/flower2.tscn deleted file mode 100644 index ab978e8..0000000 --- a/entities/plants/assets/parts/flowers/flower2.tscn +++ /dev/null @@ -1,19 +0,0 @@ -[gd_scene format=3 uid="uid://p2rqflone1dw"] - -[ext_resource type="Texture2D" uid="uid://doo2cxxa2p70a" path="res://entities/plants/assets/sprites/plante-teste.png" id="1_omwjf"] -[ext_resource type="Script" uid="uid://c360ic1aost1n" path="res://entities/plants/scripts/texture_builder/plant_part_scene.gd" id="2_tojtt"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_mypt2"] -atlas = ExtResource("1_omwjf") -region = Rect2(1746, 8, 116, 165) - -[node name="Flower2" type="Sprite2D" unique_id=1642167049 node_paths=PackedStringArray("root")] -texture = SubResource("AtlasTexture_mypt2") -script = ExtResource("2_tojtt") -root = NodePath("Root") -type = 3 -is_back = true -branch_attachable = true - -[node name="Root" type="Node2D" parent="." unique_id=1974108401] -position = Vector2(23, 67) diff --git a/entities/plants/assets/parts/flowers/flower3.tscn b/entities/plants/assets/parts/flowers/flower3.tscn deleted file mode 100644 index 7c1fa5b..0000000 --- a/entities/plants/assets/parts/flowers/flower3.tscn +++ /dev/null @@ -1,18 +0,0 @@ -[gd_scene format=3 uid="uid://c0j6kgyxq3bdl"] - -[ext_resource type="Texture2D" uid="uid://doo2cxxa2p70a" path="res://entities/plants/assets/sprites/plante-teste.png" id="1_bx5it"] -[ext_resource type="Script" uid="uid://c360ic1aost1n" path="res://entities/plants/scripts/texture_builder/plant_part_scene.gd" id="2_ycdem"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_mypt2"] -atlas = ExtResource("1_bx5it") -region = Rect2(1884, 8, 83, 202) - -[node name="Flower3" type="Sprite2D" unique_id=1642167049 node_paths=PackedStringArray("root")] -texture = SubResource("AtlasTexture_mypt2") -script = ExtResource("2_ycdem") -root = NodePath("Root") -type = 3 -branch_attachable = true - -[node name="Root" type="Node2D" parent="." unique_id=1974108401] -position = Vector2(11, 72) diff --git a/entities/plants/assets/parts/flowers/flower4.tscn b/entities/plants/assets/parts/flowers/flower4.tscn deleted file mode 100644 index a17771f..0000000 --- a/entities/plants/assets/parts/flowers/flower4.tscn +++ /dev/null @@ -1,18 +0,0 @@ -[gd_scene format=3 uid="uid://bs3p5i88udxwf"] - -[ext_resource type="Texture2D" uid="uid://doo2cxxa2p70a" path="res://entities/plants/assets/sprites/plante-teste.png" id="1_5sg8w"] -[ext_resource type="Script" uid="uid://c360ic1aost1n" path="res://entities/plants/scripts/texture_builder/plant_part_scene.gd" id="2_3qkcn"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_mypt2"] -atlas = ExtResource("1_5sg8w") -region = Rect2(1995, 32, 103, 187) - -[node name="Flower4" type="Sprite2D" unique_id=1642167049 node_paths=PackedStringArray("root")] -texture = SubResource("AtlasTexture_mypt2") -script = ExtResource("2_3qkcn") -root = NodePath("Root") -type = 3 -branch_attachable = true - -[node name="Root" type="Node2D" parent="." unique_id=1974108401] -position = Vector2(-13, 76) diff --git a/entities/plants/assets/parts/leaves/leaf1.tscn b/entities/plants/assets/parts/leaves/leaf1.tscn deleted file mode 100644 index dee45b7..0000000 --- a/entities/plants/assets/parts/leaves/leaf1.tscn +++ /dev/null @@ -1,19 +0,0 @@ -[gd_scene format=3 uid="uid://b5ud2u5r4vkot"] - -[ext_resource type="Texture2D" uid="uid://doo2cxxa2p70a" path="res://entities/plants/assets/sprites/plante-teste.png" id="1_51s53"] -[ext_resource type="Script" uid="uid://c360ic1aost1n" path="res://entities/plants/scripts/texture_builder/plant_part_scene.gd" id="2_u8l10"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_mypt2"] -atlas = ExtResource("1_51s53") -region = Rect2(1108, 8, 123, 149) - -[node name="Leaf1" type="Sprite2D" unique_id=1642167049 node_paths=PackedStringArray("root")] -texture = SubResource("AtlasTexture_mypt2") -script = ExtResource("2_u8l10") -root = NodePath("Root") -type = 2 -base_attachable = true -bottom_attachable = true - -[node name="Root" type="Node2D" parent="." unique_id=1974108401] -position = Vector2(27, 42) diff --git a/entities/plants/assets/parts/leaves/leaf10.tscn b/entities/plants/assets/parts/leaves/leaf10.tscn deleted file mode 100644 index 56c6658..0000000 --- a/entities/plants/assets/parts/leaves/leaf10.tscn +++ /dev/null @@ -1,19 +0,0 @@ -[gd_scene format=3 uid="uid://xofvb6wh38j4"] - -[ext_resource type="Texture2D" uid="uid://doo2cxxa2p70a" path="res://entities/plants/assets/sprites/plante-teste.png" id="1_vsype"] -[ext_resource type="Script" uid="uid://c360ic1aost1n" path="res://entities/plants/scripts/texture_builder/plant_part_scene.gd" id="2_y1jlv"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_mypt2"] -atlas = ExtResource("1_vsype") -region = Rect2(1281, 504, 72, 89) - -[node name="Leaf10" type="Sprite2D" unique_id=1642167049 node_paths=PackedStringArray("root")] -texture = SubResource("AtlasTexture_mypt2") -script = ExtResource("2_y1jlv") -root = NodePath("Root") -type = 2 -base_attachable = true -branch_attachable = true - -[node name="Root" type="Node2D" parent="." unique_id=1974108401] -position = Vector2(-10, 34) diff --git a/entities/plants/assets/parts/leaves/leaf11.tscn b/entities/plants/assets/parts/leaves/leaf11.tscn deleted file mode 100644 index f79a933..0000000 --- a/entities/plants/assets/parts/leaves/leaf11.tscn +++ /dev/null @@ -1,19 +0,0 @@ -[gd_scene format=3 uid="uid://d3goxclh7xwf8"] - -[ext_resource type="Texture2D" uid="uid://doo2cxxa2p70a" path="res://entities/plants/assets/sprites/plante-teste.png" id="1_rgg5m"] -[ext_resource type="Script" uid="uid://c360ic1aost1n" path="res://entities/plants/scripts/texture_builder/plant_part_scene.gd" id="2_2scxq"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_mypt2"] -atlas = ExtResource("1_rgg5m") -region = Rect2(1251, 600, 74, 95) - -[node name="Leaf11" type="Sprite2D" unique_id=1642167049 node_paths=PackedStringArray("root")] -texture = SubResource("AtlasTexture_mypt2") -script = ExtResource("2_2scxq") -root = NodePath("Root") -type = 2 -base_attachable = true -branch_attachable = true - -[node name="Root" type="Node2D" parent="." unique_id=1974108401] -position = Vector2(-16, 32) diff --git a/entities/plants/assets/parts/leaves/leaf12.tscn b/entities/plants/assets/parts/leaves/leaf12.tscn deleted file mode 100644 index 8becb00..0000000 --- a/entities/plants/assets/parts/leaves/leaf12.tscn +++ /dev/null @@ -1,19 +0,0 @@ -[gd_scene format=3 uid="uid://b514ksdyr8yoy"] - -[ext_resource type="Texture2D" uid="uid://doo2cxxa2p70a" path="res://entities/plants/assets/sprites/plante-teste.png" id="1_f6q5d"] -[ext_resource type="Script" uid="uid://c360ic1aost1n" path="res://entities/plants/scripts/texture_builder/plant_part_scene.gd" id="2_ntcb1"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_mypt2"] -atlas = ExtResource("1_f6q5d") -region = Rect2(1419, 499, 195, 198) - -[node name="Leaf12" type="Sprite2D" unique_id=1642167049 node_paths=PackedStringArray("root")] -texture = SubResource("AtlasTexture_mypt2") -script = ExtResource("2_ntcb1") -root = NodePath("Root") -type = 2 -base_attachable = true -branch_attachable = true - -[node name="Root" type="Node2D" parent="." unique_id=1974108401] -position = Vector2(-58, 75) diff --git a/entities/plants/assets/parts/leaves/leaf13.tscn b/entities/plants/assets/parts/leaves/leaf13.tscn deleted file mode 100644 index 2371443..0000000 --- a/entities/plants/assets/parts/leaves/leaf13.tscn +++ /dev/null @@ -1,19 +0,0 @@ -[gd_scene format=3 uid="uid://jb5gaxtxi0k7"] - -[ext_resource type="Texture2D" uid="uid://doo2cxxa2p70a" path="res://entities/plants/assets/sprites/plante-teste.png" id="1_uojqd"] -[ext_resource type="Script" uid="uid://c360ic1aost1n" path="res://entities/plants/scripts/texture_builder/plant_part_scene.gd" id="2_fj2sx"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_mypt2"] -atlas = ExtResource("1_uojqd") -region = Rect2(952, 728, 189, 168) - -[node name="Leaf13" type="Sprite2D" unique_id=1642167049 node_paths=PackedStringArray("root")] -texture = SubResource("AtlasTexture_mypt2") -script = ExtResource("2_fj2sx") -root = NodePath("Root") -type = 2 -base_attachable = true -branch_attachable = true - -[node name="Root" type="Node2D" parent="." unique_id=1974108401] -position = Vector2(70, -55) diff --git a/entities/plants/assets/parts/leaves/leaf14.tscn b/entities/plants/assets/parts/leaves/leaf14.tscn deleted file mode 100644 index d48f592..0000000 --- a/entities/plants/assets/parts/leaves/leaf14.tscn +++ /dev/null @@ -1,19 +0,0 @@ -[gd_scene format=3 uid="uid://cw8ms5u42gtx8"] - -[ext_resource type="Texture2D" uid="uid://doo2cxxa2p70a" path="res://entities/plants/assets/sprites/plante-teste.png" id="1_abo07"] -[ext_resource type="Script" uid="uid://c360ic1aost1n" path="res://entities/plants/scripts/texture_builder/plant_part_scene.gd" id="2_178l0"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_mypt2"] -atlas = ExtResource("1_abo07") -region = Rect2(1178, 720, 110, 95) - -[node name="Leaf14" type="Sprite2D" unique_id=1642167049 node_paths=PackedStringArray("root")] -texture = SubResource("AtlasTexture_mypt2") -script = ExtResource("2_178l0") -root = NodePath("Root") -type = 2 -base_attachable = true -branch_attachable = true - -[node name="Root" type="Node2D" parent="." unique_id=1974108401] -position = Vector2(25, 0) diff --git a/entities/plants/assets/parts/leaves/leaf15.tscn b/entities/plants/assets/parts/leaves/leaf15.tscn deleted file mode 100644 index f250466..0000000 --- a/entities/plants/assets/parts/leaves/leaf15.tscn +++ /dev/null @@ -1,19 +0,0 @@ -[gd_scene format=3 uid="uid://dlam7tfjtv1j"] - -[ext_resource type="Texture2D" uid="uid://doo2cxxa2p70a" path="res://entities/plants/assets/sprites/plante-teste.png" id="1_v1s66"] -[ext_resource type="Script" uid="uid://c360ic1aost1n" path="res://entities/plants/scripts/texture_builder/plant_part_scene.gd" id="2_dmaav"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_mypt2"] -atlas = ExtResource("1_v1s66") -region = Rect2(1292, 810, 104, 95) - -[node name="Leaf15" type="Sprite2D" unique_id=1642167049 node_paths=PackedStringArray("root")] -texture = SubResource("AtlasTexture_mypt2") -script = ExtResource("2_dmaav") -root = NodePath("Root") -type = 2 -base_attachable = true -branch_attachable = true - -[node name="Root" type="Node2D" parent="." unique_id=1974108401] -position = Vector2(-32, 5) diff --git a/entities/plants/assets/parts/leaves/leaf16.tscn b/entities/plants/assets/parts/leaves/leaf16.tscn deleted file mode 100644 index 25491fd..0000000 --- a/entities/plants/assets/parts/leaves/leaf16.tscn +++ /dev/null @@ -1,19 +0,0 @@ -[gd_scene format=3 uid="uid://dqhouqmkaqm2h"] - -[ext_resource type="Texture2D" uid="uid://doo2cxxa2p70a" path="res://entities/plants/assets/sprites/plante-teste.png" id="1_h2cjx"] -[ext_resource type="Script" uid="uid://c360ic1aost1n" path="res://entities/plants/scripts/texture_builder/plant_part_scene.gd" id="2_ufp0p"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_mypt2"] -atlas = ExtResource("1_h2cjx") -region = Rect2(1390, 745, 241, 143) - -[node name="Leaf16" type="Sprite2D" unique_id=1642167049 node_paths=PackedStringArray("root")] -texture = SubResource("AtlasTexture_mypt2") -script = ExtResource("2_ufp0p") -root = NodePath("Root") -type = 2 -base_attachable = true -branch_attachable = true - -[node name="Root" type="Node2D" parent="." unique_id=1974108401] -position = Vector2(-86, 28) diff --git a/entities/plants/assets/parts/leaves/leaf2.tscn b/entities/plants/assets/parts/leaves/leaf2.tscn deleted file mode 100644 index 3395267..0000000 --- a/entities/plants/assets/parts/leaves/leaf2.tscn +++ /dev/null @@ -1,19 +0,0 @@ -[gd_scene format=3 uid="uid://mm1xq416h68n"] - -[ext_resource type="Texture2D" uid="uid://doo2cxxa2p70a" path="res://entities/plants/assets/sprites/plante-teste.png" id="1_k7s2y"] -[ext_resource type="Script" uid="uid://c360ic1aost1n" path="res://entities/plants/scripts/texture_builder/plant_part_scene.gd" id="2_7860x"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_mypt2"] -atlas = ExtResource("1_k7s2y") -region = Rect2(1230, 79, 81, 132) - -[node name="Leaf2" type="Sprite2D" unique_id=1642167049 node_paths=PackedStringArray("root")] -texture = SubResource("AtlasTexture_mypt2") -script = ExtResource("2_7860x") -root = NodePath("Root") -type = 2 -base_attachable = true -bottom_attachable = true - -[node name="Root" type="Node2D" parent="." unique_id=1974108401] -position = Vector2(1, 48) diff --git a/entities/plants/assets/parts/leaves/leaf3.tscn b/entities/plants/assets/parts/leaves/leaf3.tscn deleted file mode 100644 index 725836e..0000000 --- a/entities/plants/assets/parts/leaves/leaf3.tscn +++ /dev/null @@ -1,19 +0,0 @@ -[gd_scene format=3 uid="uid://y3n410d566at"] - -[ext_resource type="Texture2D" uid="uid://doo2cxxa2p70a" path="res://entities/plants/assets/sprites/plante-teste.png" id="1_gaifj"] -[ext_resource type="Script" uid="uid://c360ic1aost1n" path="res://entities/plants/scripts/texture_builder/plant_part_scene.gd" id="2_v2pdq"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_mypt2"] -atlas = ExtResource("1_gaifj") -region = Rect2(1302, 15, 87, 114) - -[node name="Leaf3" type="Sprite2D" unique_id=1642167049 node_paths=PackedStringArray("root")] -texture = SubResource("AtlasTexture_mypt2") -script = ExtResource("2_v2pdq") -root = NodePath("Root") -type = 2 -base_attachable = true -bottom_attachable = true - -[node name="Root" type="Node2D" parent="." unique_id=1974108401] -position = Vector2(-18, 46) diff --git a/entities/plants/assets/parts/leaves/leaf4.tscn b/entities/plants/assets/parts/leaves/leaf4.tscn deleted file mode 100644 index cf2aac7..0000000 --- a/entities/plants/assets/parts/leaves/leaf4.tscn +++ /dev/null @@ -1,19 +0,0 @@ -[gd_scene format=3 uid="uid://cggirl3tlcrkc"] - -[ext_resource type="Texture2D" uid="uid://doo2cxxa2p70a" path="res://entities/plants/assets/sprites/plante-teste.png" id="1_w7dup"] -[ext_resource type="Script" uid="uid://c360ic1aost1n" path="res://entities/plants/scripts/texture_builder/plant_part_scene.gd" id="2_lglen"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_mypt2"] -atlas = ExtResource("1_w7dup") -region = Rect2(926, 108, 226, 322) - -[node name="Leaf4" type="Sprite2D" unique_id=1642167049 node_paths=PackedStringArray("root")] -texture = SubResource("AtlasTexture_mypt2") -script = ExtResource("2_lglen") -root = NodePath("Root") -type = 2 -base_attachable = true -bottom_attachable = true - -[node name="Root" type="Node2D" parent="." unique_id=1974108401] -position = Vector2(80, 133) diff --git a/entities/plants/assets/parts/leaves/leaf5.tscn b/entities/plants/assets/parts/leaves/leaf5.tscn deleted file mode 100644 index 55fc149..0000000 --- a/entities/plants/assets/parts/leaves/leaf5.tscn +++ /dev/null @@ -1,19 +0,0 @@ -[gd_scene format=3 uid="uid://dx7trhqjvnk6u"] - -[ext_resource type="Texture2D" uid="uid://doo2cxxa2p70a" path="res://entities/plants/assets/sprites/plante-teste.png" id="1_q3dfd"] -[ext_resource type="Script" uid="uid://c360ic1aost1n" path="res://entities/plants/scripts/texture_builder/plant_part_scene.gd" id="2_ju2wc"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_mypt2"] -atlas = ExtResource("1_q3dfd") -region = Rect2(1154, 230, 137, 215) - -[node name="Leaf5" type="Sprite2D" unique_id=1642167049 node_paths=PackedStringArray("root")] -texture = SubResource("AtlasTexture_mypt2") -script = ExtResource("2_ju2wc") -root = NodePath("Root") -type = 2 -base_attachable = true -bottom_attachable = true - -[node name="Root" type="Node2D" parent="." unique_id=1974108401] -position = Vector2(40, 74) diff --git a/entities/plants/assets/parts/leaves/leaf6.tscn b/entities/plants/assets/parts/leaves/leaf6.tscn deleted file mode 100644 index 0156608..0000000 --- a/entities/plants/assets/parts/leaves/leaf6.tscn +++ /dev/null @@ -1,19 +0,0 @@ -[gd_scene format=3 uid="uid://cr1sdb0k2g2qe"] - -[ext_resource type="Texture2D" uid="uid://doo2cxxa2p70a" path="res://entities/plants/assets/sprites/plante-teste.png" id="1_hkjyp"] -[ext_resource type="Script" uid="uid://c360ic1aost1n" path="res://entities/plants/scripts/texture_builder/plant_part_scene.gd" id="2_71udn"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_mypt2"] -atlas = ExtResource("1_hkjyp") -region = Rect2(1306, 214, 107, 221) - -[node name="Leaf6" type="Sprite2D" unique_id=1642167049 node_paths=PackedStringArray("root")] -texture = SubResource("AtlasTexture_mypt2") -script = ExtResource("2_71udn") -root = NodePath("Root") -type = 2 -base_attachable = true -bottom_attachable = true - -[node name="Root" type="Node2D" parent="." unique_id=1974108401] -position = Vector2(-28, 91) diff --git a/entities/plants/assets/parts/leaves/leaf7.tscn b/entities/plants/assets/parts/leaves/leaf7.tscn deleted file mode 100644 index af98ffe..0000000 --- a/entities/plants/assets/parts/leaves/leaf7.tscn +++ /dev/null @@ -1,19 +0,0 @@ -[gd_scene format=3 uid="uid://n8ex548mgcn2"] - -[ext_resource type="Texture2D" uid="uid://doo2cxxa2p70a" path="res://entities/plants/assets/sprites/plante-teste.png" id="1_c5eyt"] -[ext_resource type="Script" uid="uid://c360ic1aost1n" path="res://entities/plants/scripts/texture_builder/plant_part_scene.gd" id="2_7827q"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_mypt2"] -atlas = ExtResource("1_c5eyt") -region = Rect2(1431, 134, 191, 287) - -[node name="Leaf7" type="Sprite2D" unique_id=1642167049 node_paths=PackedStringArray("root")] -texture = SubResource("AtlasTexture_mypt2") -script = ExtResource("2_7827q") -root = NodePath("Root") -type = 2 -base_attachable = true -bottom_attachable = true - -[node name="Root" type="Node2D" parent="." unique_id=1974108401] -position = Vector2(-58, 109) diff --git a/entities/plants/assets/parts/leaves/leaf8.tscn b/entities/plants/assets/parts/leaves/leaf8.tscn deleted file mode 100644 index 1217db5..0000000 --- a/entities/plants/assets/parts/leaves/leaf8.tscn +++ /dev/null @@ -1,19 +0,0 @@ -[gd_scene format=3 uid="uid://crjfnk5ykoxle"] - -[ext_resource type="Texture2D" uid="uid://doo2cxxa2p70a" path="res://entities/plants/assets/sprites/plante-teste.png" id="1_3syoa"] -[ext_resource type="Script" uid="uid://c360ic1aost1n" path="res://entities/plants/scripts/texture_builder/plant_part_scene.gd" id="2_qp4xg"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_mypt2"] -atlas = ExtResource("1_3syoa") -region = Rect2(974, 502, 200, 162) - -[node name="Leaf8" type="Sprite2D" unique_id=1642167049 node_paths=PackedStringArray("root")] -texture = SubResource("AtlasTexture_mypt2") -script = ExtResource("2_qp4xg") -root = NodePath("Root") -type = 2 -base_attachable = true -branch_attachable = true - -[node name="Root" type="Node2D" parent="." unique_id=1974108401] -position = Vector2(73, 47) diff --git a/entities/plants/assets/parts/leaves/leaf9.tscn b/entities/plants/assets/parts/leaves/leaf9.tscn deleted file mode 100644 index b2f026c..0000000 --- a/entities/plants/assets/parts/leaves/leaf9.tscn +++ /dev/null @@ -1,20 +0,0 @@ -[gd_scene format=3 uid="uid://b5fxgs4ua0ejt"] - -[ext_resource type="Texture2D" uid="uid://doo2cxxa2p70a" path="res://entities/plants/assets/sprites/plante-teste.png" id="1_3x1s6"] -[ext_resource type="Script" uid="uid://c360ic1aost1n" path="res://entities/plants/scripts/texture_builder/plant_part_scene.gd" id="2_7ofcs"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_mypt2"] -atlas = ExtResource("1_3x1s6") -region = Rect2(1171, 488, 94, 104) - -[node name="Leaf9" type="Sprite2D" unique_id=1642167049 node_paths=PackedStringArray("root")] -texture = SubResource("AtlasTexture_mypt2") -script = ExtResource("2_7ofcs") -root = NodePath("Root") -type = 2 -is_back = true -base_attachable = true -branch_attachable = true - -[node name="Root" type="Node2D" parent="." unique_id=1974108401] -position = Vector2(23, 37) diff --git a/entities/plants/plant_part_buider.tscn b/entities/plants/plant_part_buider.tscn new file mode 100644 index 0000000..7c285c0 --- /dev/null +++ b/entities/plants/plant_part_buider.tscn @@ -0,0 +1,30 @@ +[gd_scene format=3 uid="uid://cg6r56x11bvk2"] + +[ext_resource type="Texture2D" uid="uid://doo2cxxa2p70a" path="res://entities/plants/assets/sprites/plante-teste.png" id="1_8nppj"] +[ext_resource type="Script" uid="uid://c360ic1aost1n" path="res://entities/plants/scripts/texture_builder/plant_part_builder.gd" id="2_a5yje"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_mypt2"] +atlas = ExtResource("1_8nppj") +region = Rect2(450, 1656, 194, 235) + +[node name="Base1" type="Sprite2D" unique_id=1642167049 node_paths=PackedStringArray("root", "attaches", "bottom_attaches")] +texture = SubResource("AtlasTexture_mypt2") +script = ExtResource("2_a5yje") +part_name = "Branch15" +root = NodePath("Root") +attaches = NodePath("Attaches") +bottom_attaches = NodePath("BottomAttaches") +type = 1 + +[node name="Root" type="Node2D" parent="." unique_id=1974108401] +position = Vector2(33, 85) + +[node name="Attaches" type="Node" parent="." unique_id=2082226435] + +[node name="attach0" type="Node2D" parent="Attaches" unique_id=43079773] +position = Vector2(-6, 19) + +[node name="attach1" type="Node2D" parent="Attaches" unique_id=950516844] +position = Vector2(-33, -25) + +[node name="BottomAttaches" type="Node" parent="." unique_id=456407982] diff --git a/entities/plants/plant_sprite.tscn b/entities/plants/plant_sprite.tscn index 93de5ee..d9934a7 100644 --- a/entities/plants/plant_sprite.tscn +++ b/entities/plants/plant_sprite.tscn @@ -2,6 +2,51 @@ [ext_resource type="Script" uid="uid://bmjjpk4lvijws" path="res://entities/plants/scripts/plant_sprite.gd" id="1_pq8o7"] [ext_resource type="Texture2D" uid="uid://pltmnkqd5ut2" path="res://entities/plants/assets/sprites/seeds/grille_seeds.png" id="3_j6jm5"] +[ext_resource type="Script" uid="uid://dt2ip3pw2cboy" path="res://entities/plants/scripts/texture_builder/texture_builder.gd" id="3_rbgiq"] +[ext_resource type="Script" uid="uid://b3jwglylqdqtw" path="res://entities/plants/scripts/texture_builder/plant_part.gd" id="4_mielr"] +[ext_resource type="Texture2D" uid="uid://doo2cxxa2p70a" path="res://entities/plants/assets/sprites/plante-teste.png" id="5_qp2py"] +[ext_resource type="Resource" uid="uid://7hrdkl6bf3o4" path="res://entities/plants/resources/plant_parts/Branch1.tres" id="8_i5o73"] +[ext_resource type="Resource" uid="uid://ceisi5yyie7to" path="res://entities/plants/resources/plant_parts/Branch2.tres" id="9_mlxcy"] +[ext_resource type="Resource" uid="uid://cxiu8frk04b5i" path="res://entities/plants/resources/plant_parts/Branch3.tres" id="10_n3d4s"] +[ext_resource type="Resource" uid="uid://53p5g07e3pb4" path="res://entities/plants/resources/plant_parts/Branch4.tres" id="11_pggx4"] +[ext_resource type="Resource" uid="uid://d2y7o2hc6ffei" path="res://entities/plants/resources/plant_parts/Branch11.tres" id="14_2krt4"] +[ext_resource type="Resource" uid="uid://civ4gr1c2pq7g" path="res://entities/plants/resources/plant_parts/Branch12.tres" id="15_qkfpr"] +[ext_resource type="Resource" uid="uid://bqfocs6f0iypo" path="res://entities/plants/resources/plant_parts/Branch13.tres" id="16_jm13q"] +[ext_resource type="Resource" uid="uid://drml5dm8i3j3a" path="res://entities/plants/resources/plant_parts/Branch14.tres" id="17_5vody"] +[ext_resource type="Resource" uid="uid://b1t5nfwcln5vo" path="res://entities/plants/resources/plant_parts/Branch15.tres" id="18_tp5s5"] +[ext_resource type="Resource" uid="uid://b4s58a600q2rn" path="res://entities/plants/resources/plant_parts/Branch16.tres" id="19_httlt"] +[ext_resource type="Resource" uid="uid://dspugxsjw2aea" path="res://entities/plants/resources/plant_parts/Branch17.tres" id="20_y3j8r"] +[ext_resource type="Resource" uid="uid://cnt38l2fmg8d7" path="res://entities/plants/resources/plant_parts/Branch18.tres" id="21_yl2lr"] +[ext_resource type="Script" uid="uid://cfjd8jelpm8dt" path="res://entities/plants/scripts/texture_builder/part_mutation_association.gd" id="23_5ma63"] +[ext_resource type="Resource" uid="uid://wxqxm6d5twdh" path="res://entities/plants/resources/plant_parts/Leaf8.tres" id="25_ago21"] +[ext_resource type="Resource" uid="uid://uoikjpno37bi" path="res://entities/plants/resources/plant_parts/Leaf9.tres" id="26_yy0xk"] +[ext_resource type="Resource" uid="uid://c5gqwck2p5h5n" path="res://entities/plants/resources/plant_parts/Leaf10.tres" id="27_xa5is"] +[ext_resource type="Resource" uid="uid://c5fj1cw0f4mu6" path="res://entities/plants/resources/plant_parts/Leaf11.tres" id="28_4tlyl"] +[ext_resource type="Resource" uid="uid://dce788f0adauv" path="res://entities/plants/resources/plant_parts/Leaf12.tres" id="29_33ad2"] +[ext_resource type="Resource" uid="uid://dd34dikqoynp3" path="res://entities/plants/resources/plant_parts/Leaf13.tres" id="30_1yhpj"] +[ext_resource type="Resource" uid="uid://bynje6g2wvuvl" path="res://entities/plants/resources/plant_parts/Leaf14.tres" id="31_x644d"] +[ext_resource type="Resource" uid="uid://bd2op6q1masjt" path="res://entities/plants/resources/plant_parts/Leaf15.tres" id="32_xm2g6"] +[ext_resource type="Resource" uid="uid://bvajuw0r47edw" path="res://entities/plants/resources/plant_parts/Leaf16.tres" id="33_3odm8"] +[ext_resource type="Resource" uid="uid://cxgw1vgket0fw" path="res://entities/plants/resources/plant_parts/Leaf1.tres" id="35_6wvjn"] +[ext_resource type="Resource" uid="uid://qb6bftgq0n6y" path="res://entities/plants/resources/plant_parts/Leaf2.tres" id="36_4rw8q"] +[ext_resource type="Resource" uid="uid://ft112n57di0e" path="res://entities/plants/resources/plant_parts/Leaf3.tres" id="37_xa5pt"] +[ext_resource type="Resource" uid="uid://dwjj6qmcjhn68" path="res://entities/plants/resources/plant_parts/Leaf4.tres" id="38_os6x4"] +[ext_resource type="Resource" uid="uid://bkr70mstyf8pp" path="res://entities/plants/resources/plant_parts/Leaf5.tres" id="39_xqcyr"] +[ext_resource type="Resource" uid="uid://dcuwupmqt34ju" path="res://entities/plants/resources/plant_parts/Leaf6.tres" id="40_rb075"] +[ext_resource type="Resource" uid="uid://djmidq7yq452i" path="res://entities/plants/resources/plant_parts/Leaf7.tres" id="41_hjug4"] +[ext_resource type="Resource" uid="uid://brmd6d3l8trqs" path="res://entities/plants/resources/plant_parts/BottomLeaf1.tres" id="43_8s0i3"] +[ext_resource type="Resource" uid="uid://cfr33014u7ig5" path="res://entities/plants/resources/plant_parts/BottomLeaf2.tres" id="44_4htm6"] +[ext_resource type="Resource" uid="uid://cf70m1us8mfqp" path="res://entities/plants/resources/plant_parts/BottomLeaf3.tres" id="45_qqvi0"] +[ext_resource type="Resource" uid="uid://ctlmah4ohqp25" path="res://entities/plants/resources/plant_parts/BottomLeaf4.tres" id="46_nv5ww"] +[ext_resource type="Resource" uid="uid://b8o4q0hsm84ov" path="res://entities/plants/resources/plant_parts/BottomLeaf5.tres" id="47_qtimw"] +[ext_resource type="Resource" uid="uid://bb33v756anesy" path="res://entities/plants/resources/plant_parts/BottomLeaf6.tres" id="48_17fv1"] +[ext_resource type="Resource" uid="uid://cbqrl72y0d1yg" path="res://entities/plants/resources/plant_parts/BottomLeaf7.tres" id="49_4ca6c"] +[ext_resource type="Resource" uid="uid://dwppani7gyjl5" path="res://entities/plants/resources/plant_parts/BottomLeaf8.tres" id="50_y0q20"] +[ext_resource type="Resource" uid="uid://dkta1u1u0efxk" path="res://entities/plants/resources/plant_parts/BottomLeaf9.tres" id="51_xqh3x"] +[ext_resource type="Resource" uid="uid://crmvc77bqax1y" path="res://entities/plants/resources/plant_parts/Flower1.tres" id="53_noro7"] +[ext_resource type="Resource" uid="uid://c0hr7icfkjkoi" path="res://entities/plants/resources/plant_parts/Flower2.tres" id="54_gum4r"] +[ext_resource type="Resource" uid="uid://clkoc1iccts2w" path="res://entities/plants/resources/plant_parts/Flower3.tres" id="55_rpf60"] +[ext_resource type="Resource" uid="uid://bd8yapi1pokj6" path="res://entities/plants/resources/plant_parts/Flower4.tres" id="56_4uud5"] [sub_resource type="AtlasTexture" id="AtlasTexture_wyuub"] atlas = ExtResource("3_j6jm5") @@ -97,13 +142,69 @@ _data = { &"harvest": SubResource("Animation_rbgiq") } +[sub_resource type="AtlasTexture" id="AtlasTexture_mypt2"] +atlas = ExtResource("5_qp2py") +region = Rect2(46, 30, 308, 671) + +[sub_resource type="Resource" id="Resource_rxp60"] +script = ExtResource("4_mielr") +texture = SubResource("AtlasTexture_mypt2") +root = Vector2(14, 263) +attaches = Array[Vector2]([Vector2(79, 83), Vector2(0, -251)]) +bottom_attaches = Array[Vector2]([Vector2(48, 293), Vector2(-13, 287)]) + +[sub_resource type="AtlasTexture" id="AtlasTexture_qq0j0"] +atlas = ExtResource("5_qp2py") +region = Rect2(58, 1268, 141, 393) + +[sub_resource type="Resource" id="Resource_qp2py"] +script = ExtResource("4_mielr") +texture = SubResource("AtlasTexture_qq0j0") +root = Vector2(7, 156) +attaches = Array[Vector2]([Vector2(0, 52), Vector2(19, -149)]) +bottom_attaches = Array[Vector2]([Vector2(21, 161), Vector2(-7, 162)]) + +[sub_resource type="AtlasTexture" id="AtlasTexture_krt02"] +atlas = ExtResource("5_qp2py") +region = Rect2(223, 1265, 200, 386) + +[sub_resource type="Resource" id="Resource_lxgri"] +script = ExtResource("4_mielr") +texture = SubResource("AtlasTexture_krt02") +root = Vector2(31, 158) +attaches = Array[Vector2]([Vector2(0, 31), Vector2(-42, -156)]) +bottom_attaches = Array[Vector2]([Vector2(49, 165), Vector2(19, 169)]) + +[sub_resource type="Resource" id="Resource_x75j3"] +script = ExtResource("23_5ma63") +parts = Array[ExtResource("4_mielr")]([ExtResource("25_ago21"), ExtResource("26_yy0xk"), ExtResource("27_xa5is"), ExtResource("28_4tlyl"), ExtResource("29_33ad2"), ExtResource("30_1yhpj"), ExtResource("31_x644d"), ExtResource("32_xm2g6"), ExtResource("33_3odm8")]) +part_amount = 2 +metadata/_custom_type_script = "uid://cfjd8jelpm8dt" + +[sub_resource type="Resource" id="Resource_setyo"] +script = ExtResource("23_5ma63") +parts = Array[ExtResource("4_mielr")]([ExtResource("35_6wvjn"), ExtResource("36_4rw8q"), ExtResource("37_xa5pt"), ExtResource("38_os6x4"), ExtResource("39_xqcyr"), ExtResource("40_rb075"), ExtResource("41_hjug4")]) +part_amount = 2 +metadata/_custom_type_script = "uid://cfjd8jelpm8dt" + +[sub_resource type="Resource" id="Resource_n40r1"] +script = ExtResource("23_5ma63") +parts = Array[ExtResource("4_mielr")]([ExtResource("53_noro7"), ExtResource("54_gum4r"), ExtResource("55_rpf60"), ExtResource("56_4uud5")]) +part_amount = 2 +metadata/_custom_type_script = "uid://cfjd8jelpm8dt" + +[sub_resource type="Resource" id="Resource_pw6ot"] +script = ExtResource("23_5ma63") +parts = Array[ExtResource("4_mielr")]([ExtResource("43_8s0i3"), ExtResource("44_4htm6"), ExtResource("45_qqvi0"), ExtResource("46_nv5ww"), ExtResource("47_qtimw"), ExtResource("48_17fv1"), ExtResource("49_4ca6c"), ExtResource("50_y0q20"), ExtResource("51_xqh3x")]) +part_amount = 2 +metadata/_custom_type_script = "uid://cfjd8jelpm8dt" + [node name="PlantSprite" type="Node2D" unique_id=1274989778] script = ExtResource("1_pq8o7") [node name="Sprite" type="Sprite2D" parent="." unique_id=1693882598] unique_name_in_owner = true scale = Vector2(0.15, 0.15) -offset = Vector2(0, -151.56) [node name="PlantedSeed" type="Sprite2D" parent="Sprite" unique_id=1134686525] unique_name_in_owner = true @@ -116,3 +217,16 @@ region_filter_clip_enabled = true [node name="AnimationPlayer" type="AnimationPlayer" parent="." unique_id=1793068152] unique_name_in_owner = true libraries/ = SubResource("AnimationLibrary_8eofq") + +[node name="TextureBuilder" type="Node" parent="." unique_id=1481590638] +unique_name_in_owner = true +script = ExtResource("3_rbgiq") +bases = Array[ExtResource("4_mielr")]([SubResource("Resource_rxp60"), SubResource("Resource_qp2py"), SubResource("Resource_lxgri")]) +branches = Array[ExtResource("4_mielr")]([ExtResource("8_i5o73"), ExtResource("9_mlxcy"), ExtResource("10_n3d4s"), ExtResource("11_pggx4"), ExtResource("14_2krt4"), ExtResource("15_qkfpr"), ExtResource("16_jm13q"), ExtResource("17_5vody"), ExtResource("18_tp5s5"), ExtResource("19_httlt"), ExtResource("20_y3j8r"), ExtResource("21_yl2lr")]) +n_branches = 1 +parts_mutation_associations = Dictionary[String, ExtResource("23_5ma63")]({ +"ANCIENT": SubResource("Resource_x75j3"), +"PRECOCIOUS": SubResource("Resource_setyo"), +"QUALITY": SubResource("Resource_n40r1"), +"QUICK": SubResource("Resource_pw6ot") +}) diff --git a/entities/plants/resources/plant_mutations/precocious_mutation.tres b/entities/plants/resources/plant_mutations/precocious_mutation.tres index 213be66..5e2f8f6 100644 --- a/entities/plants/resources/plant_mutations/precocious_mutation.tres +++ b/entities/plants/resources/plant_mutations/precocious_mutation.tres @@ -1,17 +1,7 @@ [gd_resource type="Resource" script_class="PrecociousMutation" format=3 uid="uid://c3am7s5bjy8qk"] -[ext_resource type="Script" uid="uid://b3jwglylqdqtw" path="res://entities/plants/scripts/texture_builder/plant_part.gd" id="1_8xfpn"] [ext_resource type="Script" uid="uid://cx5mg5vf62bia" path="res://entities/plants/scripts/plant_mutation/precocious_mutation.gd" id="1_wjcm0"] -[ext_resource type="Resource" uid="uid://cxgw1vgket0fw" path="res://entities/plants/resources/plant_parts/Leaf1.tres" id="2_k0mww"] -[ext_resource type="Resource" uid="uid://qb6bftgq0n6y" path="res://entities/plants/resources/plant_parts/Leaf2.tres" id="3_3nesh"] -[ext_resource type="Resource" uid="uid://ft112n57di0e" path="res://entities/plants/resources/plant_parts/Leaf3.tres" id="4_h2qav"] -[ext_resource type="Resource" uid="uid://dwjj6qmcjhn68" path="res://entities/plants/resources/plant_parts/Leaf4.tres" id="5_ifmfp"] -[ext_resource type="Resource" uid="uid://bkr70mstyf8pp" path="res://entities/plants/resources/plant_parts/Leaf5.tres" id="6_iifxp"] -[ext_resource type="Resource" uid="uid://dcuwupmqt34ju" path="res://entities/plants/resources/plant_parts/Leaf6.tres" id="7_bltf1"] -[ext_resource type="Resource" uid="uid://djmidq7yq452i" path="res://entities/plants/resources/plant_parts/Leaf7.tres" id="8_e7puk"] [resource] script = ExtResource("1_wjcm0") -possible_parts = Array[ExtResource("1_8xfpn")]([ExtResource("2_k0mww"), ExtResource("3_3nesh"), ExtResource("4_h2qav"), ExtResource("5_ifmfp"), ExtResource("6_iifxp"), ExtResource("7_bltf1"), ExtResource("8_e7puk")]) -part_amount = 3 metadata/_custom_type_script = "uid://cx5mg5vf62bia" diff --git a/entities/plants/resources/plant_parts/Base1.tres b/entities/plants/resources/plant_parts/Base1.tres index ee5928d..7784e79 100644 --- a/entities/plants/resources/plant_parts/Base1.tres +++ b/entities/plants/resources/plant_parts/Base1.tres @@ -11,5 +11,5 @@ region = Rect2(46, 30, 308, 671) script = ExtResource("1_enq8o") texture = SubResource("AtlasTexture_mypt2") root = Vector2(14, 263) -attaches = Array[Vector2]([Vector2(81, 81), Vector2(6, -85), Vector2(0, -251)]) +attaches = Array[Vector2]([Vector2(79, 83), Vector2(0, -251), Vector2(10, -85)]) bottom_attaches = Array[Vector2]([Vector2(48, 293), Vector2(-13, 287)]) diff --git a/entities/plants/resources/plant_parts/Base3.tres b/entities/plants/resources/plant_parts/Base3.tres index 32625de..039ba6e 100644 --- a/entities/plants/resources/plant_parts/Base3.tres +++ b/entities/plants/resources/plant_parts/Base3.tres @@ -11,5 +11,5 @@ region = Rect2(58, 1268, 141, 393) script = ExtResource("1_p8ox4") texture = SubResource("AtlasTexture_mypt2") root = Vector2(7, 156) -attaches = Array[Vector2]([Vector2(0, 52), Vector2(-9, -53), Vector2(19, -149)]) +attaches = Array[Vector2]([Vector2(0, 52), Vector2(19, -149), Vector2(-10, -52)]) bottom_attaches = Array[Vector2]([Vector2(21, 161), Vector2(-7, 162)]) diff --git a/entities/plants/resources/plant_parts/Base4.tres b/entities/plants/resources/plant_parts/Base4.tres index 3302e3a..3e426ea 100644 --- a/entities/plants/resources/plant_parts/Base4.tres +++ b/entities/plants/resources/plant_parts/Base4.tres @@ -11,5 +11,5 @@ region = Rect2(223, 1265, 200, 386) script = ExtResource("1_03in3") texture = SubResource("AtlasTexture_mypt2") root = Vector2(31, 158) -attaches = Array[Vector2]([Vector2(14, 59), Vector2(-9, 24), Vector2(-22, -114)]) +attaches = Array[Vector2]([Vector2(-8, 26), Vector2(-42, -156), Vector2(17, 54)]) bottom_attaches = Array[Vector2]([Vector2(49, 165), Vector2(19, 169)]) diff --git a/entities/plants/scripts/plant_archetype.gd b/entities/plants/scripts/plant_archetype.gd index 97dec72..fb5acd7 100644 --- a/entities/plants/scripts/plant_archetype.gd +++ b/entities/plants/scripts/plant_archetype.gd @@ -1,9 +1,7 @@ -@tool extends Resource class_name PlantArchetype -@export var archetype_name = Random.generate_random_word() -@export var texture_builder = TextureBuilder.new() +@export var archetype_name := Random.generate_random_word() @export var plant_area_radius = 20 @export var plant_influence_radius = 100 @export var growing_time = 2 @@ -17,13 +15,9 @@ class_name PlantArchetype QualityMutation.new(), QuickMutation.new() ] -@export var bases: Array[PlantPart] -@export var branches: Array[PlantPart] static func get_all() -> Array[PlantArchetype]: - return [ - PlantArchetype.new() - ] + return [PlantArchetype.new()] static func get_random() -> PlantArchetype: return get_all().pick_random() diff --git a/entities/plants/scripts/plant_data.gd b/entities/plants/scripts/plant_data.gd index c9d9d3b..f1c8419 100644 --- a/entities/plants/scripts/plant_data.gd +++ b/entities/plants/scripts/plant_data.gd @@ -18,6 +18,8 @@ enum State {PLANTED, GROWING, MATURE, DEAD} @export var leafs = 0 # +1 score @export var roots = 0 # +1 lifetime +# var texture_builder: TextureBuilder = preload("res://entities/plants/scripts/texture_builder/texture_builder.tres") + func _init( _position : Vector2 = Vector2.ZERO, _archetype : PlantArchetype = PlantArchetype.get_random(), @@ -83,12 +85,6 @@ func get_state() -> State: return State.GROWING return State.MATURE -func get_plant_texture() -> Texture: - return archetype.texture_builder.build_plant_texture(self) - -func get_seed_texture(): - return archetype.texture_builder.build_seed_texture(random_seed) - func get_seed_number(state = get_state()): var seed_number = archetype.seed_number if (state == State.MATURE or state == State.DEAD) else 0 @@ -111,4 +107,4 @@ func get_random_seed_income(): ) func disappear(): - disappeared.emit(self) \ No newline at end of file + disappeared.emit(self) diff --git a/entities/plants/scripts/plant_mutation.gd b/entities/plants/scripts/plant_mutation.gd index 894081f..e522eaf 100644 --- a/entities/plants/scripts/plant_mutation.gd +++ b/entities/plants/scripts/plant_mutation.gd @@ -2,9 +2,8 @@ extends Resource class_name PlantMutation @export var level : int = 1 -@export var possible_parts: Array[PlantPart] -@export var part_amount: int = 1 +var id : String : get = get_mutation_id var name : String : get = get_mutation_name func _init(_level : int = 1): @@ -16,6 +15,10 @@ func get_icon() -> Texture: func get_base_rarity() -> int: return 0 +func get_mutation_id() -> String: + printerr("Classe abstraite PlantMutation appelée") + return "" + func get_mutation_name() -> String: printerr("Classe abstraite PlantMutation appelée") return "" diff --git a/entities/plants/scripts/plant_mutation/ancient_mutation.gd b/entities/plants/scripts/plant_mutation/ancient_mutation.gd index 229b4f7..e758ede 100644 --- a/entities/plants/scripts/plant_mutation/ancient_mutation.gd +++ b/entities/plants/scripts/plant_mutation/ancient_mutation.gd @@ -9,6 +9,9 @@ func get_icon() -> Texture: func get_base_rarity() -> int: return 0 +func get_mutation_id() -> String: + return "ANCIENT" + func get_mutation_name() -> String: return tr("ANCIENT") diff --git a/entities/plants/scripts/plant_mutation/precocious_mutation.gd b/entities/plants/scripts/plant_mutation/precocious_mutation.gd index f3e92b5..cbe67d6 100644 --- a/entities/plants/scripts/plant_mutation/precocious_mutation.gd +++ b/entities/plants/scripts/plant_mutation/precocious_mutation.gd @@ -7,6 +7,9 @@ func get_icon() -> Texture: func get_base_rarity() -> int: return 0 +func get_mutation_id() -> String: + return "PRECOCIOUS" + func get_mutation_name() -> String: return tr("PRECOCIOUS") diff --git a/entities/plants/scripts/plant_mutation/quality_mutation.gd b/entities/plants/scripts/plant_mutation/quality_mutation.gd index dcdfc44..07a28bf 100644 --- a/entities/plants/scripts/plant_mutation/quality_mutation.gd +++ b/entities/plants/scripts/plant_mutation/quality_mutation.gd @@ -7,6 +7,9 @@ func get_icon() -> Texture: func get_base_rarity() -> int: return 0 +func get_mutation_id() -> String: + return "QUALITY" + func get_mutation_name() -> String: return tr("QUALITY") diff --git a/entities/plants/scripts/plant_mutation/quick_mutation.gd b/entities/plants/scripts/plant_mutation/quick_mutation.gd index 0ac1c55..124ec17 100644 --- a/entities/plants/scripts/plant_mutation/quick_mutation.gd +++ b/entities/plants/scripts/plant_mutation/quick_mutation.gd @@ -7,6 +7,9 @@ func get_icon() -> Texture: func get_base_rarity() -> int: return 0 +func get_mutation_id() -> String: + return "QUICK" + func get_mutation_name() -> String: return tr("QUICK") diff --git a/entities/plants/scripts/plant_sprite.gd b/entities/plants/scripts/plant_sprite.gd index bd09063..32f3577 100644 --- a/entities/plants/scripts/plant_sprite.gd +++ b/entities/plants/scripts/plant_sprite.gd @@ -16,9 +16,9 @@ func update_plant_sprite(plant_data : PlantData, with_animation = false): await %AnimationPlayer.animation_finished %Sprite.flip_h = true if plant_data.random_seed%2 == 0 else false - %Sprite.texture = plant_data.get_plant_texture() + %Sprite.texture = %TextureBuilder.build_plant_texture(plant_data) - %PlantedSeed.texture = plant_data.get_seed_texture() + %PlantedSeed.texture = %TextureBuilder.build_seed_texture(plant_data.random_seed) %PlantedSeed.visible = plant_data.get_state() == PlantData.State.PLANTED # %PlantedSeed.region_rect = Rect2( diff --git a/entities/plants/scripts/texture_builder/part_archetypr_association.gd b/entities/plants/scripts/texture_builder/part_archetypr_association.gd new file mode 100644 index 0000000..e25e009 --- /dev/null +++ b/entities/plants/scripts/texture_builder/part_archetypr_association.gd @@ -0,0 +1,6 @@ +extends Resource +class_name PartArchetypeAssociation + +@export var bases: Array[PlantPart] +@export var branches: Array[PlantPart] +@export var branches_amount: int = 1 diff --git a/entities/plants/scripts/texture_builder/part_archetypr_association.gd.uid b/entities/plants/scripts/texture_builder/part_archetypr_association.gd.uid new file mode 100644 index 0000000..4a07c58 --- /dev/null +++ b/entities/plants/scripts/texture_builder/part_archetypr_association.gd.uid @@ -0,0 +1 @@ +uid://c8wmu8a3gyg55 diff --git a/entities/plants/scripts/texture_builder/part_assembler.gd b/entities/plants/scripts/texture_builder/part_assembler.gd index c7dd1b9..4640dee 100644 --- a/entities/plants/scripts/texture_builder/part_assembler.gd +++ b/entities/plants/scripts/texture_builder/part_assembler.gd @@ -1,47 +1,18 @@ extends Node @export var n_plants_to_generate: int -@export var space_between_plants: int -@export var base_mutations: Array[PlantMutation] -@export var all_mutations: Array[PlantMutation] -@export var max_n_mutations := 2 -# @export var base_parts: Array[PackedScene] -# @export var leaves_parts: Array[PackedScene] -# @export var branches_parts: Array[PackedScene] -# @export var flowers_parts: Array[PackedScene] +@export var space_between_plants: float func _ready(): generate_plants(); func generate_plants(): - var fail_safe := 0; for i in n_plants_to_generate: - - -# func populate_part(parent: PlantPart, parent_node: Node2D, depth := 1): -# if parent.attaches.size() == 0: -# return - -# if depth >= max_depth: -# return - -# var n_sub_parts: int = randi() % parent.attaches.size(); -# var available_parent_attaches: Array = range(parent.attaches.size()); -# for i in n_sub_parts: -# var attach_ind_ind: int = randi() % available_parent_attaches.size(); -# var parent_attach_ind: int = available_parent_attaches[attach_ind_ind]; -# available_parent_attaches.pop_at(attach_ind_ind); -# var attach := parent.attaches[parent_attach_ind]; - -# var next_packed_scene: PackedScene; -# if parent.type == PlantPart.PartType.BASE_PART: -# next_packed_scene = -# elif parent.type == PlantPart.PartType.BRANCH_PART: -# var selected_root: Vector2 = next_part.roots.pick_random().position; - -# var sprite := Sprite2D.new(); -# sprite.texture = next_part.texture; -# sprite.position = attach.position - selected_root; -# parent_node.add_child(sprite); - -# populate_part(next_part, sprite, depth + 1); + print("Generate plant") + var plant_position := Vector2(i * space_between_plants, 0) + var plant_data: PlantData = PlantData.new(plant_position) + plant_data.day = plant_data.get_growing_time() + plant_data.mutations.append(plant_data.archetype.available_mutations.pick_random()) + var plant: Plant = Plant.new(plant_data) + add_child(plant) + plant.global_position = plant_position diff --git a/entities/plants/scripts/texture_builder/part_mutation_association.gd b/entities/plants/scripts/texture_builder/part_mutation_association.gd new file mode 100644 index 0000000..2ae0e8e --- /dev/null +++ b/entities/plants/scripts/texture_builder/part_mutation_association.gd @@ -0,0 +1,5 @@ +extends Resource +class_name PartMutationAssociation + +@export var parts: Array[PlantPart] +@export var part_amount: int = 1 diff --git a/entities/plants/scripts/texture_builder/part_mutation_association.gd.uid b/entities/plants/scripts/texture_builder/part_mutation_association.gd.uid new file mode 100644 index 0000000..bcd0745 --- /dev/null +++ b/entities/plants/scripts/texture_builder/part_mutation_association.gd.uid @@ -0,0 +1 @@ +uid://cfjd8jelpm8dt diff --git a/entities/plants/scripts/texture_builder/plant_part.gd b/entities/plants/scripts/texture_builder/plant_part.gd index 5bb3bb2..86f2745 100644 --- a/entities/plants/scripts/texture_builder/plant_part.gd +++ b/entities/plants/scripts/texture_builder/plant_part.gd @@ -14,7 +14,7 @@ enum PartType {BASE_PART, BRANCH_PART, LEAF_PART, FLOWER_PART} @export var bottom_attachable: bool @export var branch_attachable: bool -func _init(textute_arg: Texture, root_arg: Vector2, attaches_arg: Array[Vector2], bottom_attaches_arg: Array[Vector2], type_arg: PartType, is_back_arg: bool, base_attachable_arg: bool, bottom_attachable_arg: bool, branch_attachable_arg: bool) -> void: +func init(textute_arg: Texture, root_arg: Vector2, attaches_arg: Array[Vector2], bottom_attaches_arg: Array[Vector2], type_arg: PartType, is_back_arg: bool, base_attachable_arg: bool, bottom_attachable_arg: bool, branch_attachable_arg: bool) -> void: texture = textute_arg root = root_arg attaches = attaches_arg diff --git a/entities/plants/scripts/texture_builder/plant_part_builder.gd b/entities/plants/scripts/texture_builder/plant_part_builder.gd new file mode 100644 index 0000000..75a671b --- /dev/null +++ b/entities/plants/scripts/texture_builder/plant_part_builder.gd @@ -0,0 +1,82 @@ +@tool +extends Sprite2D +class_name PlantPartScene + +@export var part_name: String + +@export_tool_button("Load resource") var load_resource_button = load_resource + +@export var root: Node2D +@export var attaches: Node +@export var bottom_attaches: Node +@export var type: PlantPart.PartType + +@export var is_back: bool +@export var base_attachable: bool +@export var bottom_attachable: bool +@export var branch_attachable: bool + +@export_tool_button("Save as resource") var save_as_resource_button = save_as_resource + +func load_resource(): + var destination := "res://entities/plants/resources/plant_parts/" + part_name + ".tres" + print("Loading: ", part_name, " at: ", destination) + var plant_part = ResourceLoader.load(destination) + if plant_part is PlantPart: + root.position = plant_part.root + texture = plant_part.texture + + var attaches_children := attaches.get_children() + for i in maxi(attaches_children.size(), plant_part.attaches.size()): + if i < attaches_children.size() && i < plant_part.attaches.size(): + attaches_children[i].position = plant_part.attaches[i] + elif i >= attaches_children.size(): + var new_child = Node2D.new() + new_child.name = "attach" + str(i) + new_child.position = plant_part.attaches[i] + attaches.add_child(new_child) + new_child.set_owner(self ) + elif i >= plant_part.attaches.size(): + attaches_children[i].free() + else: + printerr("Invalid code path") + + var bottom_attaches_children := bottom_attaches.get_children() + for i in maxi(bottom_attaches_children.size(), plant_part.bottom_attaches.size()): + if i < bottom_attaches_children.size() && i < plant_part.bottom_attaches.size(): + bottom_attaches_children[i].position = plant_part.bottom_attaches[i] + elif i >= bottom_attaches_children.size(): + var new_child = Node2D.new() + new_child.name = "bottom_attach" + str(i) + new_child.position = plant_part.bottom_attaches[i] + bottom_attaches.add_child(new_child) + new_child.set_owner(self ) + elif i >= plant_part.bottom_attaches.size(): + bottom_attaches_children[i].free() + else: + printerr("Invalid code path") + + type = plant_part.type + is_back = plant_part.is_back + base_attachable = plant_part.base_attachable + bottom_attachable = plant_part.bottom_attachable + branch_attachable = plant_part.branch_attachable + else: + printerr("Error loading ", part_name) + +func save_as_resource(): + var destination := "res://entities/plants/resources/plant_parts/" + part_name + ".tres" + print("Saving: ", part_name, " at: ", destination) + var attaches_vec2: Array[Vector2] + for attach in attaches.get_children(): + attaches_vec2.append(attach.position) + var bottom_attaches_vec2: Array[Vector2] + for bottom_attach in bottom_attaches.get_children(): + bottom_attaches_vec2.append(bottom_attach.position) + + var plant_part = PlantPart.new() + plant_part.init(texture, root.position, attaches_vec2, bottom_attaches_vec2, type, is_back, base_attachable, bottom_attachable, branch_attachable) + plant_part.take_over_path(destination) + var err := ResourceSaver.save(plant_part, destination) + if err != OK: + printerr("Error saving resource: ", error_string(err)) diff --git a/entities/plants/scripts/texture_builder/plant_part_scene.gd.uid b/entities/plants/scripts/texture_builder/plant_part_builder.gd.uid similarity index 100% rename from entities/plants/scripts/texture_builder/plant_part_scene.gd.uid rename to entities/plants/scripts/texture_builder/plant_part_builder.gd.uid diff --git a/entities/plants/scripts/texture_builder/plant_part_scene.gd b/entities/plants/scripts/texture_builder/plant_part_scene.gd deleted file mode 100644 index 3b48e81..0000000 --- a/entities/plants/scripts/texture_builder/plant_part_scene.gd +++ /dev/null @@ -1,30 +0,0 @@ -@tool -extends Sprite2D -class_name PlantPartScene - -@export var root: Node2D -@export var attaches: Array[Node2D] -@export var bottom_attaches: Array[Node2D] -@export var type: PlantPart.PartType - -@export var is_back: bool -@export var base_attachable: bool -@export var bottom_attachable: bool -@export var branch_attachable: bool - -@export_tool_button("Save as resource") var save_as_resource_button = save_as_resource - -func save_as_resource(): - var destination := "res://entities/plants/resources/plant_parts/" + name + ".tres" - print("Saving: ", name, " at: ", destination) - var attaches_vec2: Array[Vector2] - for attach in attaches: - attaches_vec2.append(attach.position) - var bottom_attaches_vec2: Array[Vector2] - for bottom_attach in bottom_attaches: - bottom_attaches_vec2.append(bottom_attach.position) - - var plant_part = PlantPart.new(texture, root.position, attaches_vec2, bottom_attaches_vec2, type, is_back, base_attachable, bottom_attachable, branch_attachable) - var err := ResourceSaver.save(plant_part, destination) - if err != OK: - printerr("Error saving resource: ", error_string(err)) diff --git a/entities/plants/scripts/texture_builder/texture_builder.gd b/entities/plants/scripts/texture_builder/texture_builder.gd index 7462852..3c4ee85 100644 --- a/entities/plants/scripts/texture_builder/texture_builder.gd +++ b/entities/plants/scripts/texture_builder/texture_builder.gd @@ -1,10 +1,18 @@ -extends Resource +extends Node class_name TextureBuilder +const IMAGE_WIDTH := 1000 +const IMAGE_HEIGHT := 2000 + const PLACEHOLDER_SEED_TEXTURE: Texture = preload("res://entities/plants/assets/sprites/default/seed.png") const PLACEHOLDER_MATURE_TEXTURE: Texture = preload("res://entities/plants/assets/sprites/default/mature.png") const PLACEHOLDER_GROWING_TEXTURE: Texture = preload("res://entities/plants/assets/sprites/default/growing.png") +# @export var parts_archetype_associations: Dictionary[PlantArchetype, PartArchetypeAssociation] TODO:: have the archetypes +@export var bases: Array[PlantPart] +@export var branches: Array[PlantPart] +@export var n_branches: int = 2 +@export var parts_mutation_associations: Dictionary[String, PartMutationAssociation] func build_seed_texture(_random_seed: int) -> Texture: return PLACEHOLDER_SEED_TEXTURE @@ -14,78 +22,105 @@ func build_plant_texture(plant_data: PlantData) -> Texture: PlantData.State.MATURE: var mature_texture: Texture = PLACEHOLDER_MATURE_TEXTURE var mature_image: Image + + # var plant_archetype := plant_data.archetype - var base_part: PlantPart = plant_data.archetype.bases.pick_random(); + if bases.size() == 0: + printerr("No base in archetype") + return mature_texture + # var base_part: PlantPart = parts_archetype_associations[plant_archetype].bases.pick_random() + var base_part: PlantPart = bases.pick_random() - mature_image = base_part.texture.get_image() + var base_image = base_part.texture.get_image() + mature_image = Image.create_empty(IMAGE_WIDTH, IMAGE_HEIGHT, false, Image.FORMAT_RGBA8) + var base_image_center: Vector2i = 0.5 * base_image.get_size() + var mature_image_center: Vector2i = 0.5 * mature_image.get_size() + mature_image.blend_rect(base_image, Rect2i(Vector2i.ZERO, base_image.get_size()), mature_image_center - base_image_center - Vector2i(base_part.root)) - var branch_parts: Array[PlantPart] = plant_data.archetype.branches + if branches.size() == 0: + printerr("No branches in archetype") + # var branch_parts: Array[PlantPart] = parts_archetype_associations[plant_archetype].branches + var branch_parts: Array[PlantPart] + for i in n_branches: + branch_parts.append(branches.pick_random()) - var parts_to_place: Array[PlantPart]; + var parts_to_place: Array[PlantPart] for m in plant_data.mutations: - var mutation := m; - var mutation_possible_parts := mutation.possible_parts; - for p in mutation.part_amount: + print("mutations: ", m.id) + var association: PartMutationAssociation = parts_mutation_associations[m.id] + var mutation_possible_parts := association.parts + for p in association.part_amount: parts_to_place.append(mutation_possible_parts.pick_random()) - var available_base_attaches: Array[Vector2] = base_part.attaches.duplicate(); + var available_base_attaches: Array[Vector2] = base_part.attaches.duplicate() - var available_base_bottom_attach: Array[Vector2] = base_part.bottom_attaches.duplicate(); + var available_base_bottom_attach: Array[Vector2] = base_part.bottom_attaches.duplicate() - var branch_attaches: Array[Vector2]; - var branch_attach_parent: Array[PlantPart]; + var branch_attaches: Array[Vector2] + var branch_root: Array[Vector2] + var branch_parent_attach: Array[Vector2] - assert(branch_parts.size() <= base_part.attaches.size()); + assert(branch_parts.size() <= base_part.attaches.size(), + str("More branches (", branch_parts.size(), ") than base attaches (", base_part.attaches.size(), ")")) for branch in branch_parts: if available_base_attaches.size() == 0: break - var ind: int = randi_range(0, available_base_attaches.size() - 1); - var attach: Vector2 = available_base_attaches.pop_at(ind); + var ind: int = randi_range(0, available_base_attaches.size() - 1) + var attach: Vector2 = available_base_attaches.pop_at(ind) var branch_image: Image = branch.texture.get_image() - mature_image.blend_rect(branch_image, Rect2i(Vector2.ZERO, branch.texture.get_size()), attach) + var branch_image_center: Vector2i = 0.5 * branch_image.get_size() + mature_image.blend_rect(branch_image, Rect2i(Vector2i.ZERO, branch.texture.get_size()), mature_image_center - branch_image_center + Vector2i(attach - branch.root - base_part.root)) for branch_attach in branch.attaches: - branch_attaches.append(branch_attach); - branch_attach_parent.append(branch); + branch_attaches.append(branch_attach) + branch_root.append(branch.root) + branch_parent_attach.append(attach) - assert(parts_to_place.size() <= branch_attaches.size() + base_part.attaches.size() - branch_parts.size()); + assert(parts_to_place.size() <= branch_attaches.size() + base_part.attaches.size() - branch_parts.size(), + str("Parts to place : ", parts_to_place.size(), + "; Branch Attaches : ", branch_attaches.size(), + "; Base attaches : ", base_part.attaches.size(), + "; Branch parts : ", branch_parts.size())) for part: PlantPart in parts_to_place: - var attach: Vector2; - var parent_part: PlantPart; - var chosen_attach_type: int = 0; - var attachables: Array[int]; + print("create part") + var attach: Vector2 + var parent_root: Vector2 + var chosen_attach_type: int = 0 + var attachables: Array[int] if part.base_attachable && available_base_attaches.size() > 0: - attachables.append(1); + attachables.append(1) if part.bottom_attachable && available_base_bottom_attach.size() > 0: - attachables.append(2); + attachables.append(2) if part.branch_attachable && branch_attaches.size() > 0: - attachables.append(3); - # assert(attachables.size() > 0); + attachables.append(3) + # assert(attachables.size() > 0) if attachables.size() == 0: + print("No attach available") continue - chosen_attach_type = attachables.pick_random(); + chosen_attach_type = attachables.pick_random() if chosen_attach_type == 1: # base attach - var ind := randi_range(0, available_base_attaches.size() - 1); - attach = available_base_attaches.pop_at(ind); - parent_part = base_part; + var ind := randi_range(0, available_base_attaches.size() - 1) + attach = available_base_attaches.pop_at(ind) + parent_root = base_part.root elif chosen_attach_type == 2: # bottom - var ind := randi_range(0, available_base_bottom_attach.size() - 1); - attach = available_base_bottom_attach.pop_at(ind); - parent_part = base_part; + var ind := randi_range(0, available_base_bottom_attach.size() - 1) + attach = available_base_bottom_attach.pop_at(ind) + parent_root = base_part.root elif chosen_attach_type == 3: # branch - var ind := randi_range(0, branch_attaches.size() - 1); - attach = branch_attaches.pop_at(ind); - parent_part = branch_attach_parent.pop_at(ind); + var ind := randi_range(0, branch_attaches.size() - 1) + attach = branch_attaches.pop_at(ind) - branch_root.pop_at(ind) + branch_parent_attach.pop_at(ind) + parent_root = base_part.root - var part_image: Image = part.texture.get_image() - mature_image.blend_rect(part_image, Rect2i(Vector2.ZERO, part.texture.get_size()), attach) + var part_image: Image = part.texture.get_image() + var part_image_center: Vector2i = 0.5 * part_image.get_size() + var relative_root_centered_pos: Vector2 = Vector2(mature_image_center - part_image_center) - part.root + mature_image.blend_rect(part_image, Rect2i(Vector2i.ZERO, part.texture.get_size()), relative_root_centered_pos + attach - parent_root) - if plant_data.random_seed % 2 == 0: mature_image.flip_x() mature_texture = ImageTexture.create_from_image(mature_image) @@ -93,6 +128,8 @@ func build_plant_texture(plant_data: PlantData) -> Texture: PlantData.State.GROWING: + print("Build growing texture") return PLACEHOLDER_GROWING_TEXTURE _: - return null \ No newline at end of file + print("Not handled state") + return null diff --git a/entities/plants/test_sprites.tscn b/entities/plants/test_sprites.tscn index 239f6cc..f5f7cdc 100644 --- a/entities/plants/test_sprites.tscn +++ b/entities/plants/test_sprites.tscn @@ -1,124 +1,12 @@ [gd_scene format=3 uid="uid://cfsq3hma8djk3"] [ext_resource type="Script" uid="uid://daod4korkrm2r" path="res://entities/plants/scripts/texture_builder/part_assembler.gd" id="1_wqioj"] -[ext_resource type="Script" uid="uid://basyrvn224i4f" path="res://entities/plants/scripts/texture_builder/mutation.gd" id="2_cxlua"] -[ext_resource type="PackedScene" uid="uid://cg6r56x11bvk2" path="res://entities/plants/assets/parts/bases/base1.tscn" id="3_3tj2j"] -[ext_resource type="PackedScene" uid="uid://gxrgk123q4s4" path="res://entities/plants/assets/parts/branches/branch1.tscn" id="4_csy2t"] -[ext_resource type="PackedScene" uid="uid://dcgv0iyl5j573" path="res://entities/plants/assets/parts/branches/branch2.tscn" id="5_7qj60"] -[ext_resource type="PackedScene" uid="uid://d0ltcm3nau23g" path="res://entities/plants/assets/parts/branches/branch3.tscn" id="6_iueuw"] -[ext_resource type="PackedScene" uid="uid://dcjqtbeyiimo6" path="res://entities/plants/assets/parts/branches/branch4.tscn" id="7_5sov3"] -[ext_resource type="PackedScene" uid="uid://c27tu2a8dklos" path="res://entities/plants/assets/parts/branches/branch5.tscn" id="8_1fpmv"] -[ext_resource type="PackedScene" uid="uid://bxs8jmqgpdbm" path="res://entities/plants/assets/parts/branches/branch6.tscn" id="9_elw6h"] -[ext_resource type="PackedScene" uid="uid://72s8382x2ouu" path="res://entities/plants/assets/parts/bases/base2.tscn" id="10_oshgv"] -[ext_resource type="PackedScene" uid="uid://jsjcxyqt4pnx" path="res://entities/plants/assets/parts/branches/branch7.tscn" id="11_5sov3"] -[ext_resource type="PackedScene" uid="uid://dl0kae3or8wn5" path="res://entities/plants/assets/parts/bases/base3.tscn" id="11_ewddg"] -[ext_resource type="PackedScene" uid="uid://eitataf7s4k6" path="res://entities/plants/assets/parts/branches/branch8.tscn" id="12_1fpmv"] -[ext_resource type="PackedScene" uid="uid://dnl6yculy2lub" path="res://entities/plants/assets/parts/bases/base4.tscn" id="12_35vmi"] -[ext_resource type="PackedScene" uid="uid://00qwec7mi4tx" path="res://entities/plants/assets/parts/branches/branch9.tscn" id="13_elw6h"] -[ext_resource type="PackedScene" uid="uid://cs36w4mum4ps7" path="res://entities/plants/assets/parts/branches/branch10.tscn" id="14_oshgv"] -[ext_resource type="PackedScene" uid="uid://dkacu801335p5" path="res://entities/plants/assets/parts/branches/branch11.tscn" id="17_23fyg"] -[ext_resource type="PackedScene" uid="uid://cwdpgq8ot27tn" path="res://entities/plants/assets/parts/branches/branch12.tscn" id="18_8hpxu"] -[ext_resource type="PackedScene" uid="uid://b812ypiab5bhu" path="res://entities/plants/assets/parts/branches/branch13.tscn" id="19_ovm8l"] -[ext_resource type="PackedScene" uid="uid://c7bbylk6t5a3m" path="res://entities/plants/assets/parts/branches/branch14.tscn" id="20_eqjo0"] -[ext_resource type="PackedScene" uid="uid://dohr0df6a2cct" path="res://entities/plants/assets/parts/branches/branch15.tscn" id="21_6p6fd"] -[ext_resource type="PackedScene" uid="uid://gva05r3c8gby" path="res://entities/plants/assets/parts/branches/branch16.tscn" id="22_pnygc"] -[ext_resource type="PackedScene" uid="uid://cyj8ssk8qkleo" path="res://entities/plants/assets/parts/branches/branch17.tscn" id="23_coc2y"] -[ext_resource type="PackedScene" uid="uid://bf2mi7dxuj14g" path="res://entities/plants/assets/parts/branches/branch18.tscn" id="24_2avaa"] -[ext_resource type="PackedScene" uid="uid://27iessjdhgmu" path="res://entities/plants/assets/parts/bottom_leaves/bottom_leaf1.tscn" id="25_63f6q"] -[ext_resource type="PackedScene" uid="uid://bdtxnigwyarjf" path="res://entities/plants/assets/parts/bottom_leaves/bottom_leaf2.tscn" id="26_41fgx"] -[ext_resource type="PackedScene" uid="uid://bg4cl3q0g3sfj" path="res://entities/plants/assets/parts/bottom_leaves/bottom_leaf3.tscn" id="27_smoif"] -[ext_resource type="PackedScene" uid="uid://ds7qd2ed1jfdd" path="res://entities/plants/assets/parts/bottom_leaves/bottom_leaf4.tscn" id="28_4gx0a"] -[ext_resource type="PackedScene" uid="uid://dts2dg0bq3603" path="res://entities/plants/assets/parts/bottom_leaves/bottom_leaf5.tscn" id="29_c28bh"] -[ext_resource type="PackedScene" uid="uid://bjawv0tbtex8o" path="res://entities/plants/assets/parts/bottom_leaves/bottom_leaf6.tscn" id="30_r8twp"] -[ext_resource type="PackedScene" uid="uid://o4h8osgnh8os" path="res://entities/plants/assets/parts/bottom_leaves/bottom_leaf7.tscn" id="31_dsjh2"] -[ext_resource type="PackedScene" uid="uid://ba5jgwaoswxnt" path="res://entities/plants/assets/parts/bottom_leaves/bottom_leaf8.tscn" id="32_48h3c"] -[ext_resource type="PackedScene" uid="uid://drehv2x5oieno" path="res://entities/plants/assets/parts/bottom_leaves/bottom_leaf9.tscn" id="33_8f0o8"] -[ext_resource type="PackedScene" uid="uid://cggirl3tlcrkc" path="res://entities/plants/assets/parts/leaves/leaf4.tscn" id="34_r8twp"] -[ext_resource type="PackedScene" uid="uid://dx7trhqjvnk6u" path="res://entities/plants/assets/parts/leaves/leaf5.tscn" id="35_dsjh2"] -[ext_resource type="PackedScene" uid="uid://cr1sdb0k2g2qe" path="res://entities/plants/assets/parts/leaves/leaf6.tscn" id="36_48h3c"] -[ext_resource type="PackedScene" uid="uid://n8ex548mgcn2" path="res://entities/plants/assets/parts/leaves/leaf7.tscn" id="37_8f0o8"] -[ext_resource type="PackedScene" uid="uid://crjfnk5ykoxle" path="res://entities/plants/assets/parts/leaves/leaf8.tscn" id="38_8der4"] -[ext_resource type="PackedScene" uid="uid://b5ud2u5r4vkot" path="res://entities/plants/assets/parts/leaves/leaf1.tscn" id="39_8f0o8"] -[ext_resource type="PackedScene" uid="uid://mm1xq416h68n" path="res://entities/plants/assets/parts/leaves/leaf2.tscn" id="40_8der4"] -[ext_resource type="PackedScene" uid="uid://y3n410d566at" path="res://entities/plants/assets/parts/leaves/leaf3.tscn" id="41_jmgwa"] -[ext_resource type="PackedScene" uid="uid://b5fxgs4ua0ejt" path="res://entities/plants/assets/parts/leaves/leaf9.tscn" id="42_jhkp2"] -[ext_resource type="PackedScene" uid="uid://xofvb6wh38j4" path="res://entities/plants/assets/parts/leaves/leaf10.tscn" id="43_k3d8k"] -[ext_resource type="PackedScene" uid="uid://d3goxclh7xwf8" path="res://entities/plants/assets/parts/leaves/leaf11.tscn" id="44_ch5a5"] -[ext_resource type="PackedScene" uid="uid://b514ksdyr8yoy" path="res://entities/plants/assets/parts/leaves/leaf12.tscn" id="45_284ci"] -[ext_resource type="PackedScene" uid="uid://jb5gaxtxi0k7" path="res://entities/plants/assets/parts/leaves/leaf13.tscn" id="46_abal8"] -[ext_resource type="PackedScene" uid="uid://cw8ms5u42gtx8" path="res://entities/plants/assets/parts/leaves/leaf14.tscn" id="47_ulamc"] -[ext_resource type="PackedScene" uid="uid://dlam7tfjtv1j" path="res://entities/plants/assets/parts/leaves/leaf15.tscn" id="48_ch5m8"] -[ext_resource type="PackedScene" uid="uid://dqhouqmkaqm2h" path="res://entities/plants/assets/parts/leaves/leaf16.tscn" id="49_wqwyl"] -[ext_resource type="PackedScene" uid="uid://igga16rhmb2p" path="res://entities/plants/assets/parts/flowers/flower1.tscn" id="50_abal8"] -[ext_resource type="PackedScene" uid="uid://p2rqflone1dw" path="res://entities/plants/assets/parts/flowers/flower2.tscn" id="51_ulamc"] -[ext_resource type="PackedScene" uid="uid://c0j6kgyxq3bdl" path="res://entities/plants/assets/parts/flowers/flower3.tscn" id="52_ch5m8"] -[ext_resource type="PackedScene" uid="uid://bs3p5i88udxwf" path="res://entities/plants/assets/parts/flowers/flower4.tscn" id="53_wqwyl"] [node name="TestSprites" type="Node2D" unique_id=1624731692] script = ExtResource("1_wqioj") -n_plants_to_generate = 5 -space_between_plants = 400 +n_plants_to_generate = 3 +space_between_plants = 125.0 [node name="Camera2D" type="Camera2D" parent="." unique_id=628954249] -position = Vector2(812, -470) -zoom = Vector2(0.595, 0.595) - -[node name="Base Mutation" type="Node" parent="." unique_id=1960536142] - -[node name="Base1" type="Node" parent="Base Mutation" unique_id=2035954924] -script = ExtResource("2_cxlua") -mutation_name = "Base1" -possible_parts = Array[PackedScene]([ExtResource("3_3tj2j"), ExtResource("4_csy2t"), ExtResource("5_7qj60"), ExtResource("6_iueuw"), ExtResource("7_5sov3"), ExtResource("8_1fpmv"), ExtResource("9_elw6h")]) -part_amount = 3 -metadata/_custom_type_script = "uid://basyrvn224i4f" - -[node name="Base2" type="Node" parent="Base Mutation" unique_id=1395746901] -script = ExtResource("2_cxlua") -mutation_name = "Base2" -possible_parts = Array[PackedScene]([ExtResource("10_oshgv"), ExtResource("11_5sov3"), ExtResource("12_1fpmv"), ExtResource("13_elw6h"), ExtResource("14_oshgv")]) -part_amount = 1 -metadata/_custom_type_script = "uid://basyrvn224i4f" - -[node name="Base3" type="Node" parent="Base Mutation" unique_id=1014851261] -script = ExtResource("2_cxlua") -mutation_name = "Base3" -possible_parts = Array[PackedScene]([ExtResource("11_ewddg"), ExtResource("12_35vmi"), ExtResource("17_23fyg"), ExtResource("18_8hpxu"), ExtResource("19_ovm8l"), ExtResource("20_eqjo0"), ExtResource("21_6p6fd"), ExtResource("22_pnygc"), ExtResource("23_coc2y"), ExtResource("24_2avaa")]) -part_amount = 3 -metadata/_custom_type_script = "uid://basyrvn224i4f" - -[node name="Mutations" type="Node" parent="." unique_id=298602347] - -[node name="BottomLeaves" type="Node" parent="Mutations" unique_id=718997893] -script = ExtResource("2_cxlua") -mutation_name = "BottomLeaves" -possible_parts = Array[PackedScene]([ExtResource("25_63f6q"), ExtResource("26_41fgx"), ExtResource("27_smoif"), ExtResource("28_4gx0a"), ExtResource("29_c28bh"), ExtResource("30_r8twp"), ExtResource("31_dsjh2"), ExtResource("32_48h3c"), ExtResource("33_8f0o8")]) -part_amount = 2 -metadata/_custom_type_script = "uid://basyrvn224i4f" - -[node name="LongLeaves" type="Node" parent="Mutations" unique_id=1017286178] -script = ExtResource("2_cxlua") -mutation_name = "LongLeaves" -possible_parts = Array[PackedScene]([ExtResource("34_r8twp"), ExtResource("35_dsjh2"), ExtResource("36_48h3c"), ExtResource("37_8f0o8"), ExtResource("38_8der4")]) -part_amount = 3 -metadata/_custom_type_script = "uid://basyrvn224i4f" - -[node name="MiniLeaves" type="Node" parent="Mutations" unique_id=183501500] -script = ExtResource("2_cxlua") -mutation_name = "MiniLeaves" -possible_parts = Array[PackedScene]([ExtResource("39_8f0o8"), ExtResource("40_8der4"), ExtResource("41_jmgwa")]) -part_amount = 5 -metadata/_custom_type_script = "uid://basyrvn224i4f" - -[node name="HollowLeaves" type="Node" parent="Mutations" unique_id=891558092] -script = ExtResource("2_cxlua") -mutation_name = "HollowLeaves" -possible_parts = Array[PackedScene]([ExtResource("42_jhkp2"), ExtResource("43_k3d8k"), ExtResource("44_ch5a5"), ExtResource("45_284ci"), ExtResource("46_abal8"), ExtResource("47_ulamc"), ExtResource("48_ch5m8"), ExtResource("49_wqwyl")]) -part_amount = 3 -metadata/_custom_type_script = "uid://basyrvn224i4f" - -[node name="Flowers" type="Node" parent="Mutations" unique_id=353282102] -script = ExtResource("2_cxlua") -mutation_name = "Flowers" -possible_parts = Array[PackedScene]([ExtResource("50_abal8"), ExtResource("51_ulamc"), ExtResource("52_ch5m8"), ExtResource("53_wqwyl")]) -part_amount = 2 -metadata/_custom_type_script = "uid://basyrvn224i4f" +position = Vector2(123, -46) +zoom = Vector2(3.665, 3.665)