fix post-proto

* ajout d'un fondu de musique au changement de phase
* résolution de bugs en tout genre
This commit is contained in:
2025-11-14 16:43:52 +01:00
parent d3ea21e212
commit dbe8f03531
37 changed files with 411 additions and 147 deletions

View File

@@ -64,14 +64,11 @@ func plant(
type,
plant_mutations
)
plants.append(new_plant)
planet_data.score_by_plant.append(0)
new_plant.harvested.connect(_on_plant_harvested)
new_plant.state_changed.connect(_on_plant_state_changed)
new_plant.ready.connect(
func(): update_garden_score()
)
get_tree().create_timer(0.05).timeout.connect(update_garden_score)
return new_plant
func _on_plant_state_changed(_p: Plant):
@@ -85,7 +82,8 @@ func remove_plant(p: Plant):
if id >= 0:
plants.remove_at(id)
planet_data.score_by_plant.remove_at(id)
update_garden_score()
get_tree().create_timer(0.05).timeout.connect(update_garden_score)
func update_garden_score():

View File

@@ -116,7 +116,6 @@ func plant(
if garden.is_in_garden(plant_position):
var new_plant = garden.plant(type, plant_mutations)
add_entity(new_plant, plant_position)
garden.update_garden_score()
return true
return false
@@ -142,8 +141,7 @@ func pass_day():
if data.garden_score >= data.get_quota_score():
reach_quota()
if data.quota_days <= 0:
elif data.quota_days <= 0:
day_limit_exceed.emit(self)
save()