| 471 | } |
| 472 | |
| 473 | Json 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 | |
| 486 | void SystemObject::setPosition(Vec2F const& position) { |
| 487 | m_xPosition.set(position[0]); |
nothing calls this directly
no test coverage detected