| 35 | }; |
| 36 | |
| 37 | WorldServer::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 | |
| 51 | WorldServer::WorldServer(Vec2U const& size, IODevicePtr storage) |
| 52 | : WorldServer(make_shared<WorldTemplate>(size), storage) {} |