divers changements pour la sortie du second proto

* ajout du panneau solaire #54
* ajout d'un tutoriel #53
* equilibrage du jeu #73
* ajout d'un son pour l'annonce
This commit is contained in:
2025-09-26 16:56:35 +02:00
parent 6d0100d703
commit 099f8bb1be
56 changed files with 1129 additions and 87 deletions

View File

@@ -3,18 +3,35 @@ class_name GameData
signal current_planet_data_updated(p : PlanetData)
func _init():
set_default_unlocked()
@export var tutorial_done = false
@export var current_planet_data : PlanetData :
set(v):
current_planet_data = v
current_planet_data_updated.emit(v)
@export var unlocked_plant_types_path : Array[PlantType] = [
preload("res://entities/plants/resources/plant_types/champ.tres"),
preload("res://entities/plants/resources/plant_types/chardi.tres"),
preload("res://entities/plants/resources/plant_types/maias.tres"),
preload("res://entities/plants/resources/plant_types/pili.tres"),
]
@export var unlocked_plant_types : Array[PlantType] = []
@export var unlocked_machines : Array[MachineType] = [
preload("res://entities/interactables/machines/compost/compost.tres")
]
@export var unlocked_machines : Array[MachineType] = []
func set_default_unlocked():
unlocked_plant_types = all_plant_types()
unlocked_machines = all_machines()
func all_plant_types() -> Array[PlantType]:
return [
preload("res://entities/plants/resources/plant_types/champ.tres"),
preload("res://entities/plants/resources/plant_types/chardi.tres"),
preload("res://entities/plants/resources/plant_types/maias.tres"),
preload("res://entities/plants/resources/plant_types/pili.tres"),
]
func all_machines() -> Array[MachineType]:
return [
preload("res://entities/interactables/machines/compost/compost_types/energy_compost.tres"),
preload("res://entities/interactables/machines/compost/compost_types/seed_compost.tres"),
preload("res://entities/interactables/machines/solar_pannel/solar_pannel.tres"),
]

View File

@@ -76,7 +76,7 @@ func generate_objective_rewards(level = 0) -> Array[ObjectiveReward]:
#region ------------------ Quotas ------------------
func get_quota(n = 0) -> int:
var first_quota = 100
var first_quota = 50
var quota_adding = n * 100
if n == 0:

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#ffffff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-arrow-narrow-down"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M12 5l0 14" /><path d="M16 15l-4 4" /><path d="M8 15l4 4" /></svg>

After

Width:  |  Height:  |  Size: 388 B

View File

@@ -0,0 +1,43 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bsgmxvuphn73c"
path="res://.godot/imported/arrow-narrow-down.svg-cb15fd62c6ff45344ee03077f9caed2e.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://common/icons/arrow-narrow-down.svg"
dest_files=["res://.godot/imported/arrow-narrow-down.svg-cb15fd62c6ff45344ee03077f9caed2e.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
svg/scale=2.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#ffffff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-arrow-narrow-left"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M5 12l14 0" /><path d="M5 12l4 4" /><path d="M5 12l4 -4" /></svg>

After

Width:  |  Height:  |  Size: 387 B

View File

@@ -0,0 +1,43 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://7oh782g7ngop"
path="res://.godot/imported/arrow-narrow-left.svg-a856ad349eaa44596bec4c45b7837e6b.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://common/icons/arrow-narrow-left.svg"
dest_files=["res://.godot/imported/arrow-narrow-left.svg-a856ad349eaa44596bec4c45b7837e6b.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
svg/scale=2.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#ffffff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-arrow-narrow-right"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M5 12l14 0" /><path d="M15 16l4 -4" /><path d="M15 8l4 4" /></svg>

After

Width:  |  Height:  |  Size: 389 B

View File

@@ -0,0 +1,43 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bgi4rc50par30"
path="res://.godot/imported/arrow-narrow-right.svg-3f8a5cd0651f044c9c35e0fe78677364.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://common/icons/arrow-narrow-right.svg"
dest_files=["res://.godot/imported/arrow-narrow-right.svg-3f8a5cd0651f044c9c35e0fe78677364.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
svg/scale=2.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#ffffff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-arrow-narrow-up"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M12 5l0 14" /><path d="M16 9l-4 -4" /><path d="M8 9l4 -4" /></svg>

After

Width:  |  Height:  |  Size: 386 B

View File

@@ -0,0 +1,43 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://eug5icp6t1h3"
path="res://.godot/imported/arrow-narrow-up.svg-3e96282c2af955cf23507b48c4348810.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://common/icons/arrow-narrow-up.svg"
dest_files=["res://.godot/imported/arrow-narrow-up.svg-3e96282c2af955cf23507b48c4348810.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
svg/scale=2.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

View File

@@ -9,7 +9,7 @@
process_mode = 3
script = ExtResource("1_ji160")
decontamination_musics = [NodePath("ForestPhase1"), NodePath("ForestPhase2")]
decontamination_musics_levels = Array[float]([0.0, 30.0])
decontamination_musics_levels = Array[float]([0.0, 100.0])
[node name="ForestPhase1" type="AudioStreamPlayer" parent="."]
stream = ExtResource("1_stre8")

View File

@@ -22,8 +22,6 @@ func _on_contamination_updated(decontamination_surface : float):
for level in range(1, len(decontamination_musics_levels)):
if decontamination_surface > decontamination_musics_levels[level]:
actual_level = level
print(actual_level)
if len(decontamination_musics) > actual_level:
play_music(decontamination_musics[actual_level])