fix: 装备属性面板避让逻辑 + 多项功能更新
- item_tooltip_view.gd: 新增 avoid_rect 属性,tooltip 与装备窗口重叠时自动推到左侧 - inventory_ui.gd: 悬停装备时传入窗口矩形作为避让区域 - 包含其他累积的功能开发和测试文件
This commit is contained in:
@@ -172,6 +172,11 @@ func refresh() -> void:
|
||||
var wpath := _resolve_weapon(wpn_eff)
|
||||
model.set("weapon_gr2", wpath if hands & HAND_RIGHT else "")
|
||||
model.set("shield_gr2", wpath if hands & HAND_LEFT else "")
|
||||
# 40250 __IsWeaponTrace excludes bell/fan/bow and creates the trace only for
|
||||
# the remaining weapon types. Keep this decision at the item-data boundary,
|
||||
# not inside PlayerView where a mesh path alone cannot identify a bow/fan.
|
||||
if model.has_method("set_weapon_trace_enabled"):
|
||||
model.call("set_weapon_trace_enabled", _weapon_trace_enabled(wpn_eff))
|
||||
# SetArmor / SetWeapon both call __GetRefinedEffect.
|
||||
_refresh_weapon_refine_effect(model, _last_weapon_vnum)
|
||||
_refresh_armor_refine_effect(model, _last_body_vnum)
|
||||
@@ -324,6 +329,19 @@ func _weapon_hands(vnum: int) -> int:
|
||||
return HAND_LEFT
|
||||
return HAND_RIGHT
|
||||
|
||||
func _weapon_trace_enabled(vnum: int) -> bool:
|
||||
if vnum <= 0:
|
||||
return false
|
||||
var item := _item(vnum)
|
||||
# If item_proto is not ready yet, preserve the ordinary sword default. The
|
||||
# authoritative refresh repeats this decision once proto is available.
|
||||
if item.is_empty():
|
||||
return true
|
||||
if int(item.get("type", -1)) != ITEM_TYPE_WEAPON:
|
||||
return false
|
||||
var subtype := int(item.get("sub_type", -1))
|
||||
return subtype != WEAPON_SUB_BELL and subtype != WEAPON_SUB_FAN and subtype != WEAPON_SUB_BOW
|
||||
|
||||
# IsMountingHorse:主角实体 mount_vnum 非 0。远端 PC 暂无坐骑状态输入(seam)。
|
||||
func _is_mounting() -> bool:
|
||||
if _remote_mode or not main_getter.is_valid() or client == null or not client.has_method("get_entity"):
|
||||
|
||||
Reference in New Issue
Block a user