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

Method WorldServer

source/game/StarWorldServer.cpp:37–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35};
36
37WorldServer::WorldServer(WorldTemplatePtr const& worldTemplate, IODevicePtr storage) {
38 m_worldTemplate = worldTemplate;
39 m_worldStorage = make_shared<WorldStorage>(m_worldTemplate->size(), storage, make_shared<WorldGenerator>(this));
40 m_adjustPlayerStart = true;
41 m_respawnInWorld = false;
42 m_tileProtectionEnabled = true;
43 m_universeSettings = make_shared<UniverseSettings>();
44 m_worldId = worldTemplate->worldName();
45 m_expiryTimer = GameTimer(0.0f);
46
47 init(true);
48 writeMetadata();
49}
50
51WorldServer::WorldServer(Vec2U const& size, IODevicePtr storage)
52 : WorldServer(make_shared<WorldTemplate>(size), storage) {}

Callers

nothing calls this directly

Calls 4

GameTimerClass · 0.85
initFunction · 0.85
worldNameMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected