载入中...
搜索中...
未找到
攀爬事件 ↔ eve::Value 的**唯一**映射。
更多...
#include "common/Export.h"#include "climbing/Climbing.h"#include "common/Value.h"#include <cstdint>#include <span>#include <string_view>命名空间 | |
| namespace | eve |
| Build metadata (engine git commit, build time, third-party version). | |
| namespace | eve::climbing |
枚举 | |
| enum class | eve::climbing::EventKindParse : std::uint8_t { eve::climbing::Parsed , eve::climbing::Unknown } |
| 事件种类名的解析结果。 更多... | |
函数 | |
| std::string_view | eve::climbing::climbingEventKindName (ClimbingEventKind kind) |
事件种类的稳定脚本名(snake_case,例如 "anchor_transition_started")。 | |
| EventKindParse | eve::climbing::parseClimbingEventKind (std::string_view name, ClimbingEventKind &out) |
名字 → ClimbingEventKind(climbingEventKindName 的严格逆)。 | |
| Value | eve::climbing::climbingEventValue (const ClimbingEvent &event) |
一个事件 → {kind, actionId, tick, executionId, metadata}。 | |
| Value | eve::climbing::climbingEventArrayValue (std::span< const ClimbingEvent > events) |
| 一批事件 → Value 数组,顺序与传入一致。 | |
变量 | |
| constexpr std::uint8_t | eve::climbing::kClimbingEventKindCount = 11 |
ClimbingEventKind 的取值个数(0..kClimbingEventKindCount-1)。 | |
详细描述
攀爬事件 ↔ eve::Value 的**唯一**映射。
这份映射有三个消费者:脚本绑定(eve.ClimbingRuntime 的事件数组)、快照编解码 (pendingEvents)、以及脚本 sink(IClimbingEventSink 的脚本提供方)。它原先在 ClimbingBindings.cpp 与 ClimbingSnapshot.cpp 各写了一份(名称表甚至有两份, 一份返回 const char*、一份返回 std::string_view),新增一个 ClimbingEventKind 要改三处且没有任何东西会发现漏改。这里收敛成一张表 + 两个方向。
在文件 ClimbingEventValue.h 中定义.