Amélioration QOL et fix divers pour l'alpha-1.1

* Ajout des icônes dans les descriptions des mutations
* QOL sur la fonctionnalité de drop d'item
* Ajout des contrôles dans le tutoriel
* Réécriture des dialogues d'intro et d'échec
* Changements mineurs sur des dialogues et traduction
* Les graines apparaissent avec déjà une mutation
* Limitation du Talion autour de la station de recharge
* Fix de l'ascenseur dans la base Astra
* Ajout d'un effet visuel quand il n'y a plus d'énergie
* Le nombre de graine apparrait désormais dans l'inspécteur de plantes
* Ajout d'un petit icône de progrès de durée de vie de la plante au survol
* Ajout d'une description de la signification des icônes dans le menu pause
* La mutation éphémère réduit désormais la durée de vie de 1
This commit is contained in:
2026-03-13 11:40:31 +01:00
parent 2cd16acd6a
commit 76707171fa
45 changed files with 430 additions and 177 deletions

View File

@@ -12,6 +12,16 @@
[ext_resource type="Texture2D" uid="uid://b43thuq8piv18" path="res://common/icons/skull.svg" id="7_dr1y2"]
[ext_resource type="PackedScene" uid="uid://clicjf8ts51h8" path="res://gui/game/inventory_gui/inventory_gui.tscn" id="9_id0t5"]
[sub_resource type="Gradient" id="Gradient_ykapk"]
offsets = PackedFloat32Array(0.47639486, 1)
colors = PackedColorArray(1, 1, 1, 0, 1, 1, 1, 1)
[sub_resource type="GradientTexture2D" id="GradientTexture2D_p6blc"]
gradient = SubResource("Gradient_ykapk")
fill = 1
fill_from = Vector2(0.5, 0.5)
fill_to = Vector2(1.5, 0.5)
[sub_resource type="LabelSettings" id="LabelSettings_id0t5"]
font = ExtResource("6_2wykm")
font_size = 40
@@ -19,6 +29,17 @@ font_size = 40
[node name="GameGui" type="CanvasLayer" unique_id=274698556]
script = ExtResource("1_udau0")
[node name="NoEnergyVignette" type="TextureRect" parent="." unique_id=1917087264]
unique_name_in_owner = true
self_modulate = Color(1, 0, 0.43137255, 1)
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
texture = SubResource("GradientTexture2D_p6blc")
[node name="Alert" parent="." unique_id=496897031 instance=ExtResource("2_ykapk")]
unique_name_in_owner = true
modulate = Color(1, 0, 0.43137252, 1)

View File

@@ -30,7 +30,6 @@ func set_item(i : Item = item):
%ItemIconSprite.pixel_size = SPRITE_SIZE / i.icon.get_width()
for j in range(len(i.get_particles())):
print(i.get_particles()[j])
if j == 0:
%ParticleSprite1.visible = true
%ParticleSprite1.texture = i.get_particles()[j].texture

View File

@@ -38,6 +38,17 @@ func player_update(player_data : PlayerData, with_animation = true):
player_data.max_energy,
with_animation
)
if with_animation:
get_tree().create_tween().tween_property(
%NoEnergyVignette,
"modulate:a",
1. if player_data.energy == 0 else 0.,
0.3
)
else:
%NoEnergyVignette.modulate.a = 1. if player_data.energy == 0 else 0.
func _on_region_updated(region_data : RegionData):
await get_tree().create_timer(0.1).timeout

View File

@@ -10,6 +10,21 @@ var indicators : Array[InGameIndicator]
@export var region : Region
@onready var steps : Array[Step] = [
Step.new(
"MOVE_WITH_RIGHT_CLICK_OR_WASD",
(func ():
return player.global_position.distance_to(region.data.player_spawn) > 30)
),
Step.new(
"SELECT_ITEM_WITH_SCROLL_CLICK_OR_NUMBER",
(func ():
return player.data.inventory.current_item_ind != player.data.inventory.n_tools)
),
Step.new(
"LEFT_CLICK_TO_USE_ITEMS",
(func ():
return player.data.inventory.get_item() and Input.is_action_just_pressed("action"))
),
Step.new(
"USE_YOUR_DETECTOR_TO_FIND_THE_BATTERY",
(func ():
@@ -24,12 +39,19 @@ var indicators : Array[InGameIndicator]
return false)
),
Step.new(
"TAKE_A_SEED",
"TAKE_A_SEED_BY_CLICKING_ON_IT",
(func ():
return player.data.inventory.items.find_custom(
func(i:Item): return i is Seed
) != -1)
),
Step.new(
"DROP_SEED_WITH_KEY",
(func ():
return (
Input.is_action_pressed("drop"))
)
),
Step.new(
"PLANT_SEED_IN_FERTILE_ZONE",
(func ():
@@ -49,26 +71,10 @@ var indicators : Array[InGameIndicator]
return region.data.get_score() != 0)
),
Step.new(
"DISCOVER_A_SEED_WITH_A_MUTATION",
"HARVEST_A_MATURE_PLANT",
(func ():
for e in region.entity_container.get_children():
if e is ItemObject and e.item is Seed and len(e.item.plant_mutations):
return true
return false)
),
Step.new(
"PLANT_A_SEED_WITH_A_MUTATION",
(func ():
for e in region.entity_container.get_children():
if e is Plant and len(e.data.mutations):
return true
return false)
),
Step.new(
"HARVEST_A_MATURE_PLANT_WITH_A_MUTATION",
(func ():
for e in region.entity_container.get_children():
if e is Plant and e.harvested and len(e.data.mutations):
if e is Plant and e.harvested:
return true
return false)
),
@@ -98,10 +104,15 @@ func _process(_d):
for i in len(steps):
var step := steps[i]
var step_gui := %Steps.get_children()[i] as TutorialStepGui
step.update_succeeded()
step_gui.suceeded = step.succeeded
if not step.succeeded:
success = false
step_gui.visible = i == 0 or steps[i-1].succeeded
if step_gui.visible:
var old_succeeded = step.succeeded
step.update_succeeded()
if old_succeeded != step.succeeded: # Put a delay so two state don't collide
return
step_gui.suceeded = step.succeeded
if not step.succeeded:
success = false
if success:
finish_tutorial()

View File

@@ -37,34 +37,34 @@ grow_vertical = 2
mouse_filter = 2
theme = ExtResource("2_1wikm")
[node name="PanelContainer" type="PanelContainer" parent="MarginContainer" unique_id=913156548]
[node name="TutorialStepsPanelContainer" type="PanelContainer" parent="MarginContainer" unique_id=913156548]
layout_mode = 2
size_flags_horizontal = 0
size_flags_vertical = 8
mouse_filter = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_x7cwm")
[node name="MarginContainer" type="MarginContainer" parent="MarginContainer/PanelContainer" unique_id=332993244]
[node name="MarginContainer" type="MarginContainer" parent="MarginContainer/TutorialStepsPanelContainer" unique_id=332993244]
layout_mode = 2
mouse_filter = 2
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/PanelContainer/MarginContainer" unique_id=1196958295]
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/TutorialStepsPanelContainer/MarginContainer" unique_id=1196958295]
layout_mode = 2
mouse_filter = 2
[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/PanelContainer/MarginContainer/VBoxContainer" unique_id=1140176018]
[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/TutorialStepsPanelContainer/MarginContainer/VBoxContainer" unique_id=1140176018]
layout_mode = 2
mouse_filter = 2
[node name="TextureRect" type="TextureRect" parent="MarginContainer/PanelContainer/MarginContainer/VBoxContainer/HBoxContainer" unique_id=527978183]
[node name="TextureRect" type="TextureRect" parent="MarginContainer/TutorialStepsPanelContainer/MarginContainer/VBoxContainer/HBoxContainer" unique_id=527978183]
layout_mode = 2
texture = ExtResource("3_8kuag")
[node name="Label" type="Label" parent="MarginContainer/PanelContainer/MarginContainer/VBoxContainer/HBoxContainer" unique_id=592987672]
[node name="Label" type="Label" parent="MarginContainer/TutorialStepsPanelContainer/MarginContainer/VBoxContainer/HBoxContainer" unique_id=592987672]
layout_mode = 2
text = "TUTORIAL"
label_settings = SubResource("LabelSettings_8kuag")
[node name="Steps" type="VBoxContainer" parent="MarginContainer/PanelContainer/MarginContainer/VBoxContainer" unique_id=125170550]
[node name="Steps" type="VBoxContainer" parent="MarginContainer/TutorialStepsPanelContainer/MarginContainer/VBoxContainer" unique_id=125170550]
unique_name_in_owner = true
layout_mode = 2