Ajout d'un mode infini
This commit is contained in:
@@ -1,25 +1,25 @@
|
||||
@abstract
|
||||
extends Resource
|
||||
class_name ProgressionData
|
||||
|
||||
@export var planted_mutation_ids: Array[String] = []
|
||||
@export var story_step_i := 0
|
||||
@export var mutations_unlocked = 8
|
||||
@export var run_number : int = 0
|
||||
@export var best_run : int = 0
|
||||
|
||||
var all_mutations: Array[PlantMutation] : get = get_all_mutations
|
||||
var available_mutations: Array[PlantMutation] : get = get_available_mutations
|
||||
var available_artefacts: Array[Artefact] : get = get_all_artifacts
|
||||
var story_step : StoryStep : get = get_story_step
|
||||
@abstract func get_story_step() -> StoryStep
|
||||
|
||||
func get_story_step() -> StoryStep:
|
||||
return get_all_story_steps()[story_step_i]
|
||||
@abstract func get_story_progression() -> float
|
||||
|
||||
func next_story_step() -> void:
|
||||
get_story_step()._on_finish()
|
||||
if story_step_i + 1 < len(get_all_story_steps()):
|
||||
story_step_i += 1
|
||||
@abstract func next_story_step() -> void
|
||||
|
||||
func get_available_mutations() -> Array[PlantMutation]:
|
||||
return get_all_mutations().slice(0, mutations_unlocked)
|
||||
@abstract func get_available_mutations() -> Array[PlantMutation]
|
||||
|
||||
@abstract func are_all_mutations_unlocked() -> bool
|
||||
|
||||
@abstract func discover_mutation(_pm : PlantMutation) -> void
|
||||
|
||||
@abstract func get_mutations_discovered() -> Array[String]
|
||||
|
||||
@abstract func unlock_new_mutation() -> PlantMutation
|
||||
|
||||
func get_all_mutations() -> Array[PlantMutation]:
|
||||
return [
|
||||
@@ -49,7 +49,6 @@ func get_all_artifacts() -> Array[Artefact]:
|
||||
TalionSoilArtifact.new(),
|
||||
]
|
||||
|
||||
|
||||
func get_all_story_steps() -> Array[StoryStep]:
|
||||
return [
|
||||
TutorialStoryStep.new(),
|
||||
@@ -57,3 +56,7 @@ func get_all_story_steps() -> Array[StoryStep]:
|
||||
MercuryStoryStep.new(),
|
||||
BoreaStoryStep.new()
|
||||
]
|
||||
|
||||
func finish_run(run : RunData):
|
||||
run_number += 1
|
||||
best_run = max(best_run, run.level)
|
||||
|
||||
Reference in New Issue
Block a user