6 Commits

Author SHA1 Message Date
a7dcd6d725 Correction de bug de Dialogic et réparation de la décontamination de la planète de l'écran titre 2026-06-22 20:44:06 +02:00
caace67d12 Revert des changements spécial démo 2026-06-22 20:43:25 +02:00
b137360fa4 Correction des fichiers d'import des plantes (changements auto faits par Godot) 2026-06-22 20:39:30 +02:00
89c04f5d0c Merge branch 'demo' 2026-06-22 20:19:48 +02:00
Altaezio
e03bfc580e new mutations wip 2026-05-28 17:05:04 +02:00
4c4b051f3f Fix divers beta 1.4
* Changement du son de récupération d'objet
* Ajout d'une couleur de rareté et suppression de la boucle sur la couleur de rareté
* Changement de la mutation Prolifique : n'ajoute des graines que si mature
* Changement de la mutation Rapide : réduction du debuff de temps de vie par 2
* Modification de la mutation Vivace : Augmentation des points ajoutés
* Les graines données sur des plantes non mature ne mutent plus
* Fix sur la plantation, on ne peut plus planter là où il y a de la roche
* Fix visuel : les particule de vent ne s'affichent plus lorsqu'il pleut
2026-05-17 16:40:22 +02:00
21 changed files with 234 additions and 71 deletions

View File

@@ -9,17 +9,18 @@ class_name DialogicNode_NameLabel
@export var use_character_color := true
func _ready() -> void:
add_to_group('dialogic_name_label')
if hide_when_empty:
name_label_root.visible = false
text = ""
add_to_group('dialogic_name_label')
if hide_when_empty:
name_label_root.visible = false
text = ""
func _set(property, what):
if property == 'text' and typeof(what) == TYPE_STRING:
text = what
if hide_when_empty:
name_label_root.visible = !what.is_empty()
else:
name_label_root.show()
return true
if property == 'text' and typeof(what) == TYPE_STRING:
text = what
if hide_when_empty:
name_label_root.visible = !what.is_empty()
else:
name_label_root.show()
return true
return false

View File

@@ -1,10 +1,9 @@
extends Node
const SAVE_GAME_LOCATION = "user://stw_demo_save.tres"
const SAVE_GAME_LOCATION = "user://stw_playtest_2_save.tres"
const SAVE_SETTINGS_LOCATION = "user://stw_settings.tres"
var game_loaded = false
signal game_loaded
signal game_data_updated(g : GameData)
var game_data : GameData :
@@ -20,6 +19,7 @@ func load_game_data() -> GameData:
game_data = null
if ResourceLoader.exists(SAVE_GAME_LOCATION) and ResourceLoader.load(SAVE_GAME_LOCATION):
game_data = ResourceLoader.load(SAVE_GAME_LOCATION).duplicate_deep()
game_loaded.emit()
return game_data

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 MiB

After

Width:  |  Height:  |  Size: 8.4 MiB

View File

@@ -4,12 +4,12 @@
[ext_resource type="Script" uid="uid://c360ic1aost1n" path="res://entities/plants/scripts/texture_builder/plant_part_builder.gd" id="2_a5yje"]
[ext_resource type="Script" path="res://entities/plants/scripts/texture_builder/plant_attach_builder.gd" id="3_yh7e0"]
[sub_resource type="AtlasTexture" id="AtlasTexture_yh7e0"]
[sub_resource type="AtlasTexture" id="AtlasTexture_khbsd"]
atlas = ExtResource("1_yh7e0")
region = Rect2(1914, 1843, 213, 199)
[node name="Sprite" type="Sprite2D" unique_id=1642167049 node_paths=PackedStringArray("root", "attaches")]
texture = SubResource("AtlasTexture_yh7e0")
texture = SubResource("AtlasTexture_khbsd")
script = ExtResource("2_a5yje")
part_name = "LeafE9"
type = 2

View File

@@ -123,8 +123,13 @@ func calculate_plant_score(
return data.get_score(with_state)
func harvest():
for i in range(data.get_seed_number()):
await produce_seed()
var do_produce_seeds := true
for m in data.mutations:
do_produce_seeds = do_produce_seeds && m.produce_seeds()
if do_produce_seeds:
for i in range(data.get_seed_number()):
await produce_seed()
if data.get_state() == PlantData.State.MATURE:
for m in data.mutations:
@@ -151,8 +156,15 @@ func mature():
func die():
for m in data.mutations:
m._start_dead_effect(self)
for i in range(data.get_seed_number()):
await produce_seed()
var do_produce_seeds := true
for m in data.mutations:
do_produce_seeds = do_produce_seeds && m.produce_seeds_on_maturation()
if do_produce_seeds:
for i in range(data.get_seed_number()):
await produce_seed()
AudioManager.play_sfx("Harvest")
disappear()

View File

@@ -28,6 +28,9 @@ func get_mutation_name() -> String:
func mutate_plant_data(_plant_data: PlantData):
pass
func has_score(_plant_data: PlantData) -> bool:
return true
func mutate_score(_plant_data: PlantData, score: int) -> int:
return score
@@ -40,6 +43,9 @@ func mutate_lifetime(_plant_data: PlantData, lifetime: int) -> int:
func mutate_growing_time(_plant_data: PlantData, growing_time: int) -> int:
return growing_time
func produce_seeds() -> bool:
return true
func mutate_seed_number(_plant_data: PlantData, seed_number: int) -> int:
return seed_number

View File

@@ -0,0 +1,25 @@
extends PlantMutation
class_name CleaningMutation
func get_icon() -> Texture:
return preload("res://common/icons/alert-triangle.svg")
func get_mutation_id() -> String:
return "CLEANING"
func get_mutation_name() -> String:
return tr("CLEANING")
func get_mutation_description() -> String:
return tr("CLEANING_EFFECT_TEXT").format({
"purification_radius": get_purification_radius()
})
func _start_dead_effect(plant: Plant):
plant.region.decontaminate(Math.get_tiles_in_circle(
plant.global_position,
get_purification_radius() * (Region.TILE_SIZE + Region.TILE_SIZE / 2.)
))
func get_purification_radius() -> int:
return level + 1 # one more than purification

View File

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

View File

@@ -0,0 +1,29 @@
extends PlantMutation
class_name CuttingMutation
func get_icon() -> Texture:
return preload("res://common/icons/alert-triangle.svg")
func get_base_rarity() -> int:
return 1
func get_mutation_id() -> String:
return "CUTTING"
func get_mutation_name() -> String:
return tr("CUTTING")
func get_mutation_description() -> String:
return tr("CUTTING_EFFECT_TEXT").format({
"cutable_per_day": get_cutable_per_day()
})
func _start_day_effect(plant: Plant):
var cut_left := get_cutable_per_day()
for p in plant.data.nearby_plants:
if cut_left > 0 && p.is_mature():
p.harvest()
cut_left -= 1
func get_cutable_per_day() -> int:
return level

View File

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

View File

@@ -0,0 +1,25 @@
extends PlantMutation
class_name EnergizingMutation
func get_icon() -> Texture:
return preload("res://common/icons/alert-triangle.svg")
func get_base_rarity() -> int:
return 1
func get_mutation_id() -> String:
return "ENERGIZING"
func get_mutation_name() -> String:
return tr("ENERGIZING")
func get_mutation_description() -> String:
return tr("ENERGIZING_EFFECT_TEXT").format({
"bonus_energy": get_bonus_energy()
})
func _start_dead_effect(plant: Plant):
plant.region.player.data.energy += get_bonus_energy()
func get_bonus_energy() -> int:
return level

View File

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

View File

@@ -0,0 +1,27 @@
extends PlantMutation
class_name ErmitMutation
func get_icon() -> Texture:
return preload("res://common/icons/alert-triangle.svg")
func get_mutation_id() -> String:
return "ERMIT"
func get_mutation_name() -> String:
return tr("ERMIT")
func get_mutation_description() -> String:
return tr("ERMIT_EFFECT_TEXT").format(
{
"score_increase": get_score_increase(),
}
)
func has_score(plant_data: PlantData) -> bool:
return false if plant_data.nearby_plants.size() > 0 else true
func mutate_score(plant_data: PlantData, score: int) -> int:
return score + get_score_increase() if plant_data.nearby_plants.size() == 0 else 0
func get_score_increase():
return 2 * level

View File

@@ -0,0 +1 @@
uid://5pfa2y03wvlt

View File

@@ -0,0 +1,31 @@
extends PlantMutation
class_name SolarMutation
func get_icon() -> Texture:
return preload("res://common/icons/alert-triangle.svg")
func get_base_rarity() -> int:
return 1
func get_mutation_id() -> String:
return "SOLAR"
func get_mutation_name() -> String:
return tr("SOLAR")
func get_mutation_description() -> String:
return tr("SOLAR_EFFECT_TEXT").format({
"bonus_chance": get_bonus_chance(),
"bonus_energy": get_bonus_energy()
})
func _start_day_effect(plant: Plant):
var rng := RandomNumberGenerator.new()
if rng.randf() < get_bonus_chance():
plant.region.player.data.energy += get_bonus_energy()
func get_bonus_chance() -> float:
return 1 / (6 - min(level, 5))
func get_bonus_energy() -> int:
return 1

View File

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

View File

@@ -0,0 +1,32 @@
extends PlantMutation
class_name SpontaneousMutation
func get_icon() -> Texture:
return preload("res://common/icons/droplet.svg")
func get_base_rarity() -> int:
return 1
func get_mutation_id() -> String:
return "SPONTANEOUS"
func get_mutation_name() -> String:
return tr("SPONTANEOUS")
func get_mutation_description() -> String:
return tr("SPONTANEOUS_EFFECT_TEXT").format({
"bonus_seed": get_bonus_seed()
})
func produce_seeds() -> bool:
return false
func mutate_seed_number(_plant_data: PlantData, seed_number: int) -> int:
return seed_number + get_bonus_seed()
func _start_maturation_effect(plant: Plant):
for i in range(plant.data.get_seed_number()):
await plant.produce_seed()
func get_bonus_seed() -> int:
return level - 1

View File

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

View File

@@ -16,7 +16,7 @@ compatibility/default_parent_skeleton_in_mesh_instance_3d=true
config/name="Seeding The Wasteland"
config/description="Seeding planets is a survival, managment and cosy game in which you play a little gardener robot."
config/version="demo-1.3"
config/version="beta-2.0"
run/main_scene="uid://c5bruelvqbm1k"
config/features=PackedStringArray("4.7", "Forward Plus")
config/icon="uid://df0y0s666ui4h"
@@ -257,7 +257,7 @@ environment/defaults/default_clear_color=Color(0.0617213, 0.0605653, 0.169189, 1
[steam]
initialization/app_id=4690960
initialization/app_id=4452760
initialization/initialize_on_startup=true
initialization/embed_callbacks=true
multiplayer_peer/max_channels=4

View File

@@ -16,15 +16,15 @@ func _ready():
%Version.text = ProjectSettings.get_setting("application/config/version")
%Start.text = tr("CONTINUE") if GameInfo.game_data else tr("START")
%Restart.visible = GameInfo.game_data != null
if GameInfo.game_data:
%Planet3d.fertility_factor = (
max(0,float(GameInfo.game_data.progression_data.story_step_i - 1))
/ len(
GameInfo.game_data.progression_data.get_all_story_steps()
) - 1
)
%Settings.close_settings()
%Controls.close_controls()
if not GameInfo.game_data:
GameInfo.game_loaded.connect(
func ():
decontaminate_3D_planet(GameInfo.game_data)
)
else :
decontaminate_3D_planet(GameInfo.game_data)
func _on_start_pressed():
if GameInfo.game_data :
@@ -36,6 +36,14 @@ func _on_start_pressed():
GameInfo.start_game_data()
SceneManager.change_to_scene(IntroScene.new())
func decontaminate_3D_planet(game_data):
%Planet3d.fertility_factor = (
max(0,float(GameInfo.game_data.progression_data.story_step_i))
/ len(
GameInfo.game_data.progression_data.get_all_story_steps()
)
)
func _process(delta):
next_mouse_pos = get_viewport().get_mouse_position()
if Input.is_action_just_pressed("action"):

View File

@@ -3,7 +3,7 @@
[ext_resource type="Theme" uid="uid://bgcmd213j6gk1" path="res://gui/ressources/hud.tres" id="1_4ph5l"]
[ext_resource type="Script" uid="uid://cwmp2une7hobe" path="res://stages/title_screen/scripts/title_screen.gd" id="1_6yuhi"]
[ext_resource type="Texture2D" uid="uid://dcgnamu7sb3ov" path="res://common/icons/bolt.svg" id="3_6yuhi"]
[ext_resource type="Texture2D" uid="uid://3813d8ld7vt2" path="res://stages/title_screen/assets/textures/Logo-demo.png" id="3_lwj2x"]
[ext_resource type="Texture2D" uid="uid://cdpqg3pkjcw2h" path="res://stages/title_screen/assets/textures/title.png" id="3_lwj2x"]
[ext_resource type="Texture2D" uid="uid://bewr0t1wi8pff" path="res://common/icons/rotate.svg" id="5_6yuhi"]
[ext_resource type="PackedScene" uid="uid://cm5b7w7j6527f" path="res://stages/title_screen/planet_3d.tscn" id="5_7a1qq"]
[ext_resource type="Texture2D" uid="uid://cixd5j8yqpavg" path="res://common/icons/settings.svg" id="6_3aitq"]
@@ -23,48 +23,12 @@
[sub_resource type="ViewportTexture" id="ViewportTexture_6yuhi"]
viewport_path = NodePath("SubViewport")
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_rf16a"]
bg_color = Color(1, 0, 0.43137255, 1)
border_width_left = 10
border_width_top = 10
border_width_right = 10
border_width_bottom = 10
border_color = Color(1, 0, 0.43137255, 1)
corner_radius_top_left = 5
corner_radius_top_right = 5
corner_radius_bottom_right = 5
corner_radius_bottom_left = 5
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_gn4uv"]
bg_color = Color(0.78039217, 0, 0.3372549, 1)
border_width_left = 10
border_width_top = 10
border_width_right = 10
border_width_bottom = 10
border_color = Color(0.78, 0, 0.33800003, 1)
corner_radius_top_left = 5
corner_radius_top_right = 5
corner_radius_bottom_right = 5
corner_radius_bottom_left = 5
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ofiho"]
bg_color = Color(1, 0.24000001, 0.5693334, 1)
border_width_left = 10
border_width_top = 10
border_width_right = 10
border_width_bottom = 10
border_color = Color(1, 0.23921569, 0.5686275, 1)
corner_radius_top_left = 5
corner_radius_top_right = 5
corner_radius_bottom_right = 5
corner_radius_bottom_left = 5
[sub_resource type="ShaderMaterial" id="ShaderMaterial_lwj2x"]
shader = ExtResource("8_pjo5j")
shader_parameter/strength = 5.00000023424012
shader_parameter/mix_percentage = 0.3
[sub_resource type="FastNoiseLite" id="FastNoiseLite_lwj2x"]
[sub_resource type="FastNoiseLite" id="FastNoiseLite_rf16a"]
frequency = 1.0
[sub_resource type="Animation" id="Animation_gn4uv"]
@@ -332,9 +296,6 @@ size_flags_horizontal = 4
size_flags_vertical = 4
theme = ExtResource("1_4ph5l")
theme_override_font_sizes/font_size = 33
theme_override_styles/normal = SubResource("StyleBoxFlat_rf16a")
theme_override_styles/pressed = SubResource("StyleBoxFlat_gn4uv")
theme_override_styles/hover = SubResource("StyleBoxFlat_ofiho")
text = "START"
icon = ExtResource("3_6yuhi")
@@ -452,7 +413,7 @@ size = Vector2i(1980, 1080)
[node name="Planet3d" parent="SubViewport" unique_id=926789923 instance=ExtResource("5_7a1qq")]
unique_name_in_owner = true
noise = SubResource("FastNoiseLite_lwj2x")
noise = SubResource("FastNoiseLite_rf16a")
[node name="Camera3D" type="Camera3D" parent="SubViewport" unique_id=806252928]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -14.369979, 0, 64.323425)