MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / dump

Method dump

src/Core/Script/GameObject.cpp:453–467  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

451 }
452
453 vili::node GameObject::dump() const
454 {
455 vili::node result;
456 result["type"] = this->getType();
457
458 if (auto dumpFunction = this->access()["Dump"]; dumpFunction.valid())
459 {
460 const sol::table saveTableRef = dumpFunction().get<sol::table>();
461 vili::node saveRequirements
462 = Script::ViliLuaBridge::luaTableToViliObject(saveTableRef);
463 result["Requires"] = saveRequirements;
464 }
465
466 return result;
467 }
468
469 void GameObject::load(vili::node& data)
470 {

Callers

nothing calls this directly

Calls 5

getTypeMethod · 0.95
accessMethod · 0.95
dumpFunctionFunction · 0.85
luaTableToViliObjectFunction · 0.85
validMethod · 0.45

Tested by

no test coverage detected