Skip to content

Commit bc61868

Browse files
committed
added xlshredmenu check
1 parent d816072 commit bc61868

File tree

6 files changed

+26
-4
lines changed

6 files changed

+26
-4
lines changed

AreYouSure/Main.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,13 @@ static bool OnToggle(UnityModManager.ModEntry modEntry, bool value) {
3030
enabled = value;
3131

3232
if (enabled) {
33-
//harmonyInstance = HarmonyInstance.Create(modEntry.Info.Id);
33+
// disable if xlshredmenu is detected
34+
var mod = UnityModManager.FindMod("blendermf.XLShredMenu");
35+
if (mod != null) {
36+
modEntry.CustomRequirements = $"Mod {mod.Info.DisplayName} incompatible";
37+
enabled = false;
38+
return false;
39+
}
3440
harmony = new Harmony(modEntry.Info.Id);
3541
harmony.PatchAll(Assembly.GetExecutingAssembly());
3642
if (areYouSure == null) {

AreYouSure/Resources/Info.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"Id": "AreYouSure",
33
"DisplayName": "AreYouSure",
44
"Author": "Babbo Elu",
5-
"Version": "0.0.2",
5+
"Version": "0.0.3",
66
"ManagerVersion": "0.15.0",
77
"Requirements": [],
88
"AssemblyName": "AreYouSure.dll",

BabboSettings/Main.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,14 @@ static bool OnToggle(UnityModManager.ModEntry modEntry, bool value) {
4040
enabled = value;
4141

4242
if (enabled) {
43+
// disable if xlshredmenu is detected
44+
var mod = UnityModManager.FindMod("blendermf.XLShredMenu");
45+
if (mod != null) {
46+
modEntry.CustomRequirements = $"Mod {mod.Info.DisplayName} incompatible";
47+
enabled = false;
48+
return false;
49+
}
50+
4351
harmony = new Harmony(modEntry.Info.Id);
4452
harmony.PatchAll(Assembly.GetExecutingAssembly());
4553

BabboSettings/Resources/Info.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"Id": "BabboSettings",
33
"DisplayName": "BabboSettings",
44
"Author": "Babbo Elu",
5-
"Version": "0.6.8",
5+
"Version": "0.6.9",
66
"ManagerVersion": "0.15.0",
77
"Requirements": [],
88
"AssemblyName": "BabboSettings.dll",

SoundMod/Main.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,14 @@ static bool OnToggle(UnityModManager.ModEntry modEntry, bool value) {
3333
enabled = value;
3434

3535
if (enabled) {
36+
// disable if xlshredmenu is detected
37+
var mod = UnityModManager.FindMod("blendermf.XLShredMenu");
38+
if (mod != null) {
39+
modEntry.CustomRequirements = $"Mod {mod.Info.DisplayName} incompatible";
40+
enabled = false;
41+
return false;
42+
}
43+
3644
harmony = new Harmony(modEntry.Info.Id);
3745
harmony.PatchAll(Assembly.GetExecutingAssembly());
3846
soundMod = new GameObject().AddComponent<SoundMod>();

SoundMod/Resources/Info.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"Id": "SoundMod",
33
"DisplayName": "SoundMod",
44
"Author": "Babbo Elu",
5-
"Version": "0.0.3",
5+
"Version": "0.0.4",
66
"ManagerVersion": "0.15.0",
77
"Requirements": [],
88
"AssemblyName": "SoundMod.dll",

0 commit comments

Comments
 (0)