Merge branch 'MelonLoader' of https://github.com/ALittlePatate/DevourClient into MelonLoader

This commit is contained in:
2023-01-14 12:53:30 +01:00
3 changed files with 80 additions and 8 deletions

View File

@@ -28,5 +28,19 @@
{ {
return Helpers.Entities.Azazels[0].gameObject; return Helpers.Entities.Azazels[0].gameObject;
} }
public static void LoadMap(string mapName)
{
if (Il2CppPhoton.Bolt.BoltNetwork.IsServer)
{
Il2CppPhoton.Bolt.BoltNetwork.LoadScene(mapName);
MelonLoader.MelonLogger.Warning("Please press the button only once, it may take some time for the map to load.");
}
else
{
MelonLoader.MelonLogger.Warning("You must be the host to use this command!");
}
}
} }
} }

View File

@@ -50,7 +50,6 @@ namespace DevourClient.Helpers
return; return;
} }
/*
Il2Cpp.SurvivalAzazelBehaviour sab = Il2Cpp.SurvivalAzazelBehaviour.FindObjectOfType<Il2Cpp.SurvivalAzazelBehaviour>(); Il2Cpp.SurvivalAzazelBehaviour sab = Il2Cpp.SurvivalAzazelBehaviour.FindObjectOfType<Il2Cpp.SurvivalAzazelBehaviour>();
if (sab == null) if (sab == null)
@@ -59,12 +58,13 @@ namespace DevourClient.Helpers
} }
sab.OnPickedUpPlayer(sab.gameObject, p_GameObject, false); sab.OnPickedUpPlayer(sab.gameObject, p_GameObject, false);
*/
/*
MelonLogger.Msg(Name); MelonLogger.Msg(Name);
Il2Cpp.JumpScare _jumpscare = UnityEngine.Object.FindObjectOfType<Il2Cpp.JumpScare>(); Il2Cpp.JumpScare _jumpscare = UnityEngine.Object.FindObjectOfType<Il2Cpp.JumpScare>();
_jumpscare.player = p_GameObject; _jumpscare.player = p_GameObject;
_jumpscare.Activate(p_GameObject.GetComponent<BoltEntity>()); _jumpscare.Activate(p_GameObject.GetComponent<BoltEntity>());
*/
} }
public void LockInCage() public void LockInCage()

View File

@@ -523,6 +523,7 @@ namespace DevourClient
i += 30; i += 30;
} }
} }
switch (Helpers.Map.GetActiveScene()) switch (Helpers.Map.GetActiveScene())
{ {
case "Menu": case "Menu":
@@ -531,7 +532,7 @@ namespace DevourClient
Il2CppHorror.Menu menu = UnityEngine.Object.FindObjectOfType<Il2CppHorror.Menu>(); Il2CppHorror.Menu menu = UnityEngine.Object.FindObjectOfType<Il2CppHorror.Menu>();
menu.OnLobbyStartButtonClick(); menu.OnLobbyStartButtonClick();
} }
return; break;
case "Devour": case "Devour":
if (GUI.Button(new Rect(Settings.Settings.x + 10, Settings.Settings.y + 430, 120, 20), "Burn One Goat")) if (GUI.Button(new Rect(Settings.Settings.x + 10, Settings.Settings.y + 430, 120, 20), "Burn One Goat"))
@@ -563,7 +564,7 @@ namespace DevourClient
Hacks.Misc.DespawnDemons(); Hacks.Misc.DespawnDemons();
} }
return; break;
case "Molly": case "Molly":
if (GUI.Button(new Rect(Settings.Settings.x + 10, Settings.Settings.y + 430, 120, 20), "Burn One Rat")) if (GUI.Button(new Rect(Settings.Settings.x + 10, Settings.Settings.y + 430, 120, 20), "Burn One Rat"))
@@ -595,7 +596,7 @@ namespace DevourClient
Hacks.Misc.DespawnDemons(); Hacks.Misc.DespawnDemons();
} }
return; break;
case "Inn": case "Inn":
if (GUI.Button(new Rect(Settings.Settings.x + 10, Settings.Settings.y + 430, 120, 20), "Burn One Egg")) if (GUI.Button(new Rect(Settings.Settings.x + 10, Settings.Settings.y + 430, 120, 20), "Burn One Egg"))
@@ -631,7 +632,7 @@ namespace DevourClient
{ {
Hacks.Misc.DespawnSpiders(); Hacks.Misc.DespawnSpiders();
} }
return; break;
case "Town": case "Town":
if (GUI.Button(new Rect(Settings.Settings.x + 10, Settings.Settings.y + 430, 120, 20), "Burn One Book")) if (GUI.Button(new Rect(Settings.Settings.x + 10, Settings.Settings.y + 430, 120, 20), "Burn One Book"))
@@ -662,10 +663,67 @@ namespace DevourClient
{ {
Hacks.Misc.DespawnGhosts(); Hacks.Misc.DespawnGhosts();
} }
return; break;
default: default:
return; break;
}
// load map
switch (Helpers.Map.GetActiveScene())
{
case "Menu":
GUI.Label(new Rect(Settings.Settings.x + 10, Settings.Settings.y + 470, 100, 30), $"Load Map");
if (GUI.Button(new Rect(Settings.Settings.x + 10, Settings.Settings.y + 500, 100, 20), "Farmhouse"))
{
Helpers.Map.LoadMap("Devour");
}
if (GUI.Button(new Rect(Settings.Settings.x + 120, Settings.Settings.y + 500, 100, 20), "Asylum"))
{
Helpers.Map.LoadMap("Molly");
}
if (GUI.Button(new Rect(Settings.Settings.x + 230, Settings.Settings.y + 500, 100, 20), "Inn"))
{
Helpers.Map.LoadMap("Inn");
}
if (GUI.Button(new Rect(Settings.Settings.x + 340, Settings.Settings.y + 500, 100, 20), "Town"))
{
Helpers.Map.LoadMap("Town");
}
break;
case "Devour":
case "Molly":
case "Inn":
case "Town":
GUI.Label(new Rect(Settings.Settings.x + 10, Settings.Settings.y + 490, 100, 30), "Load Map");
if (GUI.Button(new Rect(Settings.Settings.x + 10, Settings.Settings.y + 520, 100, 20), "Farmhouse"))
{
Helpers.Map.LoadMap("Devour");
}
if (GUI.Button(new Rect(Settings.Settings.x + 120, Settings.Settings.y + 520, 100, 20), "Asylum"))
{
Helpers.Map.LoadMap("Molly");
}
if (GUI.Button(new Rect(Settings.Settings.x + 230, Settings.Settings.y + 520, 100, 20), "Inn"))
{
Helpers.Map.LoadMap("Inn");
}
if (GUI.Button(new Rect(Settings.Settings.x + 340, Settings.Settings.y + 520, 100, 20), "Town"))
{
Helpers.Map.LoadMap("Town");
}
break;
default:
break;
} }
} }
} }