add: spawn animals, enable their brains

This commit is contained in:
ALittlePatate
2022-09-10 16:11:30 +02:00
parent 1209383e43
commit e3cf689a8d
3 changed files with 35 additions and 8 deletions

View File

@@ -38,6 +38,10 @@
<Reference Include="Assembly-CSharp"> <Reference Include="Assembly-CSharp">
<HintPath>D:\Jeux\steamapps\common\Devour\MelonLoader\Managed\Assembly-CSharp.dll</HintPath> <HintPath>D:\Jeux\steamapps\common\Devour\MelonLoader\Managed\Assembly-CSharp.dll</HintPath>
</Reference> </Reference>
<Reference Include="BehaviorDesigner.Runtime, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>D:\Jeux\steamapps\common\Devour\MelonLoader\Managed\BehaviorDesigner.Runtime.dll</HintPath>
</Reference>
<Reference Include="bolt, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="bolt, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>D:\Jeux\steamapps\common\Devour\MelonLoader\Managed\bolt.dll</HintPath> <HintPath>D:\Jeux\steamapps\common\Devour\MelonLoader\Managed\bolt.dll</HintPath>

View File

@@ -97,7 +97,18 @@ namespace DevourClient.Hacks
_azazel.gameObject.GetComponent<SurvivalAzazelBehaviour>().Spawn(); _azazel.gameObject.GetComponent<SurvivalAzazelBehaviour>().Spawn();
} }
public static void AutoRespawn() public static void SpawnGoatOrRat(PrefabId _goatPrefabID)
{
GameObject _goat;
Vector3 pos = Player.GetPlayer().transform.position;
_goat = BoltNetwork.Instantiate(_goatPrefabID, new Vector3(pos.x, pos.y, pos.z + 1f), Quaternion.identity);
_goat.gameObject.GetComponent<GoatBehaviour>().Spawn();
BehaviorDesigner.Runtime.Behavior goat_behavior = _goat.gameObject.GetComponent<GoatBehaviour>().m_mainBehaviour;
goat_behavior.EnableBehavior();
}
public static void AutoRespawn()
{ {
NolanBehaviour nb = Player.GetPlayer(); NolanBehaviour nb = Player.GetPlayer();

View File

@@ -370,12 +370,7 @@ namespace DevourClient
BoltNetwork.Instantiate(BoltPrefabs.SurvivalInmate, Player.GetPlayer().transform.position, Quaternion.identity); BoltNetwork.Instantiate(BoltPrefabs.SurvivalInmate, Player.GetPlayer().transform.position, Quaternion.identity);
} }
if (GUI.Button(new Rect(Settings.Settings.x + 580, Settings.Settings.y + 250, 120, 20), "Spider") && Player.IsInGameOrLobby()) if (GUI.Button(new Rect(Settings.Settings.x + 580, Settings.Settings.y + 250, 120, 20), "Zara") && Player.IsInGameOrLobby())
{
BoltNetwork.Instantiate(BoltPrefabs.Spider, Player.GetPlayer().transform.position, Quaternion.identity);
}
if (GUI.Button(new Rect(Settings.Settings.x + 580, Settings.Settings.y + 280, 120, 20), "Zara") && Player.IsInGameOrLobby())
{ {
BoltNetwork.Instantiate(BoltPrefabs.AzazelZara, Player.GetPlayer().transform.position, Quaternion.identity); BoltNetwork.Instantiate(BoltPrefabs.AzazelZara, Player.GetPlayer().transform.position, Quaternion.identity);
} }
@@ -431,6 +426,23 @@ namespace DevourClient
{ {
BoltNetwork.Instantiate(BoltPrefabs.SurvivalMatchbox, Player.GetPlayer().transform.position, Quaternion.identity); BoltNetwork.Instantiate(BoltPrefabs.SurvivalMatchbox, Player.GetPlayer().transform.position, Quaternion.identity);
} }
GUI.Label(new Rect(Settings.Settings.x + 880, Settings.Settings.y + 40, 120, 30), "Animals");
if (GUI.Button(new Rect(Settings.Settings.x + 880, Settings.Settings.y + 70, 110, 20), "Rat") && Player.IsInGameOrLobby())
{
Hacks.Misc.SpawnGoatOrRat((PrefabId)BoltPrefabs.SurvivalRat);
}
if (GUI.Button(new Rect(Settings.Settings.x + 880, Settings.Settings.y + 100, 110, 20), "Goat") && Player.IsInGameOrLobby())
{
Hacks.Misc.SpawnGoatOrRat((PrefabId)BoltPrefabs.SurvivalGoat);
}
if (GUI.Button(new Rect(Settings.Settings.x + 880, Settings.Settings.y + 130, 110, 20), "Spider") && Player.IsInGameOrLobby())
{
BoltNetwork.Instantiate(BoltPrefabs.Spider, Player.GetPlayer().transform.position, Quaternion.identity);
}
} }
} }
} }