Minor fixes

This commit is contained in:
2026-04-19 10:57:42 +02:00
parent 3f49bb42c8
commit 623ade6291
3 changed files with 234 additions and 283 deletions

View File

@@ -680,12 +680,7 @@ func _register_buffs() -> void:
var starts_unlocked: bool = buff.unlocked or persisted_level > 0
game_state.set_buff_unlocked(buff_id, starts_unlocked)
_try_unlock_buff_from_goal(buff)
func _try_unlock_buff_from_goal(buff: GeneratorBuffData) -> void:
if game_state == null:
return
game_state._try_unlock_buff_from_goal(buff)
game_state.try_unlock_buff_from_goal(buff)
func _on_currency_changed(_changed_currency_id: StringName, _new_amount: BigNumber) -> void:
if game_state == null:

View File

@@ -41,8 +41,6 @@ func _ready() -> void:
if _generator.game_state:
_generator.game_state.currency_changed.connect(_on_currency_changed)
_generator.game_state.generator_state_changed.connect(_on_generator_state_changed)
_generator.game_state.generator_buff_level_changed.connect(_on_generator_buff_level_changed)
_generator.game_state.generator_buff_unlocked_changed.connect(_on_generator_buff_unlocked_changed)
_name_label.text = _generator.data.name if _generator.data != null else "Generator"
_build_buff_rows()
@@ -71,18 +69,6 @@ func _on_generator_state_changed(generator_id: StringName, _state: Dictionary) -
visible = true
_refresh_generator_ui()
func _on_generator_buff_level_changed(generator_id: StringName, _buff_id: StringName, _new_level: int) -> void:
if generator_id != _generator_id:
return
_refresh_generator_ui()
func _on_generator_buff_unlocked_changed(generator_id: StringName, _buff_id: StringName, _unlocked: bool) -> void:
if generator_id != _generator_id:
return
_refresh_generator_ui()
func _on_buy_buff_pressed(buff_id: StringName) -> void:
_generator.buy_buff(buff_id)
_refresh_generator_ui()

File diff suppressed because it is too large Load Diff