ajout des mutation et refonte de l'inspecteur
* ajout des mutations #86 * changement de l'objectif #85 * refonte de l'inspecteur #71 * changement léger de la plantation * les plantes ne donnent que des graines de leurs espèces * refonte partielle du code, refacto
This commit is contained in:
@@ -14,11 +14,12 @@ func _init():
|
||||
current_planet_data_updated.emit(v)
|
||||
|
||||
@export var unlocked_plant_types : Array[PlantType] = []
|
||||
|
||||
@export var unlocked_plant_mutations : Array[PlantMutation] = []
|
||||
@export var unlocked_machines : Array[MachineType] = []
|
||||
|
||||
func set_default_unlocked():
|
||||
unlocked_plant_types = all_plant_types()
|
||||
unlocked_plant_mutations = all_plant_mutations()
|
||||
unlocked_machines = all_machines()
|
||||
|
||||
func all_plant_types() -> Array[PlantType]:
|
||||
@@ -34,4 +35,16 @@ func all_machines() -> Array[MachineType]:
|
||||
preload("res://entities/interactables/machines/compost/compost_types/energy_compost.tres"),
|
||||
preload("res://entities/interactables/machines/compost/compost_types/seed_compost.tres"),
|
||||
preload("res://entities/interactables/machines/solar_pannel/solar_pannel.tres"),
|
||||
]
|
||||
|
||||
func all_plant_mutations() -> Array[PlantMutation]:
|
||||
return [
|
||||
preload("res://entities/plants/resources/plant_mutations/ancient_mutation.tres"),
|
||||
preload("res://entities/plants/resources/plant_mutations/elitist_mutation.tres"),
|
||||
preload("res://entities/plants/resources/plant_mutations/ermit_mutation.tres"),
|
||||
preload("res://entities/plants/resources/plant_mutations/precocious_mutation.tres"),
|
||||
preload("res://entities/plants/resources/plant_mutations/quality_mutation.tres"),
|
||||
preload("res://entities/plants/resources/plant_mutations/quick_mutation.tres"),
|
||||
preload("res://entities/plants/resources/plant_mutations/sociable_mutation.tres"),
|
||||
preload("res://entities/plants/resources/plant_mutations/strong_mutation.tres"),
|
||||
]
|
||||
@@ -4,8 +4,8 @@ class_name PlanetData
|
||||
signal quota_number_updated(quota : int)
|
||||
signal contamination_updated(decontamination_surface : float)
|
||||
|
||||
const DEFAULT_CONTAMINATION_CENTRAL_ZONE_MAX_SIZE = 400.
|
||||
const DEFAULT_CONTAMINATION_CENTRAL_ZONE_MIN_SIZE = 100.
|
||||
const DEFAULT_CONTAMINATION_CENTRAL_ZONE_MAX_SIZE = 200.
|
||||
const DEFAULT_CONTAMINATION_CENTRAL_ZONE_MIN_SIZE = 50.
|
||||
const DEFAULT_BASE_SIZE = Vector2(2000,2000)
|
||||
|
||||
@export var base_size : Vector2 = Vector2(2000,2000)
|
||||
@@ -76,15 +76,17 @@ func generate_objective_rewards(level = 0) -> Array[ObjectiveReward]:
|
||||
|
||||
#region ------------------ Quotas ------------------
|
||||
func get_quota(n = 0) -> int:
|
||||
var first_quota = 50
|
||||
var quota_adding = n * 100
|
||||
var first_quotas = [
|
||||
5,
|
||||
10,
|
||||
20,
|
||||
50,
|
||||
]
|
||||
|
||||
if n == 0:
|
||||
return first_quota
|
||||
elif n < 0:
|
||||
return 0
|
||||
|
||||
return get_quota(n - 1) + quota_adding
|
||||
if n > len(first_quotas):
|
||||
return pow(n, 3)
|
||||
else:
|
||||
return first_quotas[n]
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
Reference in New Issue
Block a user