Compare commits
2
Commits
378b0fbcf0
...
c795d7cac5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c795d7cac5 | ||
|
|
443e239520 |
@@ -0,0 +1,35 @@
|
||||
extends ProgressionData
|
||||
class_name TestProgressionData
|
||||
|
||||
@export var mutations_available: Array
|
||||
|
||||
func _init() -> void:
|
||||
mutations_available = get_all_mutations().map(func(m): return m.id)
|
||||
|
||||
func get_story_step() -> StoryStep:
|
||||
return InfiniteStoryStep.new()
|
||||
|
||||
func get_story_progression() -> float:
|
||||
return 0.0
|
||||
|
||||
func discover_mutation(pm: PlantMutation) -> void:
|
||||
if !mutations_available.has(pm.id):
|
||||
mutations_available.append(pm.id)
|
||||
|
||||
func get_mutations_discovered() -> Array[String]:
|
||||
return mutations_available
|
||||
|
||||
func next_story_step() -> void:
|
||||
pass
|
||||
|
||||
func get_available_mutations() -> Array[PlantMutation]:
|
||||
return get_all_mutations().filter(func(m): return mutations_available.has(m.id))
|
||||
|
||||
func are_all_mutations_unlocked() -> bool:
|
||||
return len(mutations_available) >= len(get_all_mutations())
|
||||
|
||||
func unlock_new_mutation() -> PlantMutation:
|
||||
return get_all_mutations().pick_random()
|
||||
|
||||
func lock_mutation(pm: PlantMutation) -> void:
|
||||
mutations_available.erase(pm.id)
|
||||
@@ -0,0 +1 @@
|
||||
uid://dlbrxlmfjm273
|
||||
@@ -26,6 +26,9 @@
|
||||
[ext_resource type="Resource" uid="uid://bd4suw64pumd5" path="res://entities/plants/resources/plant_parts/LeafHB.tres" id="24_4gk8a"]
|
||||
[ext_resource type="Resource" uid="uid://dej2j8nvb5gcj" path="res://entities/plants/resources/plant_parts/FlowerB.tres" id="25_alra6"]
|
||||
[ext_resource type="Resource" uid="uid://0r8c2a0el62b" path="res://entities/plants/resources/plant_parts/LeafK.tres" id="26_lggh7"]
|
||||
[ext_resource type="Resource" uid="uid://tkawqtegn22i" path="res://entities/plants/resources/plant_parts/LeafHC.tres" id="27_4gk8a"]
|
||||
[ext_resource type="Resource" uid="uid://brncfknw1awlg" path="res://entities/plants/resources/plant_parts/FlowerK.tres" id="28_lggh7"]
|
||||
[ext_resource type="Resource" uid="uid://bbf7r65a17tpu" path="res://entities/plants/resources/plant_parts/FlowerL.tres" id="29_8r35x"]
|
||||
[ext_resource type="Script" uid="uid://hs3i48clok85" path="res://entities/plants/scripts/texture_builder/seed_texture_set.gd" id="47_jbu3q"]
|
||||
[ext_resource type="Texture2D" uid="uid://cuqocuhfpdful" path="res://entities/plants/assets/sprites/seeds/pick-sphere/color_1.png" id="48_21cjy"]
|
||||
[ext_resource type="Texture2D" uid="uid://tcjcq04akuns" path="res://entities/plants/assets/sprites/seeds/pick-sphere/color_2.png" id="49_rs2ow"]
|
||||
@@ -52,13 +55,13 @@ baby_bases_start_ind = 2
|
||||
branches = ExtResource("3_0ca8x")
|
||||
base_leaves = ExtResource("4_js3cu")
|
||||
part_group = Dictionary[String, ExtResource("5_npk80")]({
|
||||
"ADAPTIVE": ExtResource("28_lggh7"),
|
||||
"ANCIENT": ExtResource("6_hyb2i"),
|
||||
"CLEANING": ExtResource("8_alra6"),
|
||||
"CUTTING": ExtResource("9_lggh7"),
|
||||
"ERMIT": ExtResource("7_4gk8a"),
|
||||
"FERTILE": ExtResource("10_8r35x"),
|
||||
"GENEROUS": ExtResource("11_rbd7l"),
|
||||
"HUMIDE": ExtResource("12_tjaiv"),
|
||||
"HERMIT": ExtResource("7_4gk8a"),
|
||||
"HURRIED": ExtResource("12_nfxo0"),
|
||||
"PRECOCIOUS": ExtResource("13_i8j71"),
|
||||
"PROLIFIC": ExtResource("14_l2vrg"),
|
||||
@@ -67,11 +70,14 @@ part_group = Dictionary[String, ExtResource("5_npk80")]({
|
||||
"PURIFICATION": ExtResource("17_y02ao"),
|
||||
"QUALITY": ExtResource("18_s8rsj"),
|
||||
"QUICK": ExtResource("19_cfiqo"),
|
||||
"RESISTANT": ExtResource("29_8r35x"),
|
||||
"RHIZOME": ExtResource("20_coupj"),
|
||||
"ROBUST": ExtResource("21_ggud5"),
|
||||
"SAVIOR": ExtResource("27_4gk8a"),
|
||||
"SOCIABLE": ExtResource("23_hyb2i"),
|
||||
"SPONTANEOUS": ExtResource("24_4gk8a"),
|
||||
"TOUGH": ExtResource("25_alra6"),
|
||||
"TROPICAL": ExtResource("12_tjaiv"),
|
||||
"VIVACIOUS": ExtResource("26_lggh7")
|
||||
})
|
||||
chance_to_have_part = 1.0
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 8.4 MiB After Width: | Height: | Size: 8.6 MiB |
@@ -4,21 +4,32 @@
|
||||
[ext_resource type="Script" uid="uid://c360ic1aost1n" path="res://entities/plants/scripts/texture_builder/plant_part_builder.gd" id="2_aiy5l"]
|
||||
[ext_resource type="Script" path="res://entities/plants/scripts/texture_builder/plant_attach_builder.gd" id="3_vh6ap"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_yh7e0"]
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_o2vh8"]
|
||||
atlas = ExtResource("1_14px2")
|
||||
region = Rect2(2026, 905, 182, 173)
|
||||
region = Rect2(4273, 876, 362, 319)
|
||||
|
||||
[node name="Sprite" type="Sprite2D" unique_id=1642167049 node_paths=PackedStringArray("root", "attaches")]
|
||||
texture = SubResource("AtlasTexture_yh7e0")
|
||||
texture = SubResource("AtlasTexture_o2vh8")
|
||||
script = ExtResource("2_aiy5l")
|
||||
part_name = "FlowerJ"
|
||||
type = 3
|
||||
part_name = "LeafG"
|
||||
part_index = 4
|
||||
type = 2
|
||||
root = NodePath("Root")
|
||||
attaches = NodePath("Attaches")
|
||||
|
||||
[node name="Root" type="Node2D" parent="." unique_id=1437082577]
|
||||
position = Vector2(-1, 8)
|
||||
position = Vector2(128, 73)
|
||||
script = ExtResource("3_vh6ap")
|
||||
attach_types = Array[int]([2, 3])
|
||||
attach_types = Array[int]([1])
|
||||
|
||||
[node name="Attaches" type="Node" parent="." unique_id=1834697767]
|
||||
|
||||
[node name="attach0" type="Node2D" parent="Attaches" unique_id=1182953632]
|
||||
position = Vector2(-32, -8)
|
||||
script = ExtResource("3_vh6ap")
|
||||
attach_types = Array[int]([2])
|
||||
|
||||
[node name="attach1" type="Node2D" parent="Attaches" unique_id=268023553]
|
||||
position = Vector2(116, -91)
|
||||
script = ExtResource("3_vh6ap")
|
||||
attach_types = Array[int]([2])
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
[gd_resource type="Resource" script_class="PartGroup" format=3 uid="uid://brncfknw1awlg"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://b3jwglylqdqtw" path="res://entities/plants/scripts/texture_builder/plant_part.gd" id="1_isac4"]
|
||||
[ext_resource type="Script" path="res://entities/plants/scripts/texture_builder/plant_attach.gd" id="2_vws4b"]
|
||||
[ext_resource type="Texture2D" uid="uid://bdwmandgxrjgn" path="res://entities/plants/assets/sprites/asset_plantes.png" id="3_5hrov"]
|
||||
[ext_resource type="Script" uid="uid://u2j7hn5her8i" path="res://entities/plants/scripts/texture_builder/part_group.gd" id="4_uv0kk"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_hbnvq"]
|
||||
script = ExtResource("2_vws4b")
|
||||
position = Vector2(5, 1)
|
||||
attach_types = Array[int]([2, 3])
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_o3uax"]
|
||||
atlas = ExtResource("3_5hrov")
|
||||
region = Rect2(5176, 2906, 267, 243)
|
||||
|
||||
[sub_resource type="Resource" id="Resource_ampdg"]
|
||||
resource_name = "FlowerK"
|
||||
script = ExtResource("1_isac4")
|
||||
texture = SubResource("AtlasTexture_o3uax")
|
||||
type = 3
|
||||
root = SubResource("Resource_hbnvq")
|
||||
|
||||
[resource]
|
||||
script = ExtResource("4_uv0kk")
|
||||
parts = Array[ExtResource("1_isac4")]([SubResource("Resource_ampdg")])
|
||||
@@ -0,0 +1,74 @@
|
||||
[gd_resource type="Resource" script_class="PartGroup" format=3 uid="uid://bbf7r65a17tpu"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://b3jwglylqdqtw" path="res://entities/plants/scripts/texture_builder/plant_part.gd" id="1_eyrnl"]
|
||||
[ext_resource type="Script" path="res://entities/plants/scripts/texture_builder/plant_attach.gd" id="2_80edi"]
|
||||
[ext_resource type="Texture2D" uid="uid://bdwmandgxrjgn" path="res://entities/plants/assets/sprites/asset_plantes.png" id="3_7f1vl"]
|
||||
[ext_resource type="Script" uid="uid://u2j7hn5her8i" path="res://entities/plants/scripts/texture_builder/part_group.gd" id="4_erq37"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_80edi"]
|
||||
script = ExtResource("2_80edi")
|
||||
position = Vector2(5, 1)
|
||||
attach_types = Array[int]([2])
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_7f1vl"]
|
||||
atlas = ExtResource("3_7f1vl")
|
||||
region = Rect2(305, 3232, 134, 130)
|
||||
|
||||
[sub_resource type="Resource" id="Resource_erq37"]
|
||||
resource_name = "FlowerL"
|
||||
script = ExtResource("1_eyrnl")
|
||||
texture = SubResource("AtlasTexture_7f1vl")
|
||||
type = 3
|
||||
root = SubResource("Resource_80edi")
|
||||
|
||||
[sub_resource type="Resource" id="Resource_eyrnl"]
|
||||
script = ExtResource("2_80edi")
|
||||
position = Vector2(5, 1)
|
||||
attach_types = Array[int]([2, 3])
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_80edi"]
|
||||
atlas = ExtResource("3_7f1vl")
|
||||
region = Rect2(1203, 2177, 173, 178)
|
||||
|
||||
[sub_resource type="Resource" id="Resource_7f1vl"]
|
||||
resource_name = "FlowerL"
|
||||
script = ExtResource("1_eyrnl")
|
||||
texture = SubResource("AtlasTexture_80edi")
|
||||
type = 3
|
||||
root = SubResource("Resource_eyrnl")
|
||||
|
||||
[sub_resource type="Resource" id="Resource_tquja"]
|
||||
script = ExtResource("2_80edi")
|
||||
position = Vector2(5, 1)
|
||||
attach_types = Array[int]([3])
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_y7h5i"]
|
||||
atlas = ExtResource("3_7f1vl")
|
||||
region = Rect2(384, 3058, 189, 179)
|
||||
|
||||
[sub_resource type="Resource" id="Resource_o81jt"]
|
||||
resource_name = "FlowerL"
|
||||
script = ExtResource("1_eyrnl")
|
||||
texture = SubResource("AtlasTexture_y7h5i")
|
||||
type = 3
|
||||
root = SubResource("Resource_tquja")
|
||||
|
||||
[sub_resource type="Resource" id="Resource_y7h5i"]
|
||||
script = ExtResource("2_80edi")
|
||||
position = Vector2(5, 1)
|
||||
attach_types = Array[int]([3, 2])
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_o81jt"]
|
||||
atlas = ExtResource("3_7f1vl")
|
||||
region = Rect2(12, 3055, 172, 176)
|
||||
|
||||
[sub_resource type="Resource" id="Resource_646hy"]
|
||||
resource_name = "FlowerL"
|
||||
script = ExtResource("1_eyrnl")
|
||||
texture = SubResource("AtlasTexture_o81jt")
|
||||
type = 3
|
||||
root = SubResource("Resource_y7h5i")
|
||||
|
||||
[resource]
|
||||
script = ExtResource("4_erq37")
|
||||
parts = Array[ExtResource("1_eyrnl")]([SubResource("Resource_erq37"), SubResource("Resource_7f1vl"), SubResource("Resource_o81jt"), SubResource("Resource_646hy")])
|
||||
@@ -0,0 +1,74 @@
|
||||
[gd_resource type="Resource" script_class="PartGroup" format=3 uid="uid://bq4y81r00iaf2"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://b3jwglylqdqtw" path="res://entities/plants/scripts/texture_builder/plant_part.gd" id="1_apvtp"]
|
||||
[ext_resource type="Script" path="res://entities/plants/scripts/texture_builder/plant_attach.gd" id="2_ihc58"]
|
||||
[ext_resource type="Texture2D" uid="uid://bdwmandgxrjgn" path="res://entities/plants/assets/sprites/asset_plantes.png" id="3_5xjus"]
|
||||
[ext_resource type="Script" uid="uid://u2j7hn5her8i" path="res://entities/plants/scripts/texture_builder/part_group.gd" id="4_x6qam"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_rai42"]
|
||||
script = ExtResource("2_ihc58")
|
||||
position = Vector2(5, 1)
|
||||
attach_types = Array[int]([2])
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_arjeg"]
|
||||
atlas = ExtResource("3_5xjus")
|
||||
region = Rect2(1363, 3208, 145, 140)
|
||||
|
||||
[sub_resource type="Resource" id="Resource_js1rq"]
|
||||
resource_name = "FlowerM"
|
||||
script = ExtResource("1_apvtp")
|
||||
texture = SubResource("AtlasTexture_arjeg")
|
||||
type = 3
|
||||
root = SubResource("Resource_rai42")
|
||||
|
||||
[sub_resource type="Resource" id="Resource_apvtp"]
|
||||
script = ExtResource("2_ihc58")
|
||||
position = Vector2(5, 1)
|
||||
attach_types = Array[int]([2, 3])
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_ihc58"]
|
||||
atlas = ExtResource("3_5xjus")
|
||||
region = Rect2(187, 3055, 181, 165)
|
||||
|
||||
[sub_resource type="Resource" id="Resource_5xjus"]
|
||||
resource_name = "FlowerM"
|
||||
script = ExtResource("1_apvtp")
|
||||
texture = SubResource("AtlasTexture_ihc58")
|
||||
type = 3
|
||||
root = SubResource("Resource_apvtp")
|
||||
|
||||
[sub_resource type="Resource" id="Resource_ihc58"]
|
||||
script = ExtResource("2_ihc58")
|
||||
position = Vector2(5, 1)
|
||||
attach_types = Array[int]([2, 3])
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_5xjus"]
|
||||
atlas = ExtResource("3_5xjus")
|
||||
region = Rect2(114, 3216, 165, 152)
|
||||
|
||||
[sub_resource type="Resource" id="Resource_x6qam"]
|
||||
resource_name = "FlowerM"
|
||||
script = ExtResource("1_apvtp")
|
||||
texture = SubResource("AtlasTexture_5xjus")
|
||||
type = 3
|
||||
root = SubResource("Resource_ihc58")
|
||||
|
||||
[sub_resource type="Resource" id="Resource_arjeg"]
|
||||
script = ExtResource("2_ihc58")
|
||||
position = Vector2(5, 1)
|
||||
attach_types = Array[int]([3])
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_js1rq"]
|
||||
atlas = ExtResource("3_5xjus")
|
||||
region = Rect2(12, 3055, 172, 176)
|
||||
|
||||
[sub_resource type="Resource" id="Resource_d4bxc"]
|
||||
resource_name = "FlowerM"
|
||||
script = ExtResource("1_apvtp")
|
||||
texture = SubResource("AtlasTexture_js1rq")
|
||||
type = 3
|
||||
root = SubResource("Resource_arjeg")
|
||||
|
||||
[resource]
|
||||
script = ExtResource("4_x6qam")
|
||||
parts = Array[ExtResource("1_apvtp")]([SubResource("Resource_js1rq"), SubResource("Resource_5xjus"), SubResource("Resource_x6qam"), SubResource("Resource_d4bxc")])
|
||||
@@ -1,32 +1,189 @@
|
||||
[gd_resource type="Resource" script_class="PartGroup" format=3 uid="uid://dvwmk2suorf05"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://b3jwglylqdqtw" path="res://entities/plants/scripts/texture_builder/plant_part.gd" id="1_p4gde"]
|
||||
[ext_resource type="Script" path="res://entities/plants/scripts/texture_builder/plant_attach.gd" id="2_scyei"]
|
||||
[ext_resource type="Script" uid="uid://co46ywm8bgnfh" path="res://entities/plants/scripts/texture_builder/plant_attach.gd" id="2_scyei"]
|
||||
[ext_resource type="Texture2D" uid="uid://bdwmandgxrjgn" path="res://entities/plants/assets/sprites/asset_plantes.png" id="3_2i3vh"]
|
||||
[ext_resource type="Script" uid="uid://u2j7hn5her8i" path="res://entities/plants/scripts/texture_builder/part_group.gd" id="4_rt28t"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_iqjxq"]
|
||||
script = ExtResource("2_scyei")
|
||||
position = Vector2(-20, -3)
|
||||
position = Vector2(-8, -3)
|
||||
attach_types = Array[int]([2])
|
||||
|
||||
[sub_resource type="Resource" id="Resource_8w5hg"]
|
||||
script = ExtResource("2_scyei")
|
||||
position = Vector2(124, 72)
|
||||
position = Vector2(137, 73)
|
||||
attach_types = Array[int]([1])
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_yh7e0"]
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_m6uos"]
|
||||
atlas = ExtResource("3_2i3vh")
|
||||
region = Rect2(4923, 111, 282, 177)
|
||||
region = Rect2(4891, 116, 319, 167)
|
||||
|
||||
[sub_resource type="Resource" id="Resource_m6uos"]
|
||||
[sub_resource type="Resource" id="Resource_dw4y8"]
|
||||
resource_name = "LeafG"
|
||||
script = ExtResource("1_p4gde")
|
||||
texture = SubResource("AtlasTexture_yh7e0")
|
||||
texture = SubResource("AtlasTexture_m6uos")
|
||||
type = 2
|
||||
root = SubResource("Resource_8w5hg")
|
||||
attaches = Array[ExtResource("2_scyei")]([SubResource("Resource_iqjxq")])
|
||||
|
||||
[sub_resource type="Resource" id="Resource_p4gde"]
|
||||
script = ExtResource("2_scyei")
|
||||
position = Vector2(-19, -20)
|
||||
attach_types = Array[int]([2])
|
||||
|
||||
[sub_resource type="Resource" id="Resource_scyei"]
|
||||
script = ExtResource("2_scyei")
|
||||
position = Vector2(141, 61)
|
||||
attach_types = Array[int]([1])
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_2i3vh"]
|
||||
atlas = ExtResource("3_2i3vh")
|
||||
region = Rect2(4813, 290, 324, 282)
|
||||
|
||||
[sub_resource type="Resource" id="Resource_rt28t"]
|
||||
resource_name = "LeafG"
|
||||
script = ExtResource("1_p4gde")
|
||||
texture = SubResource("AtlasTexture_2i3vh")
|
||||
type = 2
|
||||
root = SubResource("Resource_scyei")
|
||||
attaches = Array[ExtResource("2_scyei")]([SubResource("Resource_p4gde")])
|
||||
|
||||
[sub_resource type="Resource" id="Resource_2i3vh"]
|
||||
script = ExtResource("2_scyei")
|
||||
position = Vector2(12, -25)
|
||||
attach_types = Array[int]([2])
|
||||
|
||||
[sub_resource type="Resource" id="Resource_m6uos"]
|
||||
script = ExtResource("2_scyei")
|
||||
position = Vector2(11, 65)
|
||||
attach_types = Array[int]([3])
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_yx3hg"]
|
||||
atlas = ExtResource("3_2i3vh")
|
||||
region = Rect2(5220, 149, 127, 167)
|
||||
|
||||
[sub_resource type="Resource" id="Resource_sfgdq"]
|
||||
resource_name = "LeafG"
|
||||
script = ExtResource("1_p4gde")
|
||||
texture = SubResource("AtlasTexture_yx3hg")
|
||||
type = 2
|
||||
root = SubResource("Resource_m6uos")
|
||||
attaches = Array[ExtResource("2_scyei")]([SubResource("Resource_2i3vh")])
|
||||
|
||||
[sub_resource type="Resource" id="Resource_p0ibe"]
|
||||
script = ExtResource("2_scyei")
|
||||
position = Vector2(0, -19)
|
||||
attach_types = Array[int]([2])
|
||||
|
||||
[sub_resource type="Resource" id="Resource_802dr"]
|
||||
script = ExtResource("2_scyei")
|
||||
position = Vector2(11, 74)
|
||||
attach_types = Array[int]([3])
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_4l34w"]
|
||||
atlas = ExtResource("3_2i3vh")
|
||||
region = Rect2(5179, 329, 145, 193)
|
||||
|
||||
[sub_resource type="Resource" id="Resource_nq8sv"]
|
||||
resource_name = "LeafG"
|
||||
script = ExtResource("1_p4gde")
|
||||
texture = SubResource("AtlasTexture_4l34w")
|
||||
type = 2
|
||||
root = SubResource("Resource_802dr")
|
||||
attaches = Array[ExtResource("2_scyei")]([SubResource("Resource_p0ibe")])
|
||||
|
||||
[sub_resource type="Resource" id="Resource_4l34w"]
|
||||
script = ExtResource("2_scyei")
|
||||
position = Vector2(-32, -8)
|
||||
attach_types = Array[int]([2])
|
||||
|
||||
[sub_resource type="Resource" id="Resource_c8nhr"]
|
||||
script = ExtResource("2_scyei")
|
||||
position = Vector2(116, -91)
|
||||
attach_types = Array[int]([2])
|
||||
|
||||
[sub_resource type="Resource" id="Resource_1r02i"]
|
||||
script = ExtResource("2_scyei")
|
||||
position = Vector2(128, 73)
|
||||
attach_types = Array[int]([1])
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_o2vh8"]
|
||||
atlas = ExtResource("3_2i3vh")
|
||||
region = Rect2(4273, 876, 362, 319)
|
||||
|
||||
[sub_resource type="Resource" id="Resource_plgvq"]
|
||||
resource_name = "LeafG"
|
||||
script = ExtResource("1_p4gde")
|
||||
texture = SubResource("AtlasTexture_o2vh8")
|
||||
type = 2
|
||||
root = SubResource("Resource_1r02i")
|
||||
attaches = Array[ExtResource("2_scyei")]([SubResource("Resource_4l34w"), SubResource("Resource_c8nhr")])
|
||||
|
||||
[sub_resource type="Resource" id="Resource_o2vh8"]
|
||||
script = ExtResource("2_scyei")
|
||||
position = Vector2(3, 20)
|
||||
attach_types = Array[int]([2])
|
||||
|
||||
[sub_resource type="Resource" id="Resource_lo685"]
|
||||
script = ExtResource("2_scyei")
|
||||
position = Vector2(51, -90)
|
||||
attach_types = Array[int]([2])
|
||||
|
||||
[sub_resource type="Resource" id="Resource_tudco"]
|
||||
script = ExtResource("2_scyei")
|
||||
position = Vector2(-52, -106)
|
||||
attach_types = Array[int]([2])
|
||||
|
||||
[sub_resource type="Resource" id="Resource_u3h67"]
|
||||
script = ExtResource("2_scyei")
|
||||
position = Vector2(164, 104)
|
||||
attach_types = Array[int]([1])
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_x2l6y"]
|
||||
atlas = ExtResource("3_2i3vh")
|
||||
region = Rect2(4317, 1210, 372, 391)
|
||||
|
||||
[sub_resource type="Resource" id="Resource_xyldh"]
|
||||
resource_name = "LeafG"
|
||||
script = ExtResource("1_p4gde")
|
||||
texture = SubResource("AtlasTexture_x2l6y")
|
||||
type = 2
|
||||
root = SubResource("Resource_u3h67")
|
||||
attaches = Array[ExtResource("2_scyei")]([SubResource("Resource_o2vh8"), SubResource("Resource_lo685"), SubResource("Resource_tudco")])
|
||||
|
||||
[sub_resource type="Resource" id="Resource_x2l6y"]
|
||||
script = ExtResource("2_scyei")
|
||||
position = Vector2(-23, 47)
|
||||
attach_types = Array[int]([2])
|
||||
|
||||
[sub_resource type="Resource" id="Resource_qjke8"]
|
||||
script = ExtResource("2_scyei")
|
||||
position = Vector2(16, -56)
|
||||
attach_types = Array[int]([2])
|
||||
|
||||
[sub_resource type="Resource" id="Resource_k00bd"]
|
||||
script = ExtResource("2_scyei")
|
||||
position = Vector2(101, 6)
|
||||
attach_types = Array[int]([2])
|
||||
|
||||
[sub_resource type="Resource" id="Resource_l10lm"]
|
||||
script = ExtResource("2_scyei")
|
||||
position = Vector2(121, 124)
|
||||
attach_types = Array[int]([1])
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_dw4y8"]
|
||||
atlas = ExtResource("3_2i3vh")
|
||||
region = Rect2(3569, 2493, 339, 308)
|
||||
|
||||
[sub_resource type="Resource" id="Resource_v6stg"]
|
||||
resource_name = "LeafG"
|
||||
script = ExtResource("1_p4gde")
|
||||
texture = SubResource("AtlasTexture_dw4y8")
|
||||
type = 2
|
||||
root = SubResource("Resource_l10lm")
|
||||
attaches = Array[ExtResource("2_scyei")]([SubResource("Resource_x2l6y"), SubResource("Resource_qjke8"), SubResource("Resource_k00bd")])
|
||||
|
||||
[resource]
|
||||
script = ExtResource("4_rt28t")
|
||||
parts = Array[ExtResource("1_p4gde")]([SubResource("Resource_m6uos")])
|
||||
parts = Array[ExtResource("1_p4gde")]([SubResource("Resource_dw4y8"), SubResource("Resource_rt28t"), SubResource("Resource_sfgdq"), SubResource("Resource_nq8sv"), SubResource("Resource_plgvq"), SubResource("Resource_xyldh"), SubResource("Resource_v6stg")])
|
||||
|
||||
@@ -14,7 +14,9 @@ extends Node
|
||||
|
||||
@export var camera_speed := 1000.0
|
||||
|
||||
var test_progression_data: TestProgressionData
|
||||
var input_dir := Vector2.ZERO
|
||||
var checkBoxes: Dictionary[String, CheckBox]
|
||||
|
||||
func _ready():
|
||||
%Speed.value = camera_speed
|
||||
@@ -28,6 +30,19 @@ func _ready():
|
||||
%EndAge.visible = random_state
|
||||
%MinLvl.value = min_level
|
||||
%MaxLvl.value = max_level
|
||||
test_progression_data = TestProgressionData.new()
|
||||
GameInfo.game_data.progression_data = test_progression_data
|
||||
for m in test_progression_data.get_all_mutations():
|
||||
var lineContainer := HBoxContainer.new()
|
||||
var checkBox := CheckBox.new()
|
||||
checkBox.button_pressed = true
|
||||
checkBox.toggled.connect(func(toggled_on): toggle_mutation_available(m, toggled_on))
|
||||
checkBoxes[m.id] = checkBox
|
||||
lineContainer.add_child(checkBox)
|
||||
var label := Label.new()
|
||||
label.text = m.id
|
||||
lineContainer.add_child(label)
|
||||
%PossibleMutationContainer.add_child(lineContainer)
|
||||
generate_plants();
|
||||
|
||||
func _unhandled_key_input(_event) -> void:
|
||||
@@ -67,7 +82,6 @@ func generate_plants():
|
||||
var plant: Plant = Plant.new(plant_data)
|
||||
print(plant.data.plant_name)
|
||||
%Plants.add_child(plant)
|
||||
# plant.set_owner(self )
|
||||
plant.global_position = plant_position
|
||||
|
||||
func generate_seeds():
|
||||
@@ -139,3 +153,33 @@ func _on_min_lvl_value_changed(value: float) -> void:
|
||||
|
||||
func _on_max_lvl_value_changed(value: float) -> void:
|
||||
max_level = int(value)
|
||||
|
||||
func toggle_mutation_available(mutation: PlantMutation, toggled_on: bool):
|
||||
if toggled_on:
|
||||
test_progression_data.discover_mutation(mutation)
|
||||
else:
|
||||
test_progression_data.lock_mutation(mutation)
|
||||
checkBoxes[mutation.id].set_pressed_no_signal(toggled_on)
|
||||
|
||||
func _on_toggle_on_all() -> void:
|
||||
for m in test_progression_data.get_all_mutations():
|
||||
test_progression_data.discover_mutation(m)
|
||||
checkBoxes[m.id].set_pressed_no_signal(true)
|
||||
|
||||
func _on_toggle_off_all() -> void:
|
||||
for m in test_progression_data.get_all_mutations():
|
||||
test_progression_data.lock_mutation(m)
|
||||
checkBoxes[m.id].set_pressed_no_signal(false)
|
||||
|
||||
func _on_toggle_all() -> void:
|
||||
for m in test_progression_data.get_all_mutations():
|
||||
if test_progression_data.mutations_available.has(m.id):
|
||||
test_progression_data.lock_mutation(m)
|
||||
checkBoxes[m.id].set_pressed_no_signal(false)
|
||||
else:
|
||||
test_progression_data.discover_mutation(m)
|
||||
checkBoxes[m.id].set_pressed_no_signal(true)
|
||||
|
||||
func update_checkboxes() -> void:
|
||||
for key in checkBoxes:
|
||||
checkBoxes[key].set_pressed_no_signal(test_progression_data.mutations_available.has(key))
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
extends Resource
|
||||
class_name PlantAttach
|
||||
|
||||
enum AttachType {BIG_ATTACH, MEDIUM_ATTACH, FLOWER_ATTACH, SMALL_ATTACH}
|
||||
enum AttachType {DEPRECATED, MEDIUM_ATTACH, FLOWER_ATTACH, SMALL_ATTACH}
|
||||
|
||||
@export var position: Vector2
|
||||
@export var attach_types: Array[AttachType]
|
||||
|
||||
@@ -55,6 +55,12 @@ func _ready() -> void:
|
||||
bases[i] = all_bases.parts[i]
|
||||
else:
|
||||
baby_bases[i - baby_bases_start_ind] = all_bases.parts[i]
|
||||
for mutation_id in part_group:
|
||||
if GameInfo.game_data.progression_data.get_all_mutations().find_custom(func(m): return m.id == mutation_id) < 0:
|
||||
printerr("Mutation ID \"", mutation_id, "\" not existant")
|
||||
for m in GameInfo.game_data.progression_data.get_all_mutations():
|
||||
if not part_group.keys().has(m.id):
|
||||
printerr("Missing mutation ID \"", m.id, "\"")
|
||||
|
||||
func random_ind(array: Array) -> int:
|
||||
return rng.randi_range(0, array.size() - 1)
|
||||
|
||||
@@ -175,13 +175,40 @@ layout_mode = 2
|
||||
|
||||
[node name="PossibleMutations" type="FoldableContainer" parent="Camera2D/CanvasLayer/VBoxContainer/Folder/VBoxContainer" unique_id=71622472]
|
||||
layout_mode = 2
|
||||
folded = true
|
||||
title = "Possible Mutations"
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="Camera2D/CanvasLayer/VBoxContainer/Folder/VBoxContainer/PossibleMutations" unique_id=611287858]
|
||||
visible = false
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="Camera2D/CanvasLayer/VBoxContainer/Folder/VBoxContainer/PossibleMutations" unique_id=924496971]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="Camera2D/CanvasLayer/VBoxContainer/Folder/VBoxContainer/PossibleMutations/VBoxContainer" unique_id=1818974229]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="AllOn" type="Button" parent="Camera2D/CanvasLayer/VBoxContainer/Folder/VBoxContainer/PossibleMutations/VBoxContainer/HBoxContainer" unique_id=1782227791]
|
||||
custom_minimum_size = Vector2(20, 0)
|
||||
layout_mode = 2
|
||||
text = "All on"
|
||||
|
||||
[node name="AllOff" type="Button" parent="Camera2D/CanvasLayer/VBoxContainer/Folder/VBoxContainer/PossibleMutations/VBoxContainer/HBoxContainer" unique_id=1397119927]
|
||||
custom_minimum_size = Vector2(20, 0)
|
||||
layout_mode = 2
|
||||
text = "All off"
|
||||
|
||||
[node name="Invert all" type="Button" parent="Camera2D/CanvasLayer/VBoxContainer/Folder/VBoxContainer/PossibleMutations/VBoxContainer/HBoxContainer" unique_id=970535768]
|
||||
custom_minimum_size = Vector2(20, 0)
|
||||
layout_mode = 2
|
||||
text = "Invert all"
|
||||
|
||||
[node name="ScrollContainer" type="ScrollContainer" parent="Camera2D/CanvasLayer/VBoxContainer/Folder/VBoxContainer/PossibleMutations/VBoxContainer" unique_id=1133261960]
|
||||
custom_minimum_size = Vector2(100, 100)
|
||||
layout_mode = 2
|
||||
|
||||
[node name="PossibleMutationContainer" type="VBoxContainer" parent="Camera2D/CanvasLayer/VBoxContainer/Folder/VBoxContainer/PossibleMutations/VBoxContainer/ScrollContainer" unique_id=611287858]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(100, 100)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="Plants" type="Node" parent="." unique_id=849342032]
|
||||
unique_name_in_owner = true
|
||||
|
||||
@@ -206,3 +233,6 @@ tile_set = ExtResource("3_3mb6h")
|
||||
[connection signal="value_changed" from="Camera2D/CanvasLayer/VBoxContainer/Folder/VBoxContainer/AgeContainer/EndAge" to="." method="_on_end_age_value_changed"]
|
||||
[connection signal="value_changed" from="Camera2D/CanvasLayer/VBoxContainer/Folder/VBoxContainer/MutationLvlContainer/MinLvl" to="." method="_on_min_lvl_value_changed"]
|
||||
[connection signal="value_changed" from="Camera2D/CanvasLayer/VBoxContainer/Folder/VBoxContainer/MutationLvlContainer/MaxLvl" to="." method="_on_max_lvl_value_changed"]
|
||||
[connection signal="pressed" from="Camera2D/CanvasLayer/VBoxContainer/Folder/VBoxContainer/PossibleMutations/VBoxContainer/HBoxContainer/AllOn" to="." method="_on_toggle_on_all"]
|
||||
[connection signal="pressed" from="Camera2D/CanvasLayer/VBoxContainer/Folder/VBoxContainer/PossibleMutations/VBoxContainer/HBoxContainer/AllOff" to="." method="_on_toggle_off_all"]
|
||||
[connection signal="pressed" from="Camera2D/CanvasLayer/VBoxContainer/Folder/VBoxContainer/PossibleMutations/VBoxContainer/HBoxContainer/Invert all" to="." method="_on_toggle_all"]
|
||||
|
||||
Reference in New Issue
Block a user