création du squelette des region modifier, amélioration du tutoriel et mise en place de la run complète avec cinématique d'outro

This commit is contained in:
2026-02-21 20:44:41 +01:00
parent eb48a095de
commit e767e776f2
80 changed files with 415 additions and 201 deletions

View File

@@ -3,6 +3,7 @@ class_name Tutorial
const STEP_SCENE = preload("res://gui/game/tutorial/step_gui/step_gui.tscn")
signal succeded
var indicators : Array[InGameIndicator]
@export var player : Player
@@ -48,13 +49,29 @@ var indicators : Array[InGameIndicator]
return region.data.get_score() != 0)
),
Step.new(
"HARVEST_MATURE_PLANTS_WITH_SHOVEL",
"DISCOVER_A_SEED_WITH_A_MUTATION",
(func ():
for e in region.entity_container.get_children():
if e is Plant and e.harvested:
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):
return true
return false)
),
]
func _ready():
@@ -76,13 +93,23 @@ func setup_gui():
func _process(_d):
if region and region.data and "tutorial" in region.data.flags:
if region and region.data and "tutorial" in region.data.flags and not GameInfo.game_data.tutorial_done:
var success = true
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
if success:
finish_tutorial()
func finish_tutorial():
GameInfo.game_data.tutorial_done = true
succeded.emit()
class Step:
var text : String : get = get_text