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

Method ScriptPane

source/frontend/StarScriptPane.cpp:24–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22namespace Star {
23
24ScriptPane::ScriptPane(UniverseClientPtr client, Json config, EntityId sourceEntityId) : BaseScriptPane(config) {
25 auto& root = Root::singleton();
26 auto assets = root.assets();
27
28 m_client = std::move(client);
29 m_sourceEntityId = sourceEntityId;
30
31 m_script.addCallbacks("player", LuaBindings::makePlayerCallbacks(m_client->mainPlayer().get()));
32 m_script.addCallbacks("status", LuaBindings::makeStatusControllerCallbacks(m_client->mainPlayer()->statusController()));
33 m_script.addCallbacks("celestial", LuaBindings::makeCelestialCallbacks(m_client.get()));
34}
35
36void ScriptPane::displayed() {
37 auto world = m_client->worldClient();

Callers

nothing calls this directly

Calls 6

singletonClass · 0.85
assetsMethod · 0.80
mainPlayerMethod · 0.80
addCallbacksMethod · 0.45
getMethod · 0.45
statusControllerMethod · 0.45

Tested by

no test coverage detected