Dev 0.2.0

* Equilibrage de la difficulté (suite)
* Correction du timing des dialogues de Demeter
* Dev de la base astra (avec les logs)
* Fix de bug de duplication d'objets
* Fix de la mutation ancien
* Ajout d'une mention de la propagation des mutations dans le tuto
This commit is contained in:
2026-07-25 20:09:54 +02:00
parent 3ff6d68371
commit ffe6f50ba6
64 changed files with 633 additions and 126 deletions
@@ -27,7 +27,7 @@ func get_day_factor():
return max(1, DEFAULT_DAY_FACTOR - level)
func get_score_increase():
return max(1, level - DEFAULT_DAY_FACTOR + 1)
return max(1, level - DEFAULT_DAY_FACTOR + 2)
func mutate_score(data : PlantData, score) -> int:
if data.get_state() != PlantData.State.MATURE:
@@ -56,7 +56,6 @@ func generate_plants():
child.free()
for i in n_to_generate:
print("Generate plant :")
var plant_pos_x = (i % n_per_row) * space_between_plants
@warning_ignore("integer_division")
var plant_pos_y = (i / n_per_row) * space_between_plants
@@ -80,7 +79,6 @@ func generate_plants():
picked_mutation.level = randi_range(min_level, max_level)
plant_data.mutations.append(picked_mutation)
var plant: Plant = Plant.new(plant_data)
print(plant.data.plant_name)
%Plants.add_child(plant)
plant.global_position = plant_position
@@ -89,7 +87,6 @@ func generate_seeds():
child.free()
for i in n_to_generate:
print("Generate seed :")
var seed_pos_x = (i % n_per_row) * space_between_plants
@warning_ignore("integer_division")
var seed_pos_y = (i / n_per_row) * space_between_plants
@@ -15,7 +15,7 @@ class_name PlantPartBuilder
func load_resource():
var destination := "res://entities/plants/resources/plant_parts/" + part_name + ".tres"
print("Loading: ", part_name, " n°: ", part_index, " at: ", destination)
# print("Loading: ", part_name, " n°: ", part_index, " at: ", destination)
var part_group: PartGroup = ResourceLoader.load(destination) as PartGroup
if part_group.parts.size() <= part_index:
printerr("No part at ", part_index)
@@ -47,7 +47,7 @@ func load_resource():
func save_as_resource():
var destination := "res://entities/plants/resources/plant_parts/" + part_name + ".tres"
print("Saving: ", part_name, " n°: ", part_index, " at: ", destination)
# print("Saving: ", part_name, " n°: ", part_index, " at: ", destination)
var part_group: PartGroup = ResourceLoader.load(destination) as PartGroup
if not part_group:
part_group = PartGroup.new()
@@ -137,7 +137,7 @@ func build_plant_texture(plant_data: PlantData) -> Texture:
texture = PLACEHOLDER_GROWING_TEXTURE
base_part = pick_random(baby_bases)
_:
print("{state} not handled".format({"state": PlantData.State.keys()[plant_data.get_state()]}))
# print("{state} not handled".format({"state": PlantData.State.keys()[plant_data.get_state()]}))
return null
var weight_per_origin_type: Array[int] = origin_weights_base.values().duplicate()