Skip to content

Commit

Permalink
Force load Tracks and CJD
Browse files Browse the repository at this point in the history
  • Loading branch information
Fernthedev committed Jul 10, 2024
1 parent e56059a commit 05f8903
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/NoodleExtensions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -15,6 +19,15 @@ bool NECaches::LeftHandedMode;
SafePtr<Zenject::DiContainer> 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);
Expand Down

0 comments on commit 05f8903

Please sign in to comment.