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
+90
View File
@@ -31,6 +31,96 @@ Group MotionEventData
return 1;
}
}
{
// 40250 RaceMotionDataEvent has dedicated payloads for FLY,
// SCREEN_WAVING and SPECIAL_ATTACKING. Keep the no-payload event
// types in the same snapshot so they cannot be silently dropped.
const std::string events = R"(MotionFileName "events.gr2"
Group MotionEventData
{
Group Event00
{
MotionEventType 2
StartingTime 0.10
DuringTime 0.20
Power 300
AffectingRange 200
}
Group Event01
{
MotionEventType 4
StartingTime 0.30
DuringTime 0.40
EnableHitProcess 0
AttackType 1
HittingType 2
StiffenTime 0.05
InvisibleTime 0.10
ExternalForce 20
HitLimitCount 3
CollisionType 4
SphereDataCount 2
Group SphereData00
{
Radius 100
Position 1 2 3
}
Group SphereData01
{
Radius 200
Position 4 5 6
}
}
Group Event02
{
MotionEventType 6
StartingTime 0.50
AttachingEnable 1
AttachingBoneName "Bip01 R Hand"
FlyFileName "d:/ymir work/pc/warrior/effect/geompung.msf"
FlyPosition 7 8 9
}
Group Event03
{
MotionEventType 7
StartingTime 0.60
}
Group Event04
{
MotionEventType 8
StartingTime 0.70
}
Group Event05
{
MotionEventType 9
StartingTime 0.80
}
}
)";
fmt::Msa parsed;
std::string error;
if (!fmt::parse_msa(events, parsed, &error) || parsed.events.size() != 6) {
std::fprintf(stderr, "motion event payload parse failed: %s\n", error.c_str());
return 1;
}
const fmt::MotionEvent *wave = &parsed.events[0];
const fmt::MotionEvent *attack = &parsed.events[1];
const fmt::MotionEvent *fly = &parsed.events[2];
if (wave->type != 2 || std::fabs(wave->duration_time - 0.2f) > 1e-6f ||
wave->power != 300 || wave->affecting_range != 200 ||
attack->type != 4 || attack->enable_hit_process || attack->attack_type != 1 ||
attack->hitting_type != 2 || attack->collision_type != 4 ||
attack->collision_spheres.size() != 2 ||
std::fabs(attack->collision_spheres[1].radius - 200.0f) > 1e-6f ||
attack->collision_spheres[1].position[2] != 6.0f ||
fly->type != 6 || fly->fly_file.find("geompung.msf") == std::string::npos ||
!fly->fly_attaching || fly->fly_attaching_bone != "Bip01 R Hand" ||
fly->fly_position[0] != 7.0f || parsed.events[3].type != 7 ||
parsed.events[4].type != 8 || parsed.events[5].type != 9) {
std::fprintf(stderr, "40250 motion event payload fields were lost\n");
return 1;
}
}
const std::string text = R"(
ScriptType MotionData
MotionFileName "d:/ymir work/pc/test.gr2"