1
This commit is contained in:
parent
7b6262760b
commit
8a86e7fe58
@ -13,10 +13,13 @@ public:
|
||||
{
|
||||
RegisterCProc
|
||||
(
|
||||
"${skillNumber.speed}",
|
||||
"getSkillNumber",
|
||||
[this] (const a8::lisp::List& params) -> std::shared_ptr<a8::lisp::Value>
|
||||
{
|
||||
a8::lisp::Atom result;
|
||||
if (params->size() != 1) {
|
||||
abort();
|
||||
}
|
||||
result.val = context_.skill_meta->_number_meta->_float_speed;
|
||||
return std::make_shared<a8::lisp::Value>(result);
|
||||
});
|
||||
@ -42,9 +45,22 @@ public:
|
||||
if (!expr->IsType(a8::lisp::ValueType::kList)) {
|
||||
abort();
|
||||
}
|
||||
Transform(expr);
|
||||
return expr;
|
||||
}
|
||||
|
||||
void Transform(std::shared_ptr<a8::lisp::Value> node)
|
||||
{
|
||||
if (node->IsType(a8::lisp::ValueType::kSymbol)) {
|
||||
|
||||
} else if (node->IsType(a8::lisp::ValueType::kList)) {
|
||||
a8::lisp::List list = std::any_cast<a8::lisp::List>(node->value);
|
||||
for (auto child_node : *list) {
|
||||
Transform(child_node);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
struct {
|
||||
|
@ -105,4 +105,14 @@ namespace mt
|
||||
}
|
||||
}
|
||||
|
||||
float SkillNumber::GetAttrByIdx(int idx)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
int SkillNumber::GetAttrIdxByName(const std::string& name)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -42,6 +42,9 @@ namespace mt
|
||||
|
||||
void Init1();
|
||||
|
||||
float GetAttrByIdx(int idx);
|
||||
int GetAttrIdxByName(const std::string& name);
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
2
third_party/a8
vendored
2
third_party/a8
vendored
@ -1 +1 @@
|
||||
Subproject commit bb2f76674df56baa480924081cb3be5ca1737e1f
|
||||
Subproject commit b075c000c2c52a674bb7c27a398dc3a795b40d8f
|
Loading…
x
Reference in New Issue
Block a user