This commit is contained in:
2025-01-31 17:45:35 +08:00
parent cf389135c0
commit ef8d06b6cc
7 changed files with 253 additions and 26 deletions
+7 -4
View File
@@ -158,11 +158,14 @@ func update_button_states():
randomize_button.visible = true
arrange_button.visible = true
move_button.disabled = local_player_character.is_player_moving or local_player_character.has_performed_action
grab_button.disabled = not local_player_character.has_item_at_current_position()
put_button.disabled = not (local_player_character.has_items_in_playerboard() and not local_player_character.has_item_at_current_position())
# Only keep randomize button's disable condition
randomize_button.disabled = local_player_character.has_performed_action
arrange_button.disabled = not local_player_character.has_items_in_playerboard()
# Remove disabled conditions for other buttons:
move_button.disabled = false
grab_button.disabled = false
put_button.disabled = false
arrange_button.disabled = false
func _on_playerboard_slot_clicked(event, slot_index):
if event is InputEventMouseButton and event.pressed and event.button_index == MOUSE_BUTTON_LEFT: