feat: add the lightning orb script* (#2011)

* feat: add the lightning orb script*

Doesn't do anything because MPC don't work...

* Update LightningOrbServer.cpp
This commit is contained in:
David Markowitz
2026-06-20 22:30:44 -07:00
committed by GitHub
parent ccc029424c
commit 83707e2210
5 changed files with 37 additions and 1 deletions

View File

@@ -369,8 +369,21 @@ public:
template<typename AmfType = AMFArrayValue>
AmfType& PushDebug(const std::string_view name) {
size_t i = 0;
for (; i < m_Dense.size(); i++) {
const auto& cast = dynamic_cast<AMFArrayValue*>(m_Dense[i].get());
if (!cast) continue;
const auto& nameValue = cast->Get<std::string>("name");
if (!nameValue || nameValue->GetValue() != name) continue;
// found a duplicate, return this instead
auto valueCast = dynamic_cast<AmfType*>(cast->Get("value"));
if (valueCast) return *valueCast;
}
auto* value = PushArray();
value->Insert("name", name.data());
value->Insert<std::string>("name", name.data());
return value->Insert<AmfType>("value", std::make_unique<AmfType>());
}