From 05f8903cb006a5edf6af7311df653375b79a744b Mon Sep 17 00:00:00 2001 From: FernTheDev <15272073+Fernthedev@users.noreply.github.com> Date: Tue, 9 Jul 2024 20:44:40 -0400 Subject: [PATCH] Force load Tracks and CJD --- src/NoodleExtensions.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/NoodleExtensions.cpp b/src/NoodleExtensions.cpp index 3b4de3f..553a4f4 100644 --- a/src/NoodleExtensions.cpp +++ b/src/NoodleExtensions.cpp @@ -3,8 +3,12 @@ #include "NECaches.h" #include "NELogger.h" #include "Zenject/DiContainer.hpp" +#include "custom-json-data/shared/CJDLogger.h" #include "songcore/shared/SongCore.hpp" +#include "scotland2/shared/loader.hpp" +#include "scotland2/shared/modloader.h" + float NECaches::noteJumpMovementSpeed; float NECaches::noteJumpStartBeatOffset; float NECaches::numberOfLines; @@ -15,6 +19,15 @@ bool NECaches::LeftHandedMode; SafePtr NECaches::GameplayCoreContainer; void InstallAndRegisterAll() { + // Force load to ensure order + auto cjdModInfo = CustomJSONData::modInfo.to_c(); + auto tracksModInfo = CModInfo{ .id = "Tracks" }; + auto chromaModInfo = CModInfo{ .id = "Chroma" }; + + modloader_require_mod(&cjdModInfo, CMatchType::MatchType_IdOnly); + modloader_require_mod(&tracksModInfo, CMatchType::MatchType_IdOnly); + modloader_require_mod(&chromaModInfo, CMatchType::MatchType_IdOnly); + Hooks::InstallHooks(); NEEvents::AddEventCallbacks(); SongCore::API::Capabilities::RegisterCapability(NoodleExtensions::U8_REQUIREMENTNAME);