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

Method diskStore

source/game/StarStagehand.cpp:21–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19}
20
21Json Stagehand::diskStore() const {
22 auto saveData = m_config.setAll({
23 {"position", jsonFromVec2F({m_xPosition.get(), m_yPosition.get()})},
24 {"uniqueId", jsonFromMaybe(uniqueId())}
25 });
26
27 if (!m_scripted)
28 return saveData;
29 else
30 return saveData.set("scriptStorage", m_scriptComponent.getScriptStorage());
31}
32
33ByteArray Stagehand::netStore(NetCompatibilityRules) {
34 return DataStreamBuffer::serialize(m_config);

Callers

nothing calls this directly

Calls 6

jsonFromVec2FFunction · 0.85
jsonFromMaybeFunction · 0.85
setAllMethod · 0.80
getScriptStorageMethod · 0.80
getMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected