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
+35
View File
@@ -19,6 +19,7 @@ class FakeClient extends Node:
signal damage(vid: int, amount: int, flag: int)
signal motion(vid: int, victim_vid: int, motion: int)
signal gift_available()
signal weather_changed(enabled: bool)
signal guild_make_requested()
signal script_dialog(skin: int, text: String)
var ents := {}
@@ -83,6 +84,18 @@ func _run() -> void:
_ck(gs.dragon_soul_ui == null, "Dragon Soul runtime entry disabled for target 40250")
_ck(gs.atlas_ui != null, "atlas_ui built")
_ck(gs.get_node_or_null("Entities") != null, "entity mount present")
fc.weather_changed.emit(true)
await process_frame
_ck(gs.weather != null and gs.weather.kind() == "snow",
"40250 xmas_snow=1 enables snow on an eligible map")
gs.map_path = "metin2_map_n_flame_01"
fc.weather_changed.emit(true)
await process_frame
_ck(gs.weather.kind() == "none",
"40250 xmas_snow ignores excluded maps")
fc.weather_changed.emit(false)
await process_frame
_ck(gs.weather.kind() == "none", "40250 xmas_snow=0 disables snow")
# 2) 主角定位到出生点(load_map 失败 -> sample_height 返回 0 -> y=0)
_ck(gs.player.position.distance_to(Vector3(20, 0, 30)) < 0.01, # MapCoord.to_world 翻 Z
@@ -91,6 +104,28 @@ func _run() -> void:
# 3) net_world 不给主角画节点(本地 player 代表)
await process_frame
_ck(gs.net_world.node_for(1000) == null, "no net_world node for local vid")
# The isolated test does not start the audio director; keep world-reset focused
# on the attack queue rather than invoking an uninitialized BGM fade target.
gs._audio = null
gs._pending_shots.append(0)
gs._pending_shots.append(7)
gs.net_play._target_vid = 1000
gs.net_play._auto_attack_vid = 1000
gs.net_play._reserved_mode = gs.net_play.ReservedMode.CLICK_ACTOR
gs.net_play._is_attacking = true
gs.net_play._hit_windows = [{"start_time": 0.0, "end_time": 1.0}]
gs.net_play._victim_flush.append({"vid": 2000, "x": 1, "y": 2})
gs.pc._is_going = true
gs._on_world_reset()
_ck(gs._pending_shots.is_empty(), "world reset clears stale bow FLY/CG_SHOOT queue")
_ck(gs.net_play._main_vid == 0 and gs.net_play._target_vid == 0
and gs.net_play._auto_attack_vid == 0
and gs.net_play._reserved_mode == gs.net_play.ReservedMode.NONE,
"world reset clears NetPlay actor/target/reservation state")
_ck(not gs.net_play._is_attacking and gs.net_play._hit_windows.is_empty()
and gs.net_play._victim_flush.is_empty(),
"world reset clears attack windows and victim sync queue")
_ck(not gs.pc.is_going(), "world reset stops the local controller's stale destination")
fc.motion.emit(1000, 0, 305) # CRaceMotionData::NAME_CLAP
await process_frame
_ck(int(gs.player.get_meta("last_motion", 0)) == 305,