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

Method diskStore

source/game/StarSystemWorld.cpp:473–484  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

471}
472
473Json SystemObject::diskStore() const {
474 JsonObject store;
475 store.set("uuid", m_uuid.hex());
476 store.set("name", m_config.name);
477 store.set("orbit", jsonFromMaybe<CelestialOrbit>(m_orbit.get(), [](CelestialOrbit const& o) {
478 return o.toJson();
479 }));
480 store.set("spawnTime", m_spawnTime);
481 store.set("position", jsonFromVec2F(position()));
482 store.set("parameters", m_parameters);
483 return store;
484}
485
486void SystemObject::setPosition(Vec2F const& position) {
487 m_xPosition.set(position[0]);

Callers

nothing calls this directly

Calls 5

jsonFromVec2FFunction · 0.85
hexMethod · 0.80
setMethod · 0.45
getMethod · 0.45
toJsonMethod · 0.45

Tested by

no test coverage detected