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

Method uninit

source/game/scripting/StarLuaComponents.cpp:105–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

103}
104
105void LuaBaseComponent::uninit() {
106 if (m_context) {
107 if (m_context->containsPath("uninit")) {
108 try {
109 m_context->invokePath("uninit");
110 } catch (LuaException const& e) {
111 Logger::error("Exception while calling script uninit: {}", outputException(e, true));
112 m_error = String(printException(e, false));
113 }
114 }
115 contextShutdown();
116 m_context.reset();
117 }
118 for (auto p : m_threads) {
119 p.second->stop();
120 }
121
122 m_error.reset();
123}
124
125bool LuaBaseComponent::initialized() const {
126 return m_context.isValid();

Callers

nothing calls this directly

Calls 8

errorFunction · 0.85
StringClass · 0.85
containsPathMethod · 0.80
invokePathMethod · 0.80
outputExceptionFunction · 0.50
printExceptionFunction · 0.50
resetMethod · 0.45
stopMethod · 0.45

Tested by

no test coverage detected