Reset workers after prestige in momastery and alchemy tower

This commit is contained in:
2026-05-17 18:48:59 +02:00
parent 4fd23d9416
commit 51d042261f
13 changed files with 38 additions and 11 deletions

View File

@@ -185,6 +185,7 @@ func perform_prestige() -> bool:
game_state.reset_for_prestige(true, false, preserve_currencies)
_reset_all_buff_levels()
_reinitialize_generators_after_prestige_reset()
_reset_alchemy_workers_after_prestige()
if game_state:
game_state.emit_currency_changed_for_all()
_initialize_run_tracking_from_current_state()
@@ -469,6 +470,16 @@ func _reinitialize_generators_after_prestige_reset() -> void:
generator_node.call("reset_runtime_state_for_prestige")
func _reset_alchemy_workers_after_prestige() -> void:
var scene_root: Node = get_tree().current_scene
if scene_root == null:
return
var alchemy_panels: Array[Node] = scene_root.find_children("*", "AlchemyCurrenciesPanel", true, false)
for panel in alchemy_panels:
if panel != null and panel.has_method("reset_workers"):
panel.reset_workers()
func _deserialize_big_number(raw_value: Variant) -> BigNumber:
if raw_value is Dictionary:
return BigNumber.deserialize(raw_value)