| 19 | } |
| 20 | |
| 21 | Json 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 | |
| 33 | ByteArray Stagehand::netStore(NetCompatibilityRules) { |
| 34 | return DataStreamBuffer::serialize(m_config); |
nothing calls this directly
no test coverage detected