#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include World::World() { m_spAdminService = std::make_shared(*this, m_dispatcher); spdlog::default_logger()->sinks().push_back(std::static_pointer_cast(m_spAdminService)); ctx().emplace(*this, m_dispatcher); ctx().emplace(*this, m_dispatcher); ctx().emplace(*this, m_dispatcher); ctx().emplace(*this, m_dispatcher); ctx().emplace(); ctx().emplace(*this, m_dispatcher); ctx().emplace(*this, m_dispatcher); ctx().emplace(*this, m_dispatcher); ctx().emplace(*this, m_dispatcher); ctx().emplace(*this, m_dispatcher); ctx().emplace(*this, m_dispatcher); ctx().emplace(*this, m_dispatcher); ctx().emplace(*this, m_dispatcher); ctx().emplace(*this, m_dispatcher); ctx().emplace(*this, m_dispatcher); ctx().emplace(*this, m_dispatcher); ctx().emplace(*this, m_dispatcher); ESLoader::ESLoader loader; // emplace loaded mods into modscomponent. m_recordCollection = loader.BuildRecordCollection(); for (const auto& it : loader.GetLoadOrder()) { ctx().emplace().AddServerMod(it); } // late initialize the ScriptService to ensure all components are valid m_pScriptService = TiltedPhoques::MakeUnique(*this, m_dispatcher); } World::~World() { m_pScriptService.reset(); }