* Ajout de la déblocage des mutation du mode infini dans le mode histoire * Ajout de plus de caverne * Rework de l'emplacement des distributeurs/cavernes * Rework de l'influence, plus de clarté sur les plantes influencées * 4 d'inventaire dans le mode infini * Fix du tuto de mouvement en 3D * Déblocage de toutes le mutations à la fin du jeu * Fix de bug de chargelent de scène multiple
50 lines
1.5 KiB
GDScript
50 lines
1.5 KiB
GDScript
extends ProgressionData
|
|
class_name InfiniteProgressionData
|
|
|
|
@export var mutation_unlocked := StoryProgressionData.START_UNLOCKED_MUTATIONS
|
|
|
|
func get_story_step() -> StoryStep:
|
|
return InfiniteStoryStep.new(run_number)
|
|
|
|
func get_story_progression() -> float:
|
|
return 0.
|
|
|
|
func discover_mutation(_pm : PlantMutation) -> void:
|
|
pass
|
|
|
|
func get_mutations_discovered() -> Array[String]:
|
|
var mutation_discovered : Array[String] = []
|
|
for m in get_all_mutations():
|
|
mutation_discovered.append(m.get_mutation_id())
|
|
return mutation_discovered
|
|
|
|
func next_story_step() -> void:
|
|
pass
|
|
|
|
func are_all_mutations_unlocked() -> bool:
|
|
return true
|
|
|
|
func unlock_new_mutation() -> PlantMutation:
|
|
return null
|
|
|
|
func unlock_all_mutation() -> void:
|
|
pass
|
|
|
|
func get_available_mutations() -> Array[PlantMutation]:
|
|
if GameInfo.story_game_data and GameInfo.story_game_data.progression_data:
|
|
mutation_unlocked = max(mutation_unlocked,GameInfo.story_game_data.progression_data.mutations_unlocked)
|
|
|
|
return get_all_mutations().slice(0, mutation_unlocked)
|
|
|
|
func set_best_run(v := best_run):
|
|
if best_run < 10 and v == 10:
|
|
SteamConnection.unlock_achievement(SteamConnection.ACH_STW_HIT_10_INFINITE)
|
|
|
|
if best_run < 20 and v == 20:
|
|
SteamConnection.unlock_achievement(SteamConnection.ACH_STW_HIT_20_INFINITE)
|
|
|
|
if best_run < 30 and v == 30:
|
|
SteamConnection.unlock_achievement(SteamConnection.ACH_STW_HIT_30_INFINITE)
|
|
|
|
best_run = v
|