Skip to content

Commit a390bd1

Browse files
Merge pull request #3 from kodenamekrak/main
Update for 1.26.2
2 parents f829933 + 3f47df8 commit a390bd1

File tree

6 files changed

+59
-78
lines changed

6 files changed

+59
-78
lines changed

include/ModConfig.hpp

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -30,34 +30,4 @@ DECLARE_CONFIG(ModConfig,
3030

3131
CONFIG_VALUE(AudioFix, bool, "Enable BT Audio Fix", true);
3232
CONFIG_VALUE(AudioBuffer, int, "Audio Buffer", 128);
33-
34-
CONFIG_INIT_FUNCTION(
35-
CONFIG_INIT_VALUE(Active);
36-
CONFIG_INIT_VALUE(Percentage);
37-
CONFIG_INIT_VALUE(PercentageActive);
38-
CONFIG_INIT_VALUE(MissCrash);
39-
CONFIG_INIT_VALUE(CrashOnPlay);
40-
CONFIG_INIT_VALUE(CrashOnTurn);
41-
CONFIG_INIT_VALUE(CrashOnPause);
42-
CONFIG_INIT_VALUE(CrashOnUnpause);
43-
CONFIG_INIT_VALUE(CrashOnNotFullCombo);
44-
CONFIG_INIT_VALUE(CrashOnNewHighscore);
45-
CONFIG_INIT_VALUE(CrashCounter);
46-
CONFIG_INIT_VALUE(OnCrashAction);
47-
CONFIG_INIT_VALUE(CrashOnNoFailOn);
48-
CONFIG_INIT_VALUE(CrashOnOver5PerBattery);
49-
CONFIG_INIT_VALUE(CrashOnGoodCut);
50-
CONFIG_INIT_VALUE(BatteryThreshold);
51-
CONFIG_INIT_VALUE(CrashOnFirstBlockMiss);
52-
CONFIG_INIT_VALUE(CrashOnLowBPM);
53-
CONFIG_INIT_VALUE(CrashOnHighBPM);
54-
CONFIG_INIT_VALUE(LowBPMValue);
55-
CONFIG_INIT_VALUE(HighBPMValue);
56-
CONFIG_INIT_VALUE(CrashOn115);
57-
CONFIG_INIT_VALUE(CrashOnNE);
58-
CONFIG_INIT_VALUE(CrashOnBomb);
59-
60-
CONFIG_INIT_VALUE(AudioFix);
61-
CONFIG_INIT_VALUE(AudioBuffer);
62-
)
63-
);
33+
)

mod.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,25 @@
33
"name": "CrashMod",
44
"id": "CrashMod",
55
"author": "ComputerElite",
6-
"version": "0.9.0",
6+
"version": "0.10.0",
77
"packageId": "com.beatgames.beatsaber",
8-
"packageVersion": "1.25.1",
8+
"packageVersion": "1.26.2",
99
"coverImage": "cover.png",
1010
"dependencies": [
1111
{
12-
"version": "^0.15.21",
12+
"version": "^0.15.22",
1313
"id": "custom-types",
14-
"downloadIfMissing": "https://github.com/sc2ad/Il2CppQuestTypePatching/releases/download/v0.15.21/CustomTypes.qmod"
14+
"downloadIfMissing": "https://github.com/sc2ad/Il2CppQuestTypePatching/releases/download/v0.15.22/CustomTypes.qmod"
1515
},
1616
{
17-
"version": "^0.28.0",
17+
"version": "^0.31.0",
1818
"id": "codegen",
19-
"downloadIfMissing": "https://github.com/sc2ad/BeatSaber-Quest-Codegen/releases/download/v0.28.0/Codegen.qmod"
19+
"downloadIfMissing": "https://github.com/sc2ad/BeatSaber-Quest-Codegen/releases/download/v0.31.0/Codegen.qmod"
2020
},
2121
{
22-
"version": "^0.17.4",
22+
"version": "^0.17.9",
2323
"id": "questui",
24-
"downloadIfMissing": "https://github.com/darknight1050/QuestUI/releases/download/v0.17.4/QuestUI.qmod"
24+
"downloadIfMissing": "https://github.com/darknight1050/QuestUI/releases/download/v0.17.9/QuestUI.qmod"
2525
}
2626
],
2727
"modFiles": [

mod.template.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
"_QPVersion": "0.1.1",
33
"id": "CrashMod",
44
"name": "CrashMod",
5-
"version": "0.9.0",
5+
"version": "0.10.0",
66
"author": "ComputerElite",
77
"packageId": "com.beatgames.beatsaber",
88
"coverImage": "cover.png",
9-
"packageVersion": "1.25.1",
9+
"packageVersion": "1.26.2",
1010
"modFiles": [
1111
],
1212
"libraryFiles": [

qpm.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,22 @@
2323
},
2424
{
2525
"id": "codegen",
26-
"versionRange": "^0.28.0",
26+
"versionRange": "^0.31.0",
2727
"additionalData": {}
2828
},
2929
{
3030
"id": "questui",
31-
"versionRange": "^0.17.4",
31+
"versionRange": "^0.17.9",
3232
"additionalData": {}
3333
},
3434
{
3535
"id": "custom-types",
36-
"versionRange": "^0.15.21",
36+
"versionRange": "^0.15.22",
3737
"additionalData": {}
3838
},
3939
{
4040
"id": "config-utils",
41-
"versionRange": "^0.8.0",
41+
"versionRange": "^1.0.1",
4242
"additionalData": {}
4343
}
4444
],

qpm.shared.json

Lines changed: 41 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,22 @@
2424
},
2525
{
2626
"id": "codegen",
27-
"versionRange": "^0.28.0",
27+
"versionRange": "^0.31.0",
2828
"additionalData": {}
2929
},
3030
{
3131
"id": "questui",
32-
"versionRange": "^0.17.4",
32+
"versionRange": "^0.17.9",
3333
"additionalData": {}
3434
},
3535
{
3636
"id": "custom-types",
37-
"versionRange": "^0.15.21",
37+
"versionRange": "^0.15.22",
3838
"additionalData": {}
3939
},
4040
{
4141
"id": "config-utils",
42-
"versionRange": "^0.8.0",
42+
"versionRange": "^1.0.1",
4343
"additionalData": {}
4444
}
4545
],
@@ -60,41 +60,52 @@
6060
},
6161
{
6262
"dependency": {
63-
"id": "libil2cpp",
64-
"versionRange": "^0.2.3",
63+
"id": "rapidjson-macros",
64+
"versionRange": "^0.4.2",
6565
"additionalData": {
66-
"headersOnly": true
66+
"headersOnly": true,
67+
"branchName": "version-v0.4.2"
6768
}
6869
},
69-
"version": "0.2.3"
70+
"version": "0.4.2"
7071
},
7172
{
7273
"dependency": {
7374
"id": "config-utils",
74-
"versionRange": "^0.8.0",
75+
"versionRange": "^1.0.1",
7576
"additionalData": {
7677
"headersOnly": true,
77-
"soLink": "https://github.com/darknight1050/config-utils/releases/download/v0.8.0/libconfig-utils_test.so",
78-
"debugSoLink": "https://github.com/darknight1050/config-utils/releases/download/v0.8.0/debug_libconfig-utils_test.so",
78+
"soLink": "https://github.com/darknight1050/config-utils/releases/download/v1.0.1/libconfig-utils_test.so",
79+
"debugSoLink": "https://github.com/darknight1050/config-utils/releases/download/v1.0.1/debug_libconfig-utils_test.so",
7980
"overrideSoName": "libconfig-utils_test.so",
80-
"branchName": "version-v0.8.0"
81+
"branchName": "version-v1.0.1"
8182
}
8283
},
83-
"version": "0.8.0"
84+
"version": "1.0.1"
8485
},
8586
{
8687
"dependency": {
8788
"id": "custom-types",
88-
"versionRange": "^0.15.21",
89+
"versionRange": "^0.15.22",
8990
"additionalData": {
90-
"soLink": "https://github.com/sc2ad/Il2CppQuestTypePatching/releases/download/v0.15.21/libcustom-types.so",
91-
"debugSoLink": "https://github.com/sc2ad/Il2CppQuestTypePatching/releases/download/v0.15.21/debug_libcustom-types.so",
91+
"soLink": "https://github.com/sc2ad/Il2CppQuestTypePatching/releases/download/v0.15.22/libcustom-types.so",
92+
"debugSoLink": "https://github.com/sc2ad/Il2CppQuestTypePatching/releases/download/v0.15.22/debug_libcustom-types.so",
9293
"overrideSoName": "libcustom-types.so",
93-
"modLink": "https://github.com/sc2ad/Il2CppQuestTypePatching/releases/download/v0.15.21/CustomTypes.qmod",
94-
"branchName": "version-v0.15.21"
94+
"modLink": "https://github.com/sc2ad/Il2CppQuestTypePatching/releases/download/v0.15.22/CustomTypes.qmod",
95+
"branchName": "version-v0.15.22"
9596
}
9697
},
97-
"version": "0.15.21"
98+
"version": "0.15.22"
99+
},
100+
{
101+
"dependency": {
102+
"id": "libil2cpp",
103+
"versionRange": "^0.2.3",
104+
"additionalData": {
105+
"headersOnly": true
106+
}
107+
},
108+
"version": "0.2.3"
98109
},
99110
{
100111
"dependency": {
@@ -111,34 +122,34 @@
111122
{
112123
"dependency": {
113124
"id": "codegen",
114-
"versionRange": "^0.28.0",
125+
"versionRange": "^0.31.0",
115126
"additionalData": {
116-
"soLink": "https://github.com/sc2ad/BeatSaber-Quest-Codegen/releases/download/v0.28.0/libcodegen.so",
127+
"soLink": "https://github.com/sc2ad/BeatSaber-Quest-Codegen/releases/download/v0.31.0/libcodegen.so",
117128
"overrideSoName": "libcodegen.so",
118-
"modLink": "https://github.com/sc2ad/BeatSaber-Quest-Codegen/releases/download/v0.28.0/Codegen.qmod",
119-
"branchName": "version-v0.28.0"
129+
"modLink": "https://github.com/sc2ad/BeatSaber-Quest-Codegen/releases/download/v0.31.0/Codegen.qmod",
130+
"branchName": "version-v0.31.0"
120131
}
121132
},
122-
"version": "0.28.0"
133+
"version": "0.31.0"
123134
},
124135
{
125136
"dependency": {
126137
"id": "questui",
127-
"versionRange": "^0.17.4",
138+
"versionRange": "^0.17.9",
128139
"additionalData": {
129-
"soLink": "https://github.com/darknight1050/QuestUI/releases/download/v0.17.5/libquestui.so",
130-
"debugSoLink": "https://github.com/darknight1050/QuestUI/releases/download/v0.17.5/debug_libquestui.so",
140+
"soLink": "https://github.com/darknight1050/QuestUI/releases/download/v0.17.9/libquestui.so",
141+
"debugSoLink": "https://github.com/darknight1050/QuestUI/releases/download/v0.17.9/debug_libquestui.so",
131142
"overrideSoName": "libquestui.so",
132-
"modLink": "https://github.com/darknight1050/QuestUI/releases/download/v0.17.5/QuestUI.qmod",
133-
"branchName": "version-v0.17.5",
143+
"modLink": "https://github.com/darknight1050/QuestUI/releases/download/v0.17.9/QuestUI.qmod",
144+
"branchName": "version-v0.17.9",
134145
"compileOptions": {
135146
"systemIncludes": [
136147
"shared/cppcodec"
137148
]
138149
}
139150
}
140151
},
141-
"version": "0.17.5"
152+
"version": "0.17.9"
142153
}
143154
]
144155
}

src/main.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#include "GlobalNamespace/BombNoteController.hpp"
3131
#include "GlobalNamespace/Saber.hpp"
3232
#include "GlobalNamespace/IReadonlyCutScoreBuffer.hpp"
33+
#include "GlobalNamespace/BeatmapDataCache.hpp"
3334
#include "UnityEngine/AudioConfiguration.hpp"
3435
#include "UnityEngine/AudioSettings.hpp"
3536

@@ -57,7 +58,6 @@ using namespace UnityEngine;
5758
using namespace QuestUI;
5859

5960
static ModInfo modInfo;
60-
DEFINE_CONFIG(ModConfig);
6161

6262
Logger& getLogger() {
6363
static Logger* logger = new Logger(modInfo, LoggerOptions(false, true));
@@ -116,8 +116,8 @@ MAKE_HOOK_MATCH(PauseController_HandlePauseMenuManagerDidPressContinueButton, &P
116116
if(getModConfig().Active.GetValue() && getModConfig().CrashOnUnpause.GetValue()) Crash();
117117
}
118118

119-
MAKE_HOOK_MATCH(StandardLevelScenesTransitionSetupDataSO_Init, &StandardLevelScenesTransitionSetupDataSO::Init, void, StandardLevelScenesTransitionSetupDataSO* self, StringW gameMode, IDifficultyBeatmap* dbm, IPreviewBeatmapLevel* previewBeatmapLevel, OverrideEnvironmentSettings* overrideEnvironmentSettings, ColorScheme* overrideColorScheme, GameplayModifiers* gameplayModifiers, PlayerSpecificSettings* playerSpecificSettings, PracticeSettings* practiceSettings, StringW backButtonText, bool startPaused, bool useTestNoteCutSoundEffects) {
120-
StandardLevelScenesTransitionSetupDataSO_Init(self, gameMode, dbm, previewBeatmapLevel, overrideEnvironmentSettings, overrideColorScheme, gameplayModifiers, playerSpecificSettings, practiceSettings, backButtonText, startPaused, useTestNoteCutSoundEffects);
119+
MAKE_HOOK_MATCH(StandardLevelScenesTransitionSetupDataSO_Init, &StandardLevelScenesTransitionSetupDataSO::Init, void, StandardLevelScenesTransitionSetupDataSO* self, StringW gameMode, IDifficultyBeatmap* dbm, IPreviewBeatmapLevel* previewBeatmapLevel, OverrideEnvironmentSettings* overrideEnvironmentSettings, ColorScheme* overrideColorScheme, GameplayModifiers* gameplayModifiers, PlayerSpecificSettings* playerSpecificSettings, PracticeSettings* practiceSettings, StringW backButtonText, bool startPaused, bool useTestNoteCutSoundEffects, BeatmapDataCache* beatmapDataCache) {
120+
StandardLevelScenesTransitionSetupDataSO_Init(self, gameMode, dbm, previewBeatmapLevel, overrideEnvironmentSettings, overrideColorScheme, gameplayModifiers, playerSpecificSettings, practiceSettings, backButtonText, startPaused, useTestNoteCutSoundEffects, beatmapDataCache);
121121
if(getModConfig().Active.GetValue()) {
122122
if(getModConfig().CrashOnPlay.GetValue() || getModConfig().CrashOnNoFailOn.GetValue() && gameplayModifiers->get_noFailOn0Energy()) Crash();
123123
if(getModConfig().CrashOnHighBPM.GetValue() && bpm > getModConfig().HighBPMValue.GetValue() || getModConfig().CrashOnLowBPM.GetValue() && bpm < getModConfig().LowBPMValue.GetValue()) Crash();

0 commit comments

Comments
 (0)