fix: 装备属性面板避让逻辑 + 多项功能更新

- item_tooltip_view.gd: 新增 avoid_rect 属性,tooltip 与装备窗口重叠时自动推到左侧
- inventory_ui.gd: 悬停装备时传入窗口矩形作为避让区域
- 包含其他累积的功能开发和测试文件
This commit is contained in:
shen
2026-09-21 16:38:59 -07:00
parent 1522a8a1a1
commit c93894313a
5498 changed files with 4558004 additions and 1442 deletions
+19
View File
@@ -33,6 +33,7 @@ func _assert(cond: bool, msg: String) -> void:
func _init() -> void:
print("\n=== Running test_death_restart_parity (Direction 4: RestartDialog 1:1) ===")
_test_dialog_layout()
_test_dead_phase_is_not_a_ui_entry()
_test_10s_cooldown_countdown()
_test_restart_commands()
_test_auto_close_on_revive()
@@ -57,6 +58,24 @@ func _test_dialog_layout() -> void:
death_ui.queue_free()
client.queue_free()
func _test_dead_phase_is_not_a_ui_entry() -> void:
print("\n--- Test 1b: PHASE_DEAD is consumed without a phase transition ---")
var client := MockClient.new()
get_root().add_child(client)
var death_ui := DeathUI.new()
get_root().add_child(death_ui)
death_ui.setup(client, get_root())
# 40250 RecvPhasePacket(PHASE_DEAD) intentionally does not call a phase
# setter. The dialog must be entered by GC_DEAD/entity_dead instead.
client.phase_changed.emit("dead")
_assert(not death_ui.is_open(), "phase_changed('dead') does not open RestartDialog")
client.entity_dead.emit(1)
_assert(death_ui.is_open(), "GC_DEAD/entity_dead opens RestartDialog")
death_ui.queue_free()
client.queue_free()
func _test_10s_cooldown_countdown() -> void:
print("\n--- Test 2: 10s Restart Here Cooldown Protection (cmd_general.cpp) ---")
var client := MockClient.new()