MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / eval

Method eval

source/game/scripting/StarLuaComponents.hpp:209–219  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

207
208template <typename Ret>
209Maybe<LuaValue> LuaBaseComponent::eval(String const& code) {
210 if (!checkInitialization())
211 return {};
212
213 try {
214 return m_context->eval<Ret>(code);
215 } catch (LuaException const& e) {
216 Logger::error("Exception while evaluating lua in context: {}", outputException(e, true));
217 return {};
218 }
219}
220
221template <typename Base>
222JsonObject LuaStorableComponent<Base>::getScriptStorage() const {

Callers 1

lineCollisionMethod · 0.45

Calls 2

errorFunction · 0.85
outputExceptionFunction · 0.50

Tested by

no test coverage detected