diff --git a/common/scene_manager/scenes/region_selection.tres b/common/scene_manager/scenes/region_selection.tres index 09c2fdc..96c220b 100644 --- a/common/scene_manager/scenes/region_selection.tres +++ b/common/scene_manager/scenes/region_selection.tres @@ -1,4 +1,4 @@ -[gd_resource type="Resource" script_class="Scene" load_steps=2 format=3 uid="uid://c27wenetitwm"] +[gd_resource type="Resource" script_class="Scene" format=3 uid="uid://c27wenetitwm"] [ext_resource type="Script" uid="uid://1ejbvr3431ac" path="res://common/scene_manager/scripts/scene.gd" id="1_smjh0"] diff --git a/entities/interactables/truck/recharge/STW_Props_Batterie_Batterie.png b/entities/interactables/truck/recharge/STW_Props_Batterie_Batterie.png new file mode 100644 index 0000000..60d5da9 Binary files /dev/null and b/entities/interactables/truck/recharge/STW_Props_Batterie_Batterie.png differ diff --git a/entities/interactables/truck/recharge/STW_Props_Batterie_Batterie.png.import b/entities/interactables/truck/recharge/STW_Props_Batterie_Batterie.png.import new file mode 100644 index 0000000..7edf5cc --- /dev/null +++ b/entities/interactables/truck/recharge/STW_Props_Batterie_Batterie.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://btd145u4gsl6e" +path="res://.godot/imported/STW_Props_Batterie_Batterie.png-e86ef8c6fb521816f6ab0e9e3c31302a.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://entities/interactables/truck/recharge/STW_Props_Batterie_Batterie.png" +dest_files=["res://.godot/imported/STW_Props_Batterie_Batterie.png-e86ef8c6fb521816f6ab0e9e3c31302a.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/entities/interactables/truck/recharge/STW_Props_Batterie_Glass_V2.png b/entities/interactables/truck/recharge/STW_Props_Batterie_Glass_V2.png new file mode 100644 index 0000000..37de31c Binary files /dev/null and b/entities/interactables/truck/recharge/STW_Props_Batterie_Glass_V2.png differ diff --git a/entities/interactables/truck/recharge/STW_Props_Batterie_Glass_V2.png.import b/entities/interactables/truck/recharge/STW_Props_Batterie_Glass_V2.png.import new file mode 100644 index 0000000..8d892a3 --- /dev/null +++ b/entities/interactables/truck/recharge/STW_Props_Batterie_Glass_V2.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bhi3mwl23flwp" +path="res://.godot/imported/STW_Props_Batterie_Glass_V2.png-2570fc408c8be4e7f4915767fa8509d5.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://entities/interactables/truck/recharge/STW_Props_Batterie_Glass_V2.png" +dest_files=["res://.godot/imported/STW_Props_Batterie_Glass_V2.png-2570fc408c8be4e7f4915767fa8509d5.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/entities/interactables/truck/recharge/STW_Props_Batterie_TERRE.png b/entities/interactables/truck/recharge/STW_Props_Batterie_TERRE.png new file mode 100644 index 0000000..a48787e Binary files /dev/null and b/entities/interactables/truck/recharge/STW_Props_Batterie_TERRE.png differ diff --git a/entities/interactables/truck/recharge/STW_Props_Batterie_TERRE.png.import b/entities/interactables/truck/recharge/STW_Props_Batterie_TERRE.png.import new file mode 100644 index 0000000..04c800a --- /dev/null +++ b/entities/interactables/truck/recharge/STW_Props_Batterie_TERRE.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c01f6ja6btsep" +path="res://.godot/imported/STW_Props_Batterie_TERRE.png-afd1054fe9f4dfcfe62f4aac6c389b45.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://entities/interactables/truck/recharge/STW_Props_Batterie_TERRE.png" +dest_files=["res://.godot/imported/STW_Props_Batterie_TERRE.png-afd1054fe9f4dfcfe62f4aac6c389b45.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/entities/interactables/truck/recharge/STW_Props_Batterie_V2.png b/entities/interactables/truck/recharge/STW_Props_Batterie_V2.png new file mode 100644 index 0000000..379abf2 Binary files /dev/null and b/entities/interactables/truck/recharge/STW_Props_Batterie_V2.png differ diff --git a/entities/interactables/truck/recharge/STW_Props_Batterie_V2.png.import b/entities/interactables/truck/recharge/STW_Props_Batterie_V2.png.import new file mode 100644 index 0000000..ef3af48 --- /dev/null +++ b/entities/interactables/truck/recharge/STW_Props_Batterie_V2.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cqecty3kl6yg6" +path="res://.godot/imported/STW_Props_Batterie_V2.png-5149763f9e1dac76893ec05c148e8056.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://entities/interactables/truck/recharge/STW_Props_Batterie_V2.png" +dest_files=["res://.godot/imported/STW_Props_Batterie_V2.png-5149763f9e1dac76893ec05c148e8056.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/entities/interactables/truck/recharge/scripts/truck_recharge.gd b/entities/interactables/truck/recharge/scripts/truck_recharge.gd index a69a8db..71e9089 100644 --- a/entities/interactables/truck/recharge/scripts/truck_recharge.gd +++ b/entities/interactables/truck/recharge/scripts/truck_recharge.gd @@ -3,7 +3,11 @@ class_name TruckRecharge func _ready(): if region: - %Bolt.modulate = Color.WHITE if region.data.charges > 0 else Color.RED + update() + +func update(): + %EnergyTextContainer.modulate = Color.WHITE if region.data.charges > 0 else Color.RED + %EnergyText.text = str(region.data.charges) func can_interact(_p : Player) -> bool: return ( @@ -18,7 +22,7 @@ func interact(_p: Player) -> bool: region.data.charges -= 1 region.pass_day() - %Bolt.modulate = Color.WHITE if region.data.charges > 0 else Color.RED + update() return true return false diff --git a/entities/interactables/truck/recharge/truck_recharge.tscn b/entities/interactables/truck/recharge/truck_recharge.tscn index 3aed9f5..6b51659 100644 --- a/entities/interactables/truck/recharge/truck_recharge.tscn +++ b/entities/interactables/truck/recharge/truck_recharge.tscn @@ -1,34 +1,75 @@ -[gd_scene load_steps=6 format=3 uid="uid://d324mlmgls4fs"] +[gd_scene format=3 uid="uid://d324mlmgls4fs"] [ext_resource type="Script" uid="uid://bsrn3gd2a532q" path="res://entities/interactables/truck/recharge/scripts/truck_recharge.gd" id="1_ipgcv"] -[ext_resource type="Texture2D" uid="uid://dlrj7tyi5wfh8" path="res://entities/interactables/ladder/assets/truck_ladder.png" id="2_87dtp"] +[ext_resource type="Texture2D" uid="uid://btd145u4gsl6e" path="res://entities/interactables/truck/recharge/STW_Props_Batterie_Batterie.png" id="2_ot7vv"] [ext_resource type="Texture2D" uid="uid://dcgnamu7sb3ov" path="res://common/icons/bolt.svg" id="3_jcfmm"] +[ext_resource type="FontFile" uid="uid://qt80w6o01q5s" path="res://gui/ressources/fonts/TitanOne-Regular.ttf" id="4_ot7vv"] +[ext_resource type="Texture2D" uid="uid://bhi3mwl23flwp" path="res://entities/interactables/truck/recharge/STW_Props_Batterie_Glass_V2.png" id="5_2okh4"] +[ext_resource type="Texture2D" uid="uid://c01f6ja6btsep" path="res://entities/interactables/truck/recharge/STW_Props_Batterie_TERRE.png" id="6_2okh4"] [sub_resource type="CapsuleShape2D" id="CapsuleShape2D_bjhct"] -radius = 26.0 -height = 106.0 +radius = 39.0 +height = 105.53573 -[sub_resource type="AtlasTexture" id="AtlasTexture_ot7vv"] -atlas = ExtResource("2_87dtp") -region = Rect2(64, 161, 101, 205) +[sub_resource type="LabelSettings" id="LabelSettings_1vpbi"] +font = ExtResource("4_ot7vv") +font_size = 30 -[node name="TruckRecharge" type="Area2D"] +[node name="TruckRecharge" type="Area2D" unique_id=1099196706] script = ExtResource("1_ipgcv") default_interact_text = "RECHARGE" default_info_title = "RECHARGE_STATION" default_info_desc = "RECHARGE_STATION_DESC_TEXT" metadata/_custom_type_script = "uid://dyprcd68fjstf" -[node name="CollisionShape2D" type="CollisionShape2D" parent="."] -position = Vector2(1, -14) +[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=2014886648] +position = Vector2(9, -53) shape = SubResource("CapsuleShape2D_bjhct") -[node name="RechargeStation" type="Sprite2D" parent="."] -position = Vector2(0, -17) +[node name="RechargeStation" type="Sprite2D" parent="." unique_id=1801951226] scale = Vector2(0.5, 0.5) -texture = SubResource("AtlasTexture_ot7vv") +texture = ExtResource("2_ot7vv") +offset = Vector2(0, -120) -[node name="Bolt" type="Sprite2D" parent="."] +[node name="EnergyTextContainer" type="HBoxContainer" parent="." unique_id=1392320184] unique_name_in_owner = true -position = Vector2(0, -15) +offset_left = -25.0 +offset_top = -63.0 +offset_right = 49.0 +offset_bottom = -15.0 +rotation = 0.18161926 +theme_override_constants/separation = 0 +alignment = 1 + +[node name="TextureRect" type="TextureRect" parent="EnergyTextContainer" unique_id=2088496808] +custom_minimum_size = Vector2(30, 0) +layout_mode = 2 texture = ExtResource("3_jcfmm") +expand_mode = 1 +stretch_mode = 5 + +[node name="EnergyText" type="Label" parent="EnergyTextContainer" unique_id=834929477] +unique_name_in_owner = true +layout_mode = 2 +text = "88" +label_settings = SubResource("LabelSettings_1vpbi") +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="Glass" type="Sprite2D" parent="." unique_id=825795322] +modulate = Color(1, 1, 1, 0.5294118) +scale = Vector2(0.5, 0.5) +texture = ExtResource("5_2okh4") +offset = Vector2(0, -120) + +[node name="Terre" type="Sprite2D" parent="." unique_id=1116476976] +scale = Vector2(0.5, 0.5) +texture = ExtResource("6_2okh4") +offset = Vector2(0, -120) + +[node name="StaticBody2D" type="StaticBody2D" parent="." unique_id=1324035615] + +[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D" unique_id=842130596] +position = Vector2(14, -56) +rotation = 0.18545866 +shape = SubResource("CapsuleShape2D_bjhct") diff --git a/entities/player/inventory/scripts/items/trowel.gd b/entities/player/inventory/scripts/items/trowel.gd index 0ae9279..323054c 100644 --- a/entities/player/inventory/scripts/items/trowel.gd +++ b/entities/player/inventory/scripts/items/trowel.gd @@ -16,6 +16,6 @@ func get_usage_zone_radius() -> int: return TROWEL_ZONE_RADIUS func harvest(p : Plant, player: Player): - ProduceSeedsEffect.new(1).effect(p) + # ProduceSeedsEffect.new(1).effect(p) AudioManager.play_sfx("Harvest") p.harvest() \ No newline at end of file diff --git a/entities/player/player.tscn b/entities/player/player.tscn index 2bf0a38..ca3dd4f 100644 --- a/entities/player/player.tscn +++ b/entities/player/player.tscn @@ -4,7 +4,7 @@ [ext_resource type="Texture2D" uid="uid://dompaj451gklw" path="res://entities/player/assets/sprites/movement_particles.png" id="2_bls4j"] [ext_resource type="Texture2D" uid="uid://ys5fis3gsnoy" path="res://entities/player/assets/sprites/shadow.png" id="2_fkugw"] [ext_resource type="Texture2D" uid="uid://c7ff87jniga5m" path="res://entities/player/assets/sprites/robot.png" id="4_bls4j"] -[ext_resource type="Script" uid="uid://b1mmtgmi5oq86" path="res://entities/player/scripts/player_sprite.gd" id="5_fkugw"] +[ext_resource type="Script" path="res://entities/player/scripts/player_sprite.gd" id="5_fkugw"] [sub_resource type="CircleShape2D" id="CircleShape2D_sglur"] radius = 27.0 @@ -164,12 +164,6 @@ script = ExtResource("1_abrql") position = Vector2(0, -17) shape = SubResource("CircleShape2D_sglur") -[node name="Shadow" type="Sprite2D" parent="." unique_id=875064259] -modulate = Color(0, 0, 0, 0.41568628) -position = Vector2(-1, 13) -scale = Vector2(0.41025653, 0.41025642) -texture = ExtResource("2_fkugw") - [node name="InteractArea2D" type="Area2D" parent="." unique_id=1048722411] position = Vector2(0, -12) @@ -186,13 +180,19 @@ gravity = Vector2(0, 100) scale_amount_curve = SubResource("Curve_fkugw") color_ramp = SubResource("Gradient_bls4j") +[node name="Shadow" type="Sprite2D" parent="." unique_id=875064259] +modulate = Color(0, 0, 0, 0.41568628) +z_index = -1 +scale = Vector2(0.41025653, 0.41025642) +texture = ExtResource("2_fkugw") + [node name="PlayerSprite" type="AnimatedSprite2D" parent="." unique_id=638545037] unique_name_in_owner = true position = Vector2(0.99999994, -17) scale = Vector2(0.0656168, 0.065616846) sprite_frames = SubResource("SpriteFrames_a1qjk") -animation = &"front_right" -frame_progress = 0.46771586 +animation = &"right" +offset = Vector2(0, -370) script = ExtResource("5_fkugw") wanted_orientation = 2 diff --git a/stages/region_selection/region_selection.tscn b/stages/region_selection/region_selection.tscn index 4b27aa3..36ea8ee 100644 --- a/stages/region_selection/region_selection.tscn +++ b/stages/region_selection/region_selection.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=12 format=3 uid="uid://bjs67nvh61otf"] +[gd_scene format=3 uid="uid://bjs67nvh61otf"] [ext_resource type="PackedScene" uid="uid://cm5b7w7j6527f" path="res://stages/title_screen/planet_3d.tscn" id="5_bi8m0"] [ext_resource type="Theme" uid="uid://bgcmd213j6gk1" path="res://gui/ressources/hud.tres" id="5_twywe"] @@ -9,7 +9,6 @@ [ext_resource type="Script" uid="uid://bmb4beevw5r40" path="res://stages/region_selection/scripts/region_selection.gd" id="8_jxqjc"] [sub_resource type="FastNoiseLite" id="FastNoiseLite_gqvix"] -seed = 1021033283 frequency = 1.0 [sub_resource type="ShaderMaterial" id="ShaderMaterial_ee13y"] @@ -46,33 +45,33 @@ adjustment_brightness = 1.04 adjustment_contrast = 1.2 adjustment_saturation = 0.88 -[node name="RegionSelectionScreen" type="Node3D"] +[node name="RegionSelectionScreen" type="Node3D" unique_id=1689785704] script = ExtResource("8_jxqjc") -[node name="Planet3d" parent="." instance=ExtResource("5_bi8m0")] +[node name="Planet3d" parent="." unique_id=1061481452 instance=ExtResource("5_bi8m0")] unique_name_in_owner = true transform = Transform3D(0.17364822, 0, -0.9848077, 0, 1, 0, 0.9848077, 0, 0.17364822, 0.0020446777, 0, 0) noise = SubResource("FastNoiseLite_gqvix") -[node name="RegionPointContainer" type="Node3D" parent="Planet3d"] +[node name="RegionPointContainer" type="Node3D" parent="Planet3d" unique_id=235517820] unique_name_in_owner = true -[node name="Camera3D" type="Camera3D" parent="."] +[node name="Camera3D" type="Camera3D" parent="." unique_id=778670888] transform = Transform3D(-1, 0, 8.742278e-08, 0, 1, 0, -8.742278e-08, 0, -1, 0, 0, -79.21178) current = true fov = 34.0 script = ExtResource("6_gcxbq") _sprite_layer = 1 -[node name="WorldEnvironment" type="WorldEnvironment" parent="."] +[node name="WorldEnvironment" type="WorldEnvironment" parent="." unique_id=421604487] environment = SubResource("Environment_187ay") -[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."] +[node name="DirectionalLight3D" type="DirectionalLight3D" parent="." unique_id=1857207701] transform = Transform3D(0.8423772, -0.34588623, 0.4132353, -0.5388884, -0.5406809, 0.6459594, 0, -0.76682913, -0.6418513, 0, 14.918039, 0) -[node name="Hud" type="CanvasLayer" parent="."] +[node name="Hud" type="CanvasLayer" parent="." unique_id=1116972494] -[node name="MarginContainer" type="MarginContainer" parent="Hud"] +[node name="MarginContainer" type="MarginContainer" parent="Hud" unique_id=1379729006] anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 @@ -80,14 +79,14 @@ grow_horizontal = 2 grow_vertical = 2 theme = ExtResource("5_twywe") -[node name="Label" type="Label" parent="Hud/MarginContainer"] +[node name="Label" type="Label" parent="Hud/MarginContainer" unique_id=57986359] layout_mode = 2 size_flags_horizontal = 0 size_flags_vertical = 0 text = "CHOOSE_A_REGION" label_settings = ExtResource("6_gqvix") -[node name="ReturnButton" type="Button" parent="Hud/MarginContainer"] +[node name="ReturnButton" type="Button" parent="Hud/MarginContainer" unique_id=475983266] unique_name_in_owner = true layout_mode = 2 size_flags_horizontal = 8 @@ -95,7 +94,7 @@ size_flags_vertical = 8 theme = ExtResource("5_twywe") text = "RETURN" -[node name="TravelValidation" parent="Hud" instance=ExtResource("7_gqvix")] +[node name="TravelValidation" parent="Hud" unique_id=205669320 instance=ExtResource("7_gqvix")] unique_name_in_owner = true visible = false anchors_preset = 8 @@ -112,29 +111,29 @@ grow_vertical = 2 size_flags_horizontal = 4 size_flags_vertical = 4 -[node name="TravelValidationContainer" type="VBoxContainer" parent="Hud/TravelValidation/ScreenContainer" index="0"] +[node name="TravelValidationContainer" type="VBoxContainer" parent="Hud/TravelValidation/ScreenContainer" index="0" unique_id=1135507235] layout_mode = 2 theme = ExtResource("5_twywe") alignment = 1 -[node name="TravelValidationLabel" type="Label" parent="Hud/TravelValidation/ScreenContainer/TravelValidationContainer"] +[node name="TravelValidationLabel" type="Label" parent="Hud/TravelValidation/ScreenContainer/TravelValidationContainer" unique_id=1203605320] unique_name_in_owner = true layout_mode = 2 text = "TRAVEL_TO_REGION_%s" label_settings = ExtResource("6_gqvix") horizontal_alignment = 1 -[node name="TravelValidationButtons" type="HBoxContainer" parent="Hud/TravelValidation/ScreenContainer/TravelValidationContainer"] +[node name="TravelValidationButtons" type="HBoxContainer" parent="Hud/TravelValidation/ScreenContainer/TravelValidationContainer" unique_id=560440640] layout_mode = 2 theme = ExtResource("5_twywe") alignment = 1 -[node name="TravelValidationGoButton" type="Button" parent="Hud/TravelValidation/ScreenContainer/TravelValidationContainer/TravelValidationButtons"] +[node name="TravelValidationGoButton" type="Button" parent="Hud/TravelValidation/ScreenContainer/TravelValidationContainer/TravelValidationButtons" unique_id=338629922] layout_mode = 2 theme = ExtResource("5_twywe") text = "GO" -[node name="TravelValidationNoNowButton" type="Button" parent="Hud/TravelValidation/ScreenContainer/TravelValidationContainer/TravelValidationButtons"] +[node name="TravelValidationNoNowButton" type="Button" parent="Hud/TravelValidation/ScreenContainer/TravelValidationContainer/TravelValidationButtons" unique_id=61219289] layout_mode = 2 theme = ExtResource("5_twywe") text = "NOT_NOW" diff --git a/stages/terrain/region/region.tscn b/stages/terrain/region/region.tscn index 5886456..ed56fa4 100644 --- a/stages/terrain/region/region.tscn +++ b/stages/terrain/region/region.tscn @@ -30,7 +30,6 @@ region = NodePath("../..") y_sort_enabled = true [node name="Player" parent="Entities" unique_id=75851644 instance=ExtResource("5_ovqi1")] -z_index = 1 [node name="RechargeStation" parent="Entities" unique_id=2068738444 instance=ExtResource("7_6d8m3")] unique_name_in_owner = true diff --git a/stages/terrain/region/scripts/region.gd b/stages/terrain/region/scripts/region.gd index 6429577..4f744fc 100644 --- a/stages/terrain/region/scripts/region.gd +++ b/stages/terrain/region/scripts/region.gd @@ -76,10 +76,13 @@ func _ready(): data.add_plant_data(e.data, false) ground_layer = GroundLayer.new(self) + ground_layer.name = "GroundLayer" add_child(ground_layer) rock_layer = RockLayer.new(self) + rock_layer.name = "RockLayer" add_child(rock_layer) decontamination_layer = DecontaminationLayer.new(self) + decontamination_layer.name = "DecontaminationLayer" add_child(decontamination_layer) %AstraDoor.global_position = data.player_spawn @@ -92,6 +95,7 @@ func _ready(): edit_map_origin() spawn_object_random_move(%RechargeStation) + %RechargeStation.update() spawn_object_random_move(%BoreaDoor) spawn_object_random_move(%ShipGarageDoor) diff --git a/stages/terrain/region/scripts/tile_map_layers/rock_layer.gd b/stages/terrain/region/scripts/tile_map_layers/rock_layer.gd index 6a131fb..2d4ba4f 100644 --- a/stages/terrain/region/scripts/tile_map_layers/rock_layer.gd +++ b/stages/terrain/region/scripts/tile_map_layers/rock_layer.gd @@ -11,7 +11,7 @@ const CRISTAL_LOOT_CHANCE : float = 1 enum TileType { EMPTY,ROCK,CRISTAL } func setup(): - z_index = 2 + z_index = -1 func place_rocks(coords : Array[Vector2i], type := TileType.ROCK,on_finished : Callable = (func(): pass)): if type != TileType.EMPTY: