From 439cadd7d5131115e62e742dae02233b94969a60 Mon Sep 17 00:00:00 2001 From: Zach Toogood Date: Mon, 15 Jun 2026 16:32:07 +0100 Subject: [PATCH] Core: Enforce the usage of ximeshes and navmeshes --- src/map/map_engine.cpp | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/src/map/map_engine.cpp b/src/map/map_engine.cpp index dc36265e0b1..f70d161c938 100644 --- a/src/map/map_engine.cpp +++ b/src/map/map_engine.cpp @@ -159,6 +159,23 @@ auto MapEngine::init() -> Task ShowInfo("do_init: starting ZMQ thread"); message::init(networking()); + // NOTE: We're phasing out server usage without ximeshes and navmeshes. For now for ease of use, + // we're still allowing it in CI, but regular usage will demand them. + if (!config_.inCI) + { + if (!std::filesystem::exists("./ximeshes/") || std::filesystem::is_empty("./ximeshes/")) + { + ShowCritical("./ximeshes/ directory isn't present or is empty! Check your setup."); + std::exit(-1); + } + + if (!std::filesystem::exists("./navmeshes/") || std::filesystem::is_empty("./navmeshes/")) + { + ShowCritical("./navmeshes/ directory isn't present or is empty! Check your setup."); + std::exit(-1); + } + } + ShowInfo("do_init: loading items"); itemutils::Initialize(); @@ -192,16 +209,6 @@ auto MapEngine::init() -> Task synergyutils::LoadSynergyRecipes(); CItemEquipment::LoadAugmentData(); // TODO: Move to itemutils - if (!std::filesystem::exists("./ximeshes/") || std::filesystem::is_empty("./ximeshes/")) - { - ShowError("./ximeshes/ directory isn't present or is empty"); - } - - if (!std::filesystem::exists("./navmeshes/") || std::filesystem::is_empty("./navmeshes/")) - { - ShowWarning("./navmeshes/ directory isn't present or is empty"); - } - co_await zoneutils::Initialize(scheduler_, config_); instanceutils::Initialize(config_);