Encore du dev pour la béta 1
* Suppression de la mutation éphémère * Ajout des modificateur de régions normaux Sableux et Toxique * Ajout de modificateurs challenge (Rocheux, Radioactif et Contaminé) * Ajout du modificateur de région bénéfique Résonnance * Ajout d'un distributeur toutes les 3 régions * Ajout des régions challenge * Bouclage sur les couleurs des mutations après le niveau 4 * Ajout de deux nouveaux panneaux de tutoriel, un sur les informations de plantes et l'autre sur le vaisseau
This commit is contained in:
@@ -3,13 +3,12 @@ class_name RunDataPlantInfo
|
||||
|
||||
signal updated
|
||||
|
||||
const DEFAULT_PLANT_AREA_RADIUS = 20
|
||||
const DEFAULT_PLANT_INFLUENCE_RADIUS = 100
|
||||
const DEFAULT_GROWING_TIME = 2
|
||||
const DEFAULT_LIFETIME = 6
|
||||
const DEFAULT_BASE_SCORE = 1
|
||||
const DEFAULT_SEED_NUMBER = 2
|
||||
const DEFAULT_SEED_RANDOM_LOOSE = 1
|
||||
const DEFAULT_PLANT_INFLUENCE_RADIUS = 100
|
||||
|
||||
var run_data : RunData
|
||||
|
||||
@@ -19,25 +18,57 @@ func _init(
|
||||
run_data = _run_data
|
||||
|
||||
var region_modifiers : Array[RegionModifier]
|
||||
var artefacts : Array[Artefact] = []
|
||||
|
||||
func get_plant_area_radius() -> int:
|
||||
return DEFAULT_PLANT_AREA_RADIUS
|
||||
|
||||
func get_plant_influence_radius() -> int:
|
||||
return DEFAULT_PLANT_INFLUENCE_RADIUS
|
||||
|
||||
func get_growing_time() -> int:
|
||||
return DEFAULT_GROWING_TIME
|
||||
var growing_time = DEFAULT_GROWING_TIME
|
||||
|
||||
for rm in get_region_modifiers():
|
||||
growing_time = rm.modify_plant_growing_time(growing_time)
|
||||
|
||||
return max(0, growing_time)
|
||||
|
||||
func get_lifetime() -> int:
|
||||
return DEFAULT_LIFETIME
|
||||
var lifetime = DEFAULT_LIFETIME
|
||||
|
||||
for rm in get_region_modifiers():
|
||||
lifetime = rm.modify_plant_lifetime(lifetime)
|
||||
|
||||
return max(0, lifetime)
|
||||
|
||||
func get_base_score() -> int:
|
||||
return DEFAULT_BASE_SCORE
|
||||
var base_score = DEFAULT_BASE_SCORE
|
||||
|
||||
for rm in get_region_modifiers():
|
||||
base_score = rm.modify_plant_base_score(base_score)
|
||||
|
||||
return max(0, base_score)
|
||||
|
||||
func get_seed_number() -> int:
|
||||
return DEFAULT_SEED_NUMBER
|
||||
var seed_number = DEFAULT_SEED_NUMBER
|
||||
|
||||
for rm in get_region_modifiers():
|
||||
seed_number = rm.modify_plant_seed_number(seed_number)
|
||||
|
||||
return max(0, seed_number)
|
||||
|
||||
func get_seed_random_loose() -> int:
|
||||
return DEFAULT_SEED_RANDOM_LOOSE
|
||||
var seed_random_loose = DEFAULT_SEED_RANDOM_LOOSE
|
||||
|
||||
for rm in get_region_modifiers():
|
||||
seed_random_loose = rm.modify_plant_seed_random_loose(seed_random_loose)
|
||||
|
||||
return min(max(0, seed_random_loose),get_seed_number())
|
||||
|
||||
func get_influence_radius() -> int:
|
||||
var influence_radius = DEFAULT_PLANT_INFLUENCE_RADIUS
|
||||
|
||||
for rm in get_region_modifiers():
|
||||
influence_radius = rm.modify_plant_influence_radius(influence_radius)
|
||||
|
||||
return max(0, influence_radius)
|
||||
|
||||
|
||||
func get_region_modifiers() -> Array[RegionModifier]:
|
||||
if run_data.current_run_point and run_data.current_run_point.region_parameter:
|
||||
return run_data.current_run_point.region_parameter.modifiers
|
||||
return []
|
||||
Reference in New Issue
Block a user