MCPcopy Create free account
hub / github.com/ElectroZybr/LatticeLab / requireStringField

Function requireStringField

Lattice/Scripting/ScriptAPI.cpp:54–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52}
53
54std::string requireStringField(const sol::table& table, const char* key, const char* context) {
55 const sol::object object = table[key];
56 if (!object.is<std::string>()) {
57 throw std::runtime_error(std::string(context) + " requires string field '" + key + "'");
58 }
59 return object.as<std::string>();
60}
61
62bool ScriptBatch::spawn(const std::string& speciesName, const sol::object& positionObject, const sol::object& optionsObject) {
63 const glm::vec3 position = readVec3Object(positionObject);

Callers 1

parseRegionMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected