changement du scene manager, amélioration du cockpit et autres
* refonte du scene manager * refonte du audio manager * premier rework des plantes * nettoyage des dossiers/fichiers * renommage de planète en region * fix des run
This commit is contained in:
@@ -20,13 +20,37 @@ func get_mutation_description() -> String:
|
||||
printerr("Classe abstraite PlantMutation appelée")
|
||||
return ""
|
||||
|
||||
func mutate_score(_plant_state : Plant.State, _plant : Plant, score,) -> int:
|
||||
func mutate_plant_data(_plant_data : PlantData):
|
||||
pass
|
||||
|
||||
func mutate_score(_plant_data : PlantData, score : int) -> int:
|
||||
return score
|
||||
|
||||
func mutate_grow_time(_plant : Plant, grow_time : int) -> int:
|
||||
return grow_time
|
||||
func mutate_lifetime(_plant_data : PlantData, lifetime : int) -> int:
|
||||
return lifetime
|
||||
|
||||
func mutate_plant(_plant : Plant):
|
||||
func mutate_growing_time(_plant_data : PlantData, growing_time : int) -> int:
|
||||
return growing_time
|
||||
|
||||
func mutate_seed_number(_plant_data, seed_number):
|
||||
return seed_number
|
||||
|
||||
func mutate_seed_random_loose(_plant_data, seed_random_loose):
|
||||
return seed_random_loose
|
||||
|
||||
func _start_planted_effect(_plant : Plant):
|
||||
pass
|
||||
|
||||
func _start_day_effect(_plant : Plant):
|
||||
pass
|
||||
|
||||
func _start_maturation_effect(_plant : Plant):
|
||||
pass
|
||||
|
||||
func _start_dead_effect(_plant : Plant):
|
||||
pass
|
||||
|
||||
func _start_harvested_effect(_plant : Plant):
|
||||
pass
|
||||
|
||||
func get_level_for_rarity(rarity : int) -> int :
|
||||
@@ -70,16 +94,3 @@ static func get_rarity_color(rarity : int) -> Color:
|
||||
]
|
||||
|
||||
return rarity_colors[min(rarity, len(rarity_colors) - 1)]
|
||||
|
||||
static func random_mutation(except_mutations : Array[PlantMutation] = []) -> PlantMutation:
|
||||
var all_mutations = GameInfo.game_data.unlocked_plant_mutations.duplicate_deep()
|
||||
all_mutations = all_mutations.filter(
|
||||
func (f1 : PlantMutation):
|
||||
return except_mutations.find_custom(
|
||||
func (f2 : PlantMutation): return f2.get_mutation_name() == f1.get_mutation_name()
|
||||
) == -1
|
||||
)
|
||||
if len(all_mutations):
|
||||
return all_mutations.pick_random()
|
||||
else :
|
||||
return null
|
||||
|
||||
Reference in New Issue
Block a user