57 return std::unexpected(engine.error());
66 (void)_bindings.Bind([gameData](
GameDataSection sections, std::string_view name) {
67 return gameData->Lookup(sections, name);
71 _downloads = std::make_unique<WorkshopDownloads>(_bindings, *engine);
72 _registry = std::make_unique<PluginRegistry>(start, gameData, _downloads.get());
73 _commands = std::make_unique<PlayerCommands>(_bindings, *_registry);
74 _presses = std::make_unique<ButtonPresses>(_bindings, *engine, *_registry);
75 _schema = std::make_unique<SchemaCheck>(*_registry, engine->Schema);
76 _assets = std::make_unique<ServerAssets>(engine->Files);
77 _plugins = std::make_unique<PluginLoader>(*_registry, *_assets);
79 _hooks = std::make_unique<EngineHooks>(
82 _plugins->RunPending();
83 _downloads->OnFrame();
86 [
this] { _schema->OnServerStartup(); }, [
this](int64_t steamId) { _downloads->OnClientConnected(steamId); },
87 [
this](int64_t steamId) { _downloads->OnClientDisconnected(steamId); });
90 _command = std::make_unique<VoltCommand>(*_registry, *_plugins);
93 Log::Info(
"VoltMod host {} ({}) loaded.", VOLTMOD_VERSION, VOLTMOD_BUILD_STAMP);