plante part pour ermit et tropical
[dev] upgrade sprite tester (choix de mutation)
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
extends ProgressionData
|
||||
class_name TestProgressionData
|
||||
|
||||
@export var mutations_available: Array
|
||||
|
||||
func _init() -> void:
|
||||
mutations_available = get_all_mutations().map(func(m): return m.id)
|
||||
|
||||
func get_story_step() -> StoryStep:
|
||||
return InfiniteStoryStep.new()
|
||||
|
||||
func get_story_progression() -> float:
|
||||
return 0.0
|
||||
|
||||
func discover_mutation(pm: PlantMutation) -> void:
|
||||
if !mutations_available.has(pm.id):
|
||||
mutations_available.append(pm.id)
|
||||
|
||||
func get_mutations_discovered() -> Array[String]:
|
||||
return mutations_available
|
||||
|
||||
func next_story_step() -> void:
|
||||
pass
|
||||
|
||||
func get_available_mutations() -> Array[PlantMutation]:
|
||||
return get_all_mutations().filter(func(m): return mutations_available.has(m.id))
|
||||
|
||||
func are_all_mutations_unlocked() -> bool:
|
||||
return len(mutations_available) >= len(get_all_mutations())
|
||||
|
||||
func unlock_new_mutation() -> PlantMutation:
|
||||
return get_all_mutations().pick_random()
|
||||
|
||||
func lock_mutation(pm: PlantMutation) -> void:
|
||||
mutations_available.erase(pm.id)
|
||||
@@ -0,0 +1 @@
|
||||
uid://dlbrxlmfjm273
|
||||
@@ -59,10 +59,9 @@ part_group = Dictionary[String, ExtResource("5_npk80")]({
|
||||
"ANCIENT": ExtResource("6_hyb2i"),
|
||||
"CLEANING": ExtResource("8_alra6"),
|
||||
"CUTTING": ExtResource("9_lggh7"),
|
||||
"ERMIT": ExtResource("7_4gk8a"),
|
||||
"FERTILE": ExtResource("10_8r35x"),
|
||||
"GENEROUS": ExtResource("11_rbd7l"),
|
||||
"HUMIDE": ExtResource("12_tjaiv"),
|
||||
"HERMIT": ExtResource("7_4gk8a"),
|
||||
"HURRIED": ExtResource("12_nfxo0"),
|
||||
"PRECOCIOUS": ExtResource("13_i8j71"),
|
||||
"PROLIFIC": ExtResource("14_l2vrg"),
|
||||
@@ -78,6 +77,7 @@ part_group = Dictionary[String, ExtResource("5_npk80")]({
|
||||
"SOCIABLE": ExtResource("23_hyb2i"),
|
||||
"SPONTANEOUS": ExtResource("24_4gk8a"),
|
||||
"TOUGH": ExtResource("25_alra6"),
|
||||
"TROPICAL": ExtResource("12_tjaiv"),
|
||||
"VIVACIOUS": ExtResource("26_lggh7")
|
||||
})
|
||||
chance_to_have_part = 1.0
|
||||
|
||||
Reference in New Issue
Block a user