Add final progression to tiny sword, fixes and tweeks required
This commit is contained in:
@@ -101,6 +101,9 @@ func _ready() -> void:
|
||||
_generator_id = _resolve_generator_id()
|
||||
cycle_progress_seconds = 0.0
|
||||
|
||||
game_state.ready.connect(_on_game_state_ready)
|
||||
|
||||
func _on_game_state_ready() -> void:
|
||||
if game_state:
|
||||
game_state.currency_changed.connect(_on_currency_changed)
|
||||
game_state.generator_state_changed.connect(_on_generated_state_changed)
|
||||
@@ -108,7 +111,7 @@ func _ready() -> void:
|
||||
# Research XP is awarded via game_state.add_research_xp() - buff calculation handled statically
|
||||
|
||||
_ensure_registered()
|
||||
|
||||
|
||||
## Updates click cooldown/click grants and runs automatic production cycles.
|
||||
func _process(delta: float) -> void:
|
||||
_remaining_click_cooldown_seconds = maxf(_remaining_click_cooldown_seconds - maxf(delta, 0.0), 0.0)
|
||||
@@ -716,12 +719,14 @@ func _default_owned_state() -> int:
|
||||
## Area2D callback: pointer entered generator interaction region.
|
||||
func _on_area_2d_mouse_entered() -> void:
|
||||
_mouse_entered = true
|
||||
info_generator_container.visible = true
|
||||
if info_generator_container:
|
||||
info_generator_container.visible = true
|
||||
|
||||
## Area2D callback: pointer exited generator interaction region.
|
||||
func _on_area_2d_mouse_exited() -> void:
|
||||
_mouse_entered = false
|
||||
info_generator_container.visible = false
|
||||
if info_generator_container:
|
||||
info_generator_container.visible = false
|
||||
|
||||
|
||||
func _on_generated_state_changed(generator_id: StringName, _state: Dictionary) -> void:
|
||||
|
||||
@@ -109,9 +109,9 @@ func _on_button_pressed() -> void:
|
||||
_game_state.purchase_prestige_buff(prestige_buff.id)
|
||||
|
||||
|
||||
func _on_prestige_buff_unlocked(buff_id: StringName) -> void:
|
||||
if prestige_buff and buff_id == prestige_buff.id:
|
||||
_refresh_state()
|
||||
func _on_prestige_buff_unlocked(_buff_id: StringName) -> void:
|
||||
# Any buff unlock may change this tile's parent-availability, so always refresh.
|
||||
_refresh_state()
|
||||
|
||||
|
||||
func _on_currency_changed(currency_id: StringName, _new_amount: BigNumber) -> void:
|
||||
|
||||
Reference in New Issue
Block a user