fix crashed issue #85

Merged
mana-feng merged 17 commits from MelonLoader into MelonLoader 2025-10-13 19:28:44 +00:00
2 changed files with 577 additions and 578 deletions
Showing only changes of commit 360aa1061c - Show all commits

View File

@@ -91,11 +91,12 @@ namespace DevourClient.Hacks
if (burnAll) if (burnAll)
{ {
_slaughterhouseAltarController.BurnGoat(); _slaughterhouseAltarController.SkipToGoat(10);
} }
else else
{ {
_slaughterhouseAltarController.SkipToGoat(10); _slaughterhouseAltarController.BurnGoat();
} }
break; break;
@@ -162,11 +163,13 @@ namespace DevourClient.Hacks
else else
{ {
MelonLogger.Error("azazelBehaviour is null!"); MelonLogger.Error("azazelBehaviour is null!");
Hacks.Misc.ShowMessageBox("azazelBehaviour is null!");
} }
} }
else else
{ {
MelonLogger.Error("azazel is null!"); MelonLogger.Error("azazel is null!");
Hacks.Misc.ShowMessageBox("azazel is null!");
} }
} }
} }
@@ -473,11 +476,9 @@ namespace DevourClient.Hacks
public static int ShowMessageBox(string message) public static int ShowMessageBox(string message)
{ {
//not used, might be useful, some day Settings.Settings.errorMessage = message;
Il2CppHorror.Menu menu = UnityEngine.Object.FindObjectOfType<Il2CppHorror.Menu>(); Settings.Settings.errorMessageDisplayTime = 0f;
if (menu == null) Settings.Settings.showErrorMessage = true;
return 1;
menu.ShowMessageModal(message);
return 0; return 0;
} }

View File

@@ -22,9 +22,7 @@ namespace DevourClient.Hacks
} }
MelonLoader.MelonLogger.Warning("You need to restart your game for the achievements to be unlocked !!!"); MelonLoader.MelonLogger.Warning("You need to restart your game for the achievements to be unlocked !!!");
MelonLoader.MelonLogger.Warning("You need to restart your game for the achievements to be unlocked !!!"); Hacks.Misc.ShowMessageBox("You need to restart your game for the achievements to be unlocked !!!");
MelonLoader.MelonLogger.Warning("You need to restart your game for the achievements to be unlocked !!!");
MelonLoader.MelonLogger.Warning("You need to restart your game for the achievements to be unlocked !!!");
} }
public static void Doors() public static void Doors()