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

Method WorldStorage

source/game/StarWorldStorage.cpp:52–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50}
51
52WorldStorage::WorldStorage(Vec2U const& worldSize, IODevicePtr const& device, WorldGeneratorFacadePtr const& generatorFacade)
53 : WorldStorage() {
54 m_tileArray = make_shared<ServerTileSectorArray>(worldSize);
55 m_entityMap = make_shared<EntityMap>(worldSize, MinServerEntityId, MaxServerEntityId);
56 m_generatorFacade = generatorFacade;
57 m_floatingDungeonWorld = false;
58
59 // Creating a new world, clear any existing data.
60 device->resize(0);
61
62 openDatabase(m_db, device);
63
64 m_db.insert(metadataKey(), writeWorldMetadata(WorldMetadataStore{worldSize, VersionedJson()}));
65 m_db.commit();
66}
67
68WorldStorage::WorldStorage(IODevicePtr const& device, WorldGeneratorFacadePtr const& generatorFacade) : WorldStorage() {
69 m_generatorFacade = generatorFacade;

Callers

nothing calls this directly

Calls 11

VersionedJsonClass · 0.85
singletonClass · 0.85
jsonToVec2FFunction · 0.85
commitMethod · 0.80
jsonMethod · 0.80
assetsMethod · 0.80
getFloatMethod · 0.80
resizeMethod · 0.45
insertMethod · 0.45
findMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected