Dev pour la beta 1.4

* Changements de la texture des cristaux de Talion dans tous les assets 3D pour correspondre aux assets 2D
* Ajout d'un évenement en fin de région, une résurgence de Talion qui décontamine et fait looter les plantes mature aux alentours
* Ajout d'un path finding sur le mouvement du robot
* Modification du flow des actions à la souris : ajout d'un nouveau son, d'un icône à l'emplacement de l'action
* Modification du nombre et de l'ordre de mutation débloquées
* Augmentation de la valeur maximale de zoom
* Modification des scores à atteindre dans les premières régions
* Modification de l'interface du vaisseau, laissant apparaitre une roadmap plus claire, et laissant inspecter l'inventaire actuel
* Modification de l'icône d'action dans les scènes 3D
* Augmentation de la zone d'écart entre les plantes, et augmentation du taux de zone fertile en conséquence
* La station de recharge devient inutilisable après la fin de la région
* Ajout d'une transparence lors de la sélection d'objets derrières d'autres objets
* Les plantes juvéniles donneront toujours une graine si coupées
* Ajout d'un bouclage sur les couleurs des mutations
* Fix des hitbox des plantes pour l'inspection à la souris
* Fix de plusieurs bugs sur la manipulation de l'inventaire
* Ajout de nombreux screenshots d'utilisation des outils lors du tutoriel
* Amélioration mineure de la traduction/wording
This commit is contained in:
2026-05-17 02:29:55 +02:00
parent 73b0bf2d33
commit 8efe8bce36
126 changed files with 1955 additions and 463 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 264 B

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://djd5ing64rqk0"
path="res://.godot/imported/empty.png-ff8d2278ab956d3d787ab07e7096aec1.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://stages/terrain/region/assets/empty.png"
dest_files=["res://.godot/imported/empty.png-ff8d2278ab956d3d787ab07e7096aec1.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://k2smk66py4uq"
path="res://.godot/imported/moss_particle.png-5ac5ac284abd73e64071d175c4b8d609.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://stages/terrain/region/assets/textures/moss_biome/moss_particle.png"
dest_files=["res://.godot/imported/moss_particle.png-5ac5ac284abd73e64071d175c4b8d609.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

View File

@@ -17,12 +17,16 @@
[ext_resource type="Texture2D" uid="uid://rdrhi3r11ey6" path="res://common/icons/square-rounded.svg" id="10_ktnx3"]
[ext_resource type="Texture2D" uid="uid://lftiiulpc8kl" path="res://stages/terrain/region/assets/textures/rain.png" id="12_6d8m3"]
[ext_resource type="Script" uid="uid://dple0sunrpauc" path="res://stages/terrain/region/scripts/post_process/rain.gd" id="13_fwgig"]
[ext_resource type="Shader" uid="uid://8qwmgc4ry3ro" path="res://common/vfx/materials/shaders/see_behind.gdshader" id="16_3lxsc"]
[ext_resource type="Script" uid="uid://wd7n5xbgl82c" path="res://stages/terrain/region/scripts/see_behind.gd" id="16_al6gf"]
[sub_resource type="Resource" id="Resource_r4e5h"]
script = ExtResource("3_r4e5h")
cloud_value = 0.93
wind_direction = Vector2(-0.9519732, -0.30618128)
wind_force = 0.039
cloud_value = 0.23939586
wind_direction = Vector2(0.6897295, 0.72406715)
wind_force = 0.87287587
fog_value = 0.5362279
ambiance_name = "ExteriorFoggy"
type = 3
[sub_resource type="FastNoiseLite" id="FastNoiseLite_2w03p"]
@@ -38,7 +42,7 @@ shader_parameter/camera_position = Vector2(0, 0)
shader_parameter/camera_zoom = Vector2(1, 1)
shader_parameter/viewport_size = Vector2(1920, 1080)
shader_parameter/noise_texture = SubResource("NoiseTexture2D_6d8m3")
shader_parameter/cloud_speed = 0.11699999999999999
shader_parameter/cloud_speed = 0.117
shader_parameter/cloud_delay = 1.0
shader_parameter/cloud_dir = Vector2(-0.9519732, -0.30618128)
shader_parameter/cloud_color = Color(0.59428054, 0.8206175, 0.899937, 1)
@@ -98,6 +102,19 @@ gravity = Vector3(0, 0, 0)
anim_speed_min = 1.0
anim_speed_max = 1.0
[sub_resource type="ShaderMaterial" id="ShaderMaterial_al6gf"]
shader = ExtResource("16_3lxsc")
[sub_resource type="Gradient" id="Gradient_q7iyx"]
offsets = PackedFloat32Array(0, 0.7040359, 1)
colors = PackedColorArray(1, 1, 1, 1, 1, 1, 1, 0.94170403, 1, 1, 1, 0)
[sub_resource type="GradientTexture2D" id="GradientTexture2D_0e2h6"]
gradient = SubResource("Gradient_q7iyx")
fill = 1
fill_from = Vector2(0.5, 0.5)
fill_to = Vector2(0.5, 0)
[sub_resource type="Curve" id="Curve_qdnee"]
_data = [Vector2(0, 0), 0.0, 0.0, 0, 0, Vector2(0.4883721, 1), 0.037164874, 0.037164874, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
point_count = 3
@@ -208,7 +225,14 @@ process_material = SubResource("ParticleProcessMaterial_r4e5h")
script = ExtResource("13_fwgig")
camera = NodePath("../../Camera")
[node name="SeeBehindSprite" type="Sprite2D" parent="Entities" unique_id=471327108]
material = SubResource("ShaderMaterial_al6gf")
scale = Vector2(2.4375, 2.4375)
texture = SubResource("GradientTexture2D_0e2h6")
script = ExtResource("16_al6gf")
[node name="Camera" parent="." unique_id=1399042986 node_paths=PackedStringArray("following") instance=ExtResource("8_fwgig")]
unique_name_in_owner = true
following = NodePath("../Entities/Player")
[node name="WindParticles" type="GPUParticles2D" parent="Camera" unique_id=1897174931]

View File

@@ -13,7 +13,6 @@ height = 20
noise = SubResource("FastNoiseLite_kujx0")
[sub_resource type="CompressedTexture2D" id="CompressedTexture2D_cmstg"]
load_path = "res://.godot/imported/rock_background_texture.png-79a8569ff49f7d85f8b64d55ac1ce62d.ctex"
[resource]
shader = ExtResource("1_kujx0")

View File

@@ -10,7 +10,6 @@ frequency = 0.0109
noise = SubResource("FastNoiseLite_6hswu")
[sub_resource type="CompressedTexture2D" id="CompressedTexture2D_nntr3"]
load_path = "res://.godot/imported/garden_decontamined_background_texture_old.png-951b3e125e8b7083a60c2b7435bce68a.ctex"
[resource]
shader = ExtResource("1_ye8oh")

View File

@@ -4,6 +4,179 @@
[ext_resource type="Texture2D" uid="uid://dr72xhc07i56e" path="res://stages/terrain/region/assets/textures/moss_biome/moss_contamination_atlas_texture.png" id="1_uqnql"]
[ext_resource type="Texture2D" uid="uid://dlbdjyqj03gvo" path="res://stages/terrain/region/assets/textures/moss_biome/moss_talion_atlas_texture.png" id="2_fywqu"]
[ext_resource type="Texture2D" uid="uid://bi08trir23od2" path="res://stages/terrain/region/assets/textures/red_rect.png" id="4_spfgy"]
[ext_resource type="Texture2D" uid="uid://djd5ing64rqk0" path="res://stages/terrain/region/assets/empty.png" id="5_wwlp4"]
[sub_resource type="NavigationPolygon" id="NavigationPolygon_d5hne"]
vertices = PackedVector2Array(-24.273438, -24, -24, 32, -32, 32, -32, -32, 32, -32, 24, -24, 32, 32, 24, 32)
polygons = Array[PackedInt32Array]([PackedInt32Array(0, 1, 2, 3), PackedInt32Array(0, 3, 4, 5), PackedInt32Array(5, 4, 6, 7)])
outlines = Array[PackedVector2Array]([PackedVector2Array(-32, -32, 32, -32, 32, 32, 24, 32, 24, -24, -24.272377, -24, -24, 32, -32, 32)])
agent_radius = 0.0
[sub_resource type="NavigationPolygon" id="NavigationPolygon_lfyrs"]
vertices = PackedVector2Array(-24, 32, -32, 32, -32, -32, -24, -32, 32, 32, 24, 32, 24, -32, 32, -32)
polygons = Array[PackedInt32Array]([PackedInt32Array(0, 1, 2, 3), PackedInt32Array(4, 5, 6, 7)])
outlines = Array[PackedVector2Array]([PackedVector2Array(-32, -32, 32, -32, 32, 32, 24, 32, 24, -32, -24, -32, -24, 32, -32, 32)])
agent_radius = 0.0
[sub_resource type="NavigationPolygon" id="NavigationPolygon_hl8m2"]
vertices = PackedVector2Array(24, 24, 24, -32, 32, -32, 32, 32, -32, 32, -24, 24, -32, -32, -24, -32)
polygons = Array[PackedInt32Array]([PackedInt32Array(0, 1, 2, 3), PackedInt32Array(0, 3, 4, 5), PackedInt32Array(5, 4, 6, 7)])
outlines = Array[PackedVector2Array]([PackedVector2Array(-32, -32, -32, 32, 32, 32, 32, -32, 24, -32, 24, 24, -24, 24, -24, -32)])
agent_radius = 0.0
[sub_resource type="NavigationPolygon" id="NavigationPolygon_1ka8d"]
vertices = PackedVector2Array(24, 24, 32, -32, 32, 32, 24, 32, 24, -24, 24, -32, -24, -24, -32, -32, -32, 32, -24, 24)
polygons = Array[PackedInt32Array]([PackedInt32Array(0, 1, 2, 3), PackedInt32Array(1, 0, 4), PackedInt32Array(5, 1, 4, 6), PackedInt32Array(7, 5, 6), PackedInt32Array(8, 7, 6, 9), PackedInt32Array(3, 8, 9, 0)])
outlines = Array[PackedVector2Array]([PackedVector2Array(32, 32, 32, -32, 24, -32, -32, -32, -32, 32, 24, 32, 24, 24, -24, 24, -24, -24, 24, -24, 24, 32)])
agent_radius = 0.0
[sub_resource type="NavigationPolygon" id="NavigationPolygon_kd3mn"]
vertices = PackedVector2Array(32, -24, -32, -24, -32, -32, 32, -32)
polygons = Array[PackedInt32Array]([PackedInt32Array(0, 1, 2, 3)])
outlines = Array[PackedVector2Array]([PackedVector2Array(-32, -32, 32, -32, 32, -24, -32, -24)])
agent_radius = 0.0
[sub_resource type="NavigationPolygon" id="NavigationPolygon_dt08x"]
vertices = PackedVector2Array(32, -32, 32, 32, 24, 32, 24, -24, -32, -32, -32, -24)
polygons = Array[PackedInt32Array]([PackedInt32Array(0, 1, 2, 3), PackedInt32Array(4, 0, 3, 5)])
outlines = Array[PackedVector2Array]([PackedVector2Array(-32, -32, 32, -32, 32, 32, 24, 32, 24, -24, -32, -24)])
agent_radius = 0.0
[sub_resource type="NavigationPolygon" id="NavigationPolygon_ai561"]
vertices = PackedVector2Array(32, 32, 24, 32, 24, -32, 32, -32)
polygons = Array[PackedInt32Array]([PackedInt32Array(0, 1, 2, 3)])
outlines = Array[PackedVector2Array]([PackedVector2Array(32, 32, 32, -32, 24, -32, 24, 32)])
agent_radius = 0.0
[sub_resource type="NavigationPolygon" id="NavigationPolygon_0g2d2"]
vertices = PackedVector2Array(32, 32, -32, 32, -32, 24, 24, 24, 32, -32, 24, -32)
polygons = Array[PackedInt32Array]([PackedInt32Array(0, 1, 2, 3), PackedInt32Array(4, 0, 3, 5)])
outlines = Array[PackedVector2Array]([PackedVector2Array(-32, 32, 32, 32, 32, -32, 24, -32, 24, 24, -32, 24)])
agent_radius = 0.0
[sub_resource type="NavigationPolygon" id="NavigationPolygon_s7hek"]
vertices = PackedVector2Array(-24.273438, -24, -24, 32, -32, 32, -32, -32, 32, -32, 32, -24)
polygons = Array[PackedInt32Array]([PackedInt32Array(0, 1, 2, 3), PackedInt32Array(0, 3, 4, 5)])
outlines = Array[PackedVector2Array]([PackedVector2Array(-32, -32, 32, -32, 32, -24, -24.272377, -24, -24, 32, -32, 32)])
agent_radius = 0.0
[sub_resource type="NavigationPolygon" id="NavigationPolygon_rsjga"]
vertices = PackedVector2Array(-24, 32, -32, 32, -32, -32, -24, -32)
polygons = Array[PackedInt32Array]([PackedInt32Array(0, 1, 2, 3)])
outlines = Array[PackedVector2Array]([PackedVector2Array(-32, -32, -24, -32, -24, 32, -32, 32)])
agent_radius = 0.0
[sub_resource type="NavigationPolygon" id="NavigationPolygon_fdxnc"]
vertices = PackedVector2Array(-24, 24, 32, 24, 32, 32, -32, 32, -32, -32, -24, -32)
polygons = Array[PackedInt32Array]([PackedInt32Array(0, 1, 2, 3), PackedInt32Array(0, 3, 4, 5)])
outlines = Array[PackedVector2Array]([PackedVector2Array(-32, -32, -24, -32, -24, 24, 32, 24, 32, 32, -32, 32)])
agent_radius = 0.0
[sub_resource type="NavigationPolygon" id="NavigationPolygon_wfpa5"]
vertices = PackedVector2Array(32, -32, 32, -24, -24.273438, -24, -32, -32, -32, 32, -24, 24, 32, 32, 32, 24)
polygons = Array[PackedInt32Array]([PackedInt32Array(0, 1, 2, 3), PackedInt32Array(4, 3, 2, 5), PackedInt32Array(6, 4, 5, 7)])
outlines = Array[PackedVector2Array]([PackedVector2Array(-32, -32, 32, -32, 32, -24, -24.272377, -24, -24, 24, 32, 24, 32, 32, -32, 32)])
agent_radius = 0.0
[sub_resource type="NavigationPolygon" id="NavigationPolygon_38nby"]
vertices = PackedVector2Array(32, -24, -32, -24, -32, -32, 32, -32)
polygons = Array[PackedInt32Array]([PackedInt32Array(0, 1, 2, 3)])
outlines = Array[PackedVector2Array]([PackedVector2Array(-32, -32, 32, -32, 32, -24, -32, -24)])
agent_radius = 0.0
[sub_resource type="NavigationPolygon" id="NavigationPolygon_6nyek"]
vertices = PackedVector2Array(32, 32, -32, 32, -32, 24, 32, 24)
polygons = Array[PackedInt32Array]([PackedInt32Array(0, 1, 2, 3)])
outlines = Array[PackedVector2Array]([PackedVector2Array(-32, 32, 32, 32, 32, 24, -32, 24)])
agent_radius = 0.0
[sub_resource type="NavigationPolygon" id="NavigationPolygon_0u8fn"]
vertices = PackedVector2Array(32, 32, -32, 32, -32, 24, 32, 24, 32, -24, -32, -24, -32, -32, 32, -32)
polygons = Array[PackedInt32Array]([PackedInt32Array(0, 1, 2, 3), PackedInt32Array(4, 5, 6, 7)])
outlines = Array[PackedVector2Array]([PackedVector2Array(-32, -32, 32, -32, 32, 32, -32, 32, -32, 24, 32, 24, 32, -24, -32, -24)])
agent_radius = 0.0
[sub_resource type="NavigationPolygon" id="NavigationPolygon_53wg5"]
vertices = PackedVector2Array(32, -32, 32, 32, 24, 32, 24, -24, -32, -32, -32, -24)
polygons = Array[PackedInt32Array]([PackedInt32Array(0, 1, 2, 3), PackedInt32Array(4, 0, 3, 5)])
outlines = Array[PackedVector2Array]([PackedVector2Array(-32, -32, 32, -32, 32, 32, 24, 32, 24, -24, -32, -24)])
agent_radius = 0.0
[sub_resource type="NavigationPolygon" id="NavigationPolygon_w5wko"]
vertices = PackedVector2Array(32, 32, 24, 32, 24, -32, 32, -32)
polygons = Array[PackedInt32Array]([PackedInt32Array(0, 1, 2, 3)])
outlines = Array[PackedVector2Array]([PackedVector2Array(32, 32, 32, -32, 24, -32, 24, 32)])
agent_radius = 0.0
[sub_resource type="NavigationPolygon" id="NavigationPolygon_omx72"]
vertices = PackedVector2Array(32, 32, -32, 32, -32, 24, 24, 24, 32, -32, 24, -32)
polygons = Array[PackedInt32Array]([PackedInt32Array(0, 1, 2, 3), PackedInt32Array(4, 0, 3, 5)])
outlines = Array[PackedVector2Array]([PackedVector2Array(-32, 32, 32, 32, 32, -32, 24, -32, 24, 24, -32, 24)])
agent_radius = 0.0
[sub_resource type="NavigationPolygon" id="NavigationPolygon_ei338"]
vertices = PackedVector2Array(32, 32, -32, 32, -32, 24, 24, 24, 32, -32, 24, -24, -32, -32, -32, -24)
polygons = Array[PackedInt32Array]([PackedInt32Array(0, 1, 2, 3), PackedInt32Array(4, 0, 3, 5), PackedInt32Array(6, 4, 5, 7)])
outlines = Array[PackedVector2Array]([PackedVector2Array(-32, -32, 32, -32, 32, 32, -32, 32, -32, 24, 24, 24, 24, -24, -32, -24)])
agent_radius = 0.0
[sub_resource type="NavigationPolygon" id="NavigationPolygon_nr1fe"]
[sub_resource type="NavigationPolygon" id="NavigationPolygon_0g1o1"]
vertices = PackedVector2Array(-24, 32, -32, 32, -32, -32, -24, -32)
polygons = Array[PackedInt32Array]([PackedInt32Array(0, 1, 2, 3)])
outlines = Array[PackedVector2Array]([PackedVector2Array(-32, -32, -24, -32, -24, 32, -32, 32)])
agent_radius = 0.0
[sub_resource type="NavigationPolygon" id="NavigationPolygon_yh1lj"]
[sub_resource type="NavigationPolygon" id="NavigationPolygon_g61rk"]
vertices = PackedVector2Array(32, -24, -32, -24, -32, -32, 32, -32)
polygons = Array[PackedInt32Array]([PackedInt32Array(0, 1, 2, 3)])
outlines = Array[PackedVector2Array]([PackedVector2Array(-32, -32, 32, -32, 32, -24, -32, -24)])
agent_radius = 0.0
[sub_resource type="NavigationPolygon" id="NavigationPolygon_i0yy6"]
vertices = PackedVector2Array(32, 32, -32, 32, -32, 24, 32, 24)
polygons = Array[PackedInt32Array]([PackedInt32Array(0, 1, 2, 3)])
outlines = Array[PackedVector2Array]([PackedVector2Array(-32, 32, 32, 32, 32, 24, -32, 24)])
agent_radius = 0.0
[sub_resource type="NavigationPolygon" id="NavigationPolygon_5vo1o"]
vertices = PackedVector2Array(32, -24, -32, -24, -32, -32, 32, -32)
polygons = Array[PackedInt32Array]([PackedInt32Array(0, 1, 2, 3)])
outlines = Array[PackedVector2Array]([PackedVector2Array(-32, -32, 32, -32, 32, -24, -32, -24)])
agent_radius = 0.0
[sub_resource type="NavigationPolygon" id="NavigationPolygon_pykno"]
vertices = PackedVector2Array(32, 32, 24, 32, 24, -32, 32, -32)
polygons = Array[PackedInt32Array]([PackedInt32Array(0, 1, 2, 3)])
outlines = Array[PackedVector2Array]([PackedVector2Array(32, 32, 32, -32, 24, -32, 24, 32)])
agent_radius = 0.0
[sub_resource type="NavigationPolygon" id="NavigationPolygon_fv1hs"]
vertices = PackedVector2Array(-24.273438, -24, -24, 32, -32, 32, -32, -32, 32, -32, 32, -24)
polygons = Array[PackedInt32Array]([PackedInt32Array(0, 1, 2, 3), PackedInt32Array(0, 3, 4, 5)])
outlines = Array[PackedVector2Array]([PackedVector2Array(-32, -32, 32, -32, 32, -24, -24.272377, -24, -24, 32, -32, 32)])
agent_radius = 0.0
[sub_resource type="NavigationPolygon" id="NavigationPolygon_nj7v8"]
vertices = PackedVector2Array(-24, 32, -32, 32, -32, -32, -24, -32)
polygons = Array[PackedInt32Array]([PackedInt32Array(0, 1, 2, 3)])
outlines = Array[PackedVector2Array]([PackedVector2Array(-32, -32, -24, -32, -24, 32, -32, 32)])
agent_radius = 0.0
[sub_resource type="NavigationPolygon" id="NavigationPolygon_k1gnd"]
vertices = PackedVector2Array(-24, 24, 32, 24, 32, 32, -32, 32, -32, -32, -24, -32)
polygons = Array[PackedInt32Array]([PackedInt32Array(0, 1, 2, 3), PackedInt32Array(0, 3, 4, 5)])
outlines = Array[PackedVector2Array]([PackedVector2Array(-32, -32, -24, -32, -24, 24, 32, 24, 32, 32, -32, 32)])
agent_radius = 0.0
[sub_resource type="NavigationPolygon" id="NavigationPolygon_3cip6"]
vertices = PackedVector2Array(32, 32, -32, 32, -32, 24, 32, 24)
polygons = Array[PackedInt32Array]([PackedInt32Array(0, 1, 2, 3)])
outlines = Array[PackedVector2Array]([PackedVector2Array(-32, 32, 32, 32, 32, 24, -32, 24)])
agent_radius = 0.0
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_4i8c6"]
resource_name = "Rock"
@@ -12,14 +185,16 @@ texture_region_size = Vector2i(64, 64)
0:0/0 = 0
0:0/0/terrain_set = 0
0:0/0/terrain = 1
0:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, 0, 0, -16, 16, 0, 16, 32, -16, 32)
0:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, 16, 0, 0, 16, 16, 16, 32, -16, 32)
0:0/0/terrains_peering_bit/bottom_side = 1
0:0/0/navigation_layer_0/polygon = SubResource("NavigationPolygon_d5hne")
1:0/0 = 0
1:0/0/terrain_set = 0
1:0/0/terrain = 1
1:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(32, -16, 32, 16, 16, 32, -16, 32, -16, 0, 0, -16)
1:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(32, -16, 32, 16, 16, 32, -16, 32, -16, 16, 16, -16)
1:0/0/terrains_peering_bit/right_side = 1
1:0/0/terrains_peering_bit/bottom_side = 1
1:0/0/navigation_layer_0/polygon = SubResource("NavigationPolygon_s7hek")
2:0/0 = 0
2:0/0/terrain_set = 0
2:0/0/terrain = 1
@@ -27,12 +202,14 @@ texture_region_size = Vector2i(64, 64)
2:0/0/terrains_peering_bit/right_side = 1
2:0/0/terrains_peering_bit/bottom_side = 1
2:0/0/terrains_peering_bit/left_side = 1
2:0/0/navigation_layer_0/polygon = SubResource("NavigationPolygon_38nby")
3:0/0 = 0
3:0/0/terrain_set = 0
3:0/0/terrain = 1
3:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-32, -16, 0, -16, 16, 0, 16, 32, -16, 32, -32, 16)
3:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-32, -16, -16, -16, 16, 16, 16, 32, -16, 32, -32, 16)
3:0/0/terrains_peering_bit/bottom_side = 1
3:0/0/terrains_peering_bit/left_side = 1
3:0/0/navigation_layer_0/polygon = SubResource("NavigationPolygon_53wg5")
4:0/0 = 0
4:0/0/terrain_set = 0
4:0/0/terrain = 1
@@ -42,6 +219,7 @@ texture_region_size = Vector2i(64, 64)
4:0/0/terrains_peering_bit/left_side = 1
4:0/0/terrains_peering_bit/top_left_corner = 1
4:0/0/terrains_peering_bit/top_side = 1
4:0/0/navigation_layer_0/polygon = SubResource("NavigationPolygon_nr1fe")
5:0/0 = 0
5:0/0/terrain_set = 0
5:0/0/terrain = 1
@@ -50,6 +228,7 @@ texture_region_size = Vector2i(64, 64)
5:0/0/terrains_peering_bit/bottom_right_corner = 1
5:0/0/terrains_peering_bit/bottom_side = 1
5:0/0/terrains_peering_bit/left_side = 1
5:0/0/navigation_layer_0/polygon = SubResource("NavigationPolygon_g61rk")
6:0/0 = 0
6:0/0/terrain_set = 0
6:0/0/terrain = 1
@@ -58,6 +237,7 @@ texture_region_size = Vector2i(64, 64)
6:0/0/terrains_peering_bit/bottom_side = 1
6:0/0/terrains_peering_bit/bottom_left_corner = 1
6:0/0/terrains_peering_bit/left_side = 1
6:0/0/navigation_layer_0/polygon = SubResource("NavigationPolygon_5vo1o")
7:0/0 = 0
7:0/0/terrain_set = 0
7:0/0/terrain = 1
@@ -70,10 +250,11 @@ texture_region_size = Vector2i(64, 64)
8:0/0 = 0
8:0/0/terrain_set = 0
8:0/0/terrain = 1
8:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, 0, 0, -16, 32, -16, 32, 32, -16, 32)
8:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, 16, 16, -16, 32, -16, 32, 32, -16, 32)
8:0/0/terrains_peering_bit/right_side = 1
8:0/0/terrains_peering_bit/bottom_right_corner = 1
8:0/0/terrains_peering_bit/bottom_side = 1
8:0/0/navigation_layer_0/polygon = SubResource("NavigationPolygon_fv1hs")
9:0/0 = 0
9:0/0/terrain_set = 0
9:0/0/terrain = 1
@@ -93,19 +274,22 @@ texture_region_size = Vector2i(64, 64)
10:0/0/terrains_peering_bit/bottom_side = 1
10:0/0/terrains_peering_bit/bottom_left_corner = 1
10:0/0/terrains_peering_bit/left_side = 1
10:0/0/navigation_layer_0/polygon = SubResource("NavigationPolygon_kd3mn")
11:0/0 = 0
11:0/0/terrain_set = 0
11:0/0/terrain = 1
11:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-32, -16, 0, -16, 16, 0, 16, 32, -32, 32)
11:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-32, -16, -16, -16, 16, 16, 16, 32, -32, 32)
11:0/0/terrains_peering_bit/bottom_side = 1
11:0/0/terrains_peering_bit/bottom_left_corner = 1
11:0/0/terrains_peering_bit/left_side = 1
11:0/0/navigation_layer_0/polygon = SubResource("NavigationPolygon_dt08x")
0:1/0 = 0
0:1/0/terrain_set = 0
0:1/0/terrain = 1
0:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -32, 16, -32, 16, 32, -16, 32)
0:1/0/terrains_peering_bit/bottom_side = 1
0:1/0/terrains_peering_bit/top_side = 1
0:1/0/navigation_layer_0/polygon = SubResource("NavigationPolygon_lfyrs")
1:1/0 = 0
1:1/0/terrain_set = 0
1:1/0/terrain = 1
@@ -113,6 +297,7 @@ texture_region_size = Vector2i(64, 64)
1:1/0/terrains_peering_bit/right_side = 1
1:1/0/terrains_peering_bit/bottom_side = 1
1:1/0/terrains_peering_bit/top_side = 1
1:1/0/navigation_layer_0/polygon = SubResource("NavigationPolygon_rsjga")
2:1/0 = 0
2:1/0/terrain_set = 0
2:1/0/terrain = 1
@@ -128,6 +313,7 @@ texture_region_size = Vector2i(64, 64)
3:1/0/terrains_peering_bit/bottom_side = 1
3:1/0/terrains_peering_bit/left_side = 1
3:1/0/terrains_peering_bit/top_side = 1
3:1/0/navigation_layer_0/polygon = SubResource("NavigationPolygon_w5wko")
4:1/0 = 0
4:1/0/terrain_set = 0
4:1/0/terrain = 1
@@ -136,6 +322,7 @@ texture_region_size = Vector2i(64, 64)
4:1/0/terrains_peering_bit/bottom_right_corner = 1
4:1/0/terrains_peering_bit/bottom_side = 1
4:1/0/terrains_peering_bit/top_side = 1
4:1/0/navigation_layer_0/polygon = SubResource("NavigationPolygon_0g1o1")
5:1/0 = 0
5:1/0/terrain_set = 0
5:1/0/terrain = 1
@@ -166,6 +353,7 @@ texture_region_size = Vector2i(64, 64)
7:1/0/terrains_peering_bit/bottom_left_corner = 1
7:1/0/terrains_peering_bit/left_side = 1
7:1/0/terrains_peering_bit/top_side = 1
7:1/0/navigation_layer_0/polygon = SubResource("NavigationPolygon_pykno")
8:1/0 = 0
8:1/0/terrain_set = 0
8:1/0/terrain = 1
@@ -175,6 +363,7 @@ texture_region_size = Vector2i(64, 64)
8:1/0/terrains_peering_bit/bottom_side = 1
8:1/0/terrains_peering_bit/top_side = 1
8:1/0/terrains_peering_bit/top_right_corner = 1
8:1/0/navigation_layer_0/polygon = SubResource("NavigationPolygon_nj7v8")
9:1/0 = 0
9:1/0/terrain_set = 0
9:1/0/terrain = 1
@@ -198,14 +387,16 @@ texture_region_size = Vector2i(64, 64)
0:2/0 = 0
0:2/0/terrain_set = 0
0:2/0/terrain = 1
0:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -32, 16, -32, 16, 0, -0.564476, 16, -16, 0)
0:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -32, 16, -32, 16, -16, 0, 0, -16, -16)
0:2/0/terrains_peering_bit/top_side = 1
0:2/0/navigation_layer_0/polygon = SubResource("NavigationPolygon_hl8m2")
1:2/0 = 0
1:2/0/terrain_set = 0
1:2/0/terrain = 1
1:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -32, 16, -32, 32, -16, 32, 16, 0, 16, -16, 0)
1:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -32, 16, -32, 32, -16, 32, 16, 16, 16, -16, -16)
1:2/0/terrains_peering_bit/right_side = 1
1:2/0/terrains_peering_bit/top_side = 1
1:2/0/navigation_layer_0/polygon = SubResource("NavigationPolygon_fdxnc")
2:2/0 = 0
2:2/0/terrain_set = 0
2:2/0/terrain = 1
@@ -213,12 +404,14 @@ texture_region_size = Vector2i(64, 64)
2:2/0/terrains_peering_bit/right_side = 1
2:2/0/terrains_peering_bit/left_side = 1
2:2/0/terrains_peering_bit/top_side = 1
2:2/0/navigation_layer_0/polygon = SubResource("NavigationPolygon_6nyek")
3:2/0 = 0
3:2/0/terrain_set = 0
3:2/0/terrain = 1
3:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-32, -16, -16, -32, 16, -32, 16, 0, 0, 16, -32, 16)
3:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-32, -16, -16, -32, 16, -32, 16, -16, -16, 16, -32, 16)
3:2/0/terrains_peering_bit/left_side = 1
3:2/0/terrains_peering_bit/top_side = 1
3:2/0/navigation_layer_0/polygon = SubResource("NavigationPolygon_omx72")
4:2/0 = 0
4:2/0/terrain_set = 0
4:2/0/terrain = 1
@@ -227,6 +420,7 @@ texture_region_size = Vector2i(64, 64)
4:2/0/terrains_peering_bit/bottom_side = 1
4:2/0/terrains_peering_bit/top_side = 1
4:2/0/terrains_peering_bit/top_right_corner = 1
4:2/0/navigation_layer_0/polygon = SubResource("NavigationPolygon_0g1o1")
5:2/0 = 0
5:2/0/terrain_set = 0
5:2/0/terrain = 1
@@ -257,6 +451,7 @@ texture_region_size = Vector2i(64, 64)
7:2/0/terrains_peering_bit/left_side = 1
7:2/0/terrains_peering_bit/top_left_corner = 1
7:2/0/terrains_peering_bit/top_side = 1
7:2/0/navigation_layer_0/polygon = SubResource("NavigationPolygon_pykno")
8:2/0 = 0
8:2/0/terrain_set = 0
8:2/0/terrain = 1
@@ -298,26 +493,31 @@ texture_region_size = Vector2i(64, 64)
11:2/0/terrains_peering_bit/left_side = 1
11:2/0/terrains_peering_bit/top_left_corner = 1
11:2/0/terrains_peering_bit/top_side = 1
11:2/0/navigation_layer_0/polygon = SubResource("NavigationPolygon_ai561")
0:3/0 = 0
0:3/0/terrain_set = 0
0:3/0/terrain = 1
0:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, 0, 0, -16, 16, 0, 0, 16)
0:3/0/navigation_layer_0/polygon = SubResource("NavigationPolygon_1ka8d")
1:3/0 = 0
1:3/0/terrain_set = 0
1:3/0/terrain = 1
1:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(0, -16, 32, -16, 32, 16, 0, 16, -16, 0)
1:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(16, -16, 32, -16, 32, 16, 16, 16, 0, 0)
1:3/0/terrains_peering_bit/right_side = 1
1:3/0/navigation_layer_0/polygon = SubResource("NavigationPolygon_wfpa5")
2:3/0 = 0
2:3/0/terrain_set = 0
2:3/0/terrain = 1
2:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-32, -16, 32, -16, 32, 16, -32, 16)
2:3/0/terrains_peering_bit/right_side = 1
2:3/0/terrains_peering_bit/left_side = 1
2:3/0/navigation_layer_0/polygon = SubResource("NavigationPolygon_0u8fn")
3:3/0 = 0
3:3/0/terrain_set = 0
3:3/0/terrain = 1
3:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-32, -16, 0, -16, 16, 0, 0, 16, -32, 16)
3:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-32, -16, -16, -16, 0, 0, -16, 16, -32, 16)
3:3/0/terrains_peering_bit/left_side = 1
3:3/0/navigation_layer_0/polygon = SubResource("NavigationPolygon_ei338")
4:3/0 = 0
4:3/0/terrain_set = 0
4:3/0/terrain = 1
@@ -327,6 +527,7 @@ texture_region_size = Vector2i(64, 64)
4:3/0/terrains_peering_bit/bottom_left_corner = 1
4:3/0/terrains_peering_bit/left_side = 1
4:3/0/terrains_peering_bit/top_side = 1
4:3/0/navigation_layer_0/polygon = SubResource("NavigationPolygon_yh1lj")
5:3/0 = 0
5:3/0/terrain_set = 0
5:3/0/terrain = 1
@@ -335,6 +536,7 @@ texture_region_size = Vector2i(64, 64)
5:3/0/terrains_peering_bit/left_side = 1
5:3/0/terrains_peering_bit/top_side = 1
5:3/0/terrains_peering_bit/top_right_corner = 1
5:3/0/navigation_layer_0/polygon = SubResource("NavigationPolygon_i0yy6")
6:3/0 = 0
6:3/0/terrain_set = 0
6:3/0/terrain = 1
@@ -343,6 +545,7 @@ texture_region_size = Vector2i(64, 64)
6:3/0/terrains_peering_bit/left_side = 1
6:3/0/terrains_peering_bit/top_left_corner = 1
6:3/0/terrains_peering_bit/top_side = 1
6:3/0/navigation_layer_0/polygon = SubResource("NavigationPolygon_i0yy6")
7:3/0 = 0
7:3/0/terrain_set = 0
7:3/0/terrain = 1
@@ -355,10 +558,11 @@ texture_region_size = Vector2i(64, 64)
8:3/0 = 0
8:3/0/terrain_set = 0
8:3/0/terrain = 1
8:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -32, 32, -32, 32, 16, 0, 16, -16, 0)
8:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -32, 32, -32, 32, 16, 16, 16, -16, -16)
8:3/0/terrains_peering_bit/right_side = 1
8:3/0/terrains_peering_bit/top_side = 1
8:3/0/terrains_peering_bit/top_right_corner = 1
8:3/0/navigation_layer_0/polygon = SubResource("NavigationPolygon_k1gnd")
9:3/0 = 0
9:3/0/terrain_set = 0
9:3/0/terrain = 1
@@ -368,6 +572,7 @@ texture_region_size = Vector2i(64, 64)
9:3/0/terrains_peering_bit/top_left_corner = 1
9:3/0/terrains_peering_bit/top_side = 1
9:3/0/terrains_peering_bit/top_right_corner = 1
9:3/0/navigation_layer_0/polygon = SubResource("NavigationPolygon_3cip6")
10:3/0 = 0
10:3/0/terrain_set = 0
10:3/0/terrain = 1
@@ -381,10 +586,11 @@ texture_region_size = Vector2i(64, 64)
11:3/0 = 0
11:3/0/terrain_set = 0
11:3/0/terrain = 1
11:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-32, -32, 16, -32, 16, 0, 0, 16, -32, 16)
11:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-32, -32, 16, -32, 16, -16, -16, 16, -32, 16)
11:3/0/terrains_peering_bit/left_side = 1
11:3/0/terrains_peering_bit/top_left_corner = 1
11:3/0/terrains_peering_bit/top_side = 1
11:3/0/navigation_layer_0/polygon = SubResource("NavigationPolygon_0g2d2")
10:1/0 = 0
10:1/0/terrain_set = 0
10:1/0/terrain = 1
@@ -1137,13 +1343,28 @@ texture_region_size = Vector2i(64, 64)
11:3/0/terrains_peering_bit/top_side = 0
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_3g8t4"]
resource_name = "ground"
resource_name = "Ground"
texture = ExtResource("4_spfgy")
texture_region_size = Vector2i(64, 64)
0:0/0 = 0
0:0/0/terrain_set = 0
0:0/0/terrain = 3
[sub_resource type="NavigationPolygon" id="NavigationPolygon_wwlp4"]
vertices = PackedVector2Array(32, 32, -32, 32, -32, -32, 32, -32)
polygons = Array[PackedInt32Array]([PackedInt32Array(0, 1, 2, 3)])
outlines = Array[PackedVector2Array]([PackedVector2Array(-32, -32, 32, -32, 32, 32, -32, 32), PackedVector2Array(-32, -32, 32, -32, 32, 32, -32, 32)])
agent_radius = 0.0
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_yh1lj"]
resource_name = "Empty"
texture = ExtResource("5_wwlp4")
texture_region_size = Vector2i(64, 64)
0:0/0 = 0
0:0/0/terrain_set = 0
0:0/0/terrain = 4
0:0/0/navigation_layer_0/polygon = SubResource("NavigationPolygon_wwlp4")
[resource]
tile_size = Vector2i(64, 64)
physics_layer_0/collision_layer = 1
@@ -1156,7 +1377,11 @@ terrain_set_0/terrain_2/name = "Cristal"
terrain_set_0/terrain_2/color = Color(0.48793238, 0.38601816, 0.8285951, 1)
terrain_set_0/terrain_3/name = "Ground"
terrain_set_0/terrain_3/color = Color(0.375, 0.5, 0.25, 1)
terrain_set_0/terrain_4/name = "Walkable"
terrain_set_0/terrain_4/color = Color(0.28125, 0.5, 0.25, 1)
navigation_layer_0/layers = 1
sources/2 = SubResource("TileSetAtlasSource_aw22q")
sources/0 = SubResource("TileSetAtlasSource_4i8c6")
sources/1 = SubResource("TileSetAtlasSource_spfgy")
sources/3 = SubResource("TileSetAtlasSource_3g8t4")
sources/4 = SubResource("TileSetAtlasSource_yh1lj")

View File

@@ -97,9 +97,12 @@ func generate():
add_child.call_deferred(ground_layer)
add_child.call_deferred(decontamination_layer)
generated.emit()
call_deferred("emit_generated")
is_generated = true
func emit_generated():
generated.emit()
func calculate_all_tiles() -> Array[Vector2i]:
var coords : Array[Vector2i] = []
@@ -200,15 +203,19 @@ func get_tile_value_from_noise(tile_position : Vector2i, noise : Noise) -> float
func generate_rocks(layer : RockLayer):
var cristals : Array[Vector2i] = []
var rocks : Array[Vector2i] = []
var emptys : Array[Vector2i] = []
for coord in all_tiles:
var tile_type := get_generated_rock_type(coord)
if tile_type == RockLayer.TileType.CRISTAL:
cristals.append(coord)
elif tile_type == RockLayer.TileType.ROCK:
rocks.append(coord)
else:
emptys.append(coord)
layer.place_rocks(cristals, RockLayer.TileType.CRISTAL)
layer.place_rocks(rocks, RockLayer.TileType.ROCK)
layer.place_empty(emptys)
func get_generated_rock_type(coord : Vector2i) -> RockLayer.TileType:
var rock_tile_value : float = (

View File

@@ -1,6 +1,6 @@
extends ColorRect
@export var camera : Camera
@export var camera : RegionCamera
@export var region : Region
const PASSING_DAY_CLOUD_SPEED = 1

View File

@@ -1,6 +1,6 @@
extends GPUParticles2D
@export var camera : Camera
@export var camera : RegionCamera
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(_d):

View File

@@ -3,7 +3,7 @@ class_name Region
const MIN_PASS_DAY_ANIMATION_TIME : float = PassDay.TIME_MARGIN * 2
const TUTORIAL_SCENE : PackedScene = preload("res://gui/game/tutorial/tutorial.tscn")
const WIN_WAVE_SCENE : PackedScene = preload("res://stages/terrain/region/win_wave.tscn")
const TILE_SET : TileSet = preload("res://stages/terrain/region/resources/moss_biome.tres")
const TILE_SCALE = 1
@@ -35,6 +35,7 @@ var generated_chunks : Array[Chunk] = []
var generation_semaphore : Semaphore
@onready var recharge_station : TruckRecharge = %RechargeStation
@onready var camera : RegionCamera = %Camera
# Cheat Code
func _input(_e):
@@ -46,7 +47,7 @@ func _input(_e):
):
data.succeded.emit()
data.state = RegionData.State.SUCCEEDED
data.update()
# data.update()
if (
Input.is_action_pressed("drop")
@@ -86,6 +87,8 @@ func _ready():
GameInfo.game_data.player_data.inventory.add_item(Pickaxe.new())
GameInfo.game_data.player_data.inventory.add_item(Fork.new())
GameInfo.game_data.player_data.inventory.add_item(ShipPortal.new())
data.succeded.connect(finishing_region_animation)
func _process(_d):
if player:
@@ -244,6 +247,16 @@ func is_coords_decontaminated(tiles_coords : Array[Vector2i]):
return false
return true
func is_coords_rocky(tiles_coords : Array[Vector2i]):
for coord in tiles_coords:
var chunk : Chunk = get_chunk_for_coord(coord)
if chunk:
var local_coord := TilesDiffData.get_local_coord(coord, chunk.chunk_coord)
print(chunk.rock_layer.get_tile_type(local_coord))
if chunk.rock_layer.get_tile_type(local_coord) != RockLayer.TileType.EMPTY:
return false
return true
func dig_rocks(tiles_coords : Array[Vector2i], save_tiles_diff := true, loot := true):
if save_tiles_diff :
data.rock_tiles_data.update_tiles_diff(tiles_coords, TilesDiffData.TileDiff.ABSENT)
@@ -277,14 +290,27 @@ func decontaminate(tiles_coords : Array[Vector2i], save_tiles_diff := true):
if save_tiles_diff :
data.decontamination_tiles_data.update_tiles_diff(tiles_coords, TilesDiffData.TileDiff.PRESENT)
var coord_to_update : Dictionary = {}
for coord in tiles_coords:
var chunk : Chunk = get_chunk_for_coord(coord)
if chunk:
var local_coord := TilesDiffData.get_local_coord(coord, chunk.chunk_coord)
chunk.decontamination_layer.place_decontamination(local_coord)
if not chunk in coord_to_update.keys():
coord_to_update[chunk] = [] as Array[Vector2i]
coord_to_update[chunk].append(local_coord)
for chunk in coord_to_update.keys():
var coords : Array[Vector2i] = coord_to_update[chunk] as Array[Vector2i]
chunk.decontamination_layer.place_decontaminations(coords)
func finishing_region_animation():
pass #TODO
var win_wave := WIN_WAVE_SCENE.instantiate() as WinWave
add_entity(win_wave)
win_wave.started_time = 0.
win_wave.position = player.position
win_wave.region = self
#endregion

View File

@@ -2,7 +2,7 @@ extends Resource
class_name RegionParameter
const DEFAULT_ROCK_THRESHOLD = 0.3
const DEFAULT_DECONTAMINATION_THRESHOLD = 0.4
const DEFAULT_DECONTAMINATION_THRESHOLD = 0.5
const DEFAULT_CRISTAL_THRESHOLD = 0.1
const DEFAULT_CHARGE = 8
const DEFAULT_START_DECONTAMINATION_ZONE_RADIUS = 3

View File

@@ -1,9 +1,6 @@
extends ColorRect
@export var camera : Camera
@export var camera : RegionCamera
func _process(_delta: float) -> void:
if is_node_ready():

View File

@@ -11,7 +11,7 @@ func setup():
func place_decontamination(coord : Vector2i, save = false):
place_decontaminations([coord], save)
func place_decontaminations(coords : Array[Vector2i], _save := false):
func place_decontaminations(coords : Array, _save := false):
place_terrain_cells(
coords,
DECONTAMINATION_TILE_TERRAIN_SET,

View File

@@ -12,7 +12,7 @@ func _init(
set_rendering_quadrant_size(Region.CHUNK_TILE_SIZE)
tile_set = Region.TILE_SET
scale = Vector2.ONE * Region.TILE_SCALE
navigation_enabled = false
navigation_enabled = true
region_data = _region_data
# collision_visibility_mode = DebugVisibilityMode.DEBUG_VISIBILITY_MODE_FORCE_SHOW

View File

@@ -5,12 +5,21 @@ class_name RockLayer
const ROCK_TILE_TERRAIN_SET : int = 0
const ROCK_TILE_TERRAIN : int = 1
const CRISTAL_TILE_TERRAIN : int = 2
const EMPTY_TILE_TERRAIN_SET : int = 0
const EMPTY_TILE_TERRAIN : int = 4
enum TileType { EMPTY,ROCK,CRISTAL }
func setup():
z_index = -1
func place_empty(coords : Array[Vector2i]):
place_terrain_cells(
coords,
EMPTY_TILE_TERRAIN_SET,
EMPTY_TILE_TERRAIN,
)
func place_rocks(coords : Array[Vector2i], type := TileType.ROCK):
if type != TileType.EMPTY:
place_terrain_cells(
@@ -18,12 +27,13 @@ func place_rocks(coords : Array[Vector2i], type := TileType.ROCK):
ROCK_TILE_TERRAIN_SET,
ROCK_TILE_TERRAIN if type == TileType.ROCK else CRISTAL_TILE_TERRAIN,
)
func remove_rocks(coords : Array[Vector2i], _save = false):
place_terrain_cells(
coords,
ROCK_TILE_TERRAIN_SET,
-1
EMPTY_TILE_TERRAIN_SET,
EMPTY_TILE_TERRAIN,
)

View File

@@ -0,0 +1,75 @@
@tool
extends Node2D
class_name WinWave
var region : Region
@export var started_time = 0.
var shake_asked := false
var last_updated = 0.
const WAVE_DURATION := 10
const WAVE_DISTANCE := 1000
const WAVE_FERTILE_FACTOR = 0.5
const WAVE_COLOR := Color("e29f32")
const UPDATE_INTERVAL := 1.5
const WIN_CRISTAL_SCENE = preload("res://entities/interactables/win_cristal/win_cristal.tscn")
var plant_looted : Array[Plant] = []
func _process(delta):
%CPUParticles2D.emitting = started_time < WAVE_DURATION
if not %EarthQuakePlayer.playing and started_time < 1.:
%EarthQuakePlayer.play()
if started_time < WAVE_DURATION:
if region and not shake_asked:
region.camera.shake(WAVE_DURATION)
shake_asked = true
%CPUParticles2D.emission_sphere_radius = get_radius()
started_time += delta
queue_redraw()
if started_time - last_updated > UPDATE_INTERVAL:
update()
func get_radius():
return started_time/WAVE_DURATION * WAVE_DISTANCE
func update():
last_updated = started_time
if region:
region.decontaminate(
Math.get_tiles_in_circle(
global_position,
get_radius() * WAVE_FERTILE_FACTOR
),
true
)
for p in region.entity_container.get_children():
if (
p is Plant
and p.data.get_state() == PlantData.State.MATURE
and not p in plant_looted
and p.position.distance_to(self.position) < get_radius()
):
AudioManager.play_sfx("Harvest")
p.produce_seed()
plant_looted.append(p)
spawn_cristal()
func spawn_cristal():
var new_cristal := WIN_CRISTAL_SCENE.instantiate() as WinCristal
new_cristal.data = WinCristalData.random()
var random_angle = randf_range(-PI,PI)
region.add_entity(new_cristal)
new_cristal.global_position = global_position + Vector2.UP.rotated(random_angle) * get_radius() * WAVE_FERTILE_FACTOR
new_cristal.spawn_animation()

View File

@@ -0,0 +1 @@
uid://cq1g6e4ifp0nl

View File

@@ -0,0 +1,35 @@
[gd_scene format=3 uid="uid://cy6e7rf263qyn"]
[ext_resource type="Script" uid="uid://cq1g6e4ifp0nl" path="res://stages/terrain/region/scripts/win_wave.gd" id="1_1nw4v"]
[ext_resource type="Texture2D" uid="uid://k2smk66py4uq" path="res://stages/terrain/region/assets/textures/moss_biome/moss_particle.png" id="2_qsj5l"]
[ext_resource type="AudioStream" uid="uid://di6id2kyfy2e1" path="res://common/audio_manager/assets/sfx/earth_rumble/sslc2022-earth-rumble-128880.mp3" id="3_qsj5l"]
[node name="WinWave" type="Node2D" unique_id=1731344761]
position = Vector2(-2, 0)
script = ExtResource("1_1nw4v")
started_time = 10.00204700000008
[node name="CPUParticles2D" type="CPUParticles2D" parent="." unique_id=474468021]
unique_name_in_owner = true
z_index = -1
emitting = false
amount = 16
texture = ExtResource("2_qsj5l")
lifetime = 0.3
emission_shape = 1
emission_sphere_radius = 90.3
direction = Vector2(0, -1)
initial_velocity_min = 47.81
initial_velocity_max = 103.59
angular_velocity_min = -10.0
angular_velocity_max = 10.0
angle_min = -720.0
angle_max = 720.0
scale_amount_min = 0.5
scale_amount_max = 0.8
[node name="EarthQuakePlayer" type="AudioStreamPlayer2D" parent="." unique_id=11609177]
unique_name_in_owner = true
stream = ExtResource("3_qsj5l")
volume_db = 7.0
bus = &"Sfx"