Skip to content
This repository has been archived by the owner on Oct 14, 2024. It is now read-only.

Commit

Permalink
canary for the lastet version amongus
Browse files Browse the repository at this point in the history
  • Loading branch information
Night-GUA committed Oct 13, 2024
1 parent 5c9c63f commit c42d826
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion YuEzTools/Patches/PlayerControlPatches.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class FixedUpdatePatch
public static void Postfix(PlayerControl __instance)
{
if (__instance == null) return;

if (GetPlayer.isMeeting) return;
try
{
// var color ="#ffffff";
Expand Down
28 changes: 14 additions & 14 deletions YuEzTools/Patches/SetEverythingPatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public static void Prefix()
if (GetPlayer.numImpostors == 0 && AmongUsClient.Instance.AmHost)
{
var rando = IRandom.Instance;
int result = rando.Next(0,Main.AllPlayerControls.Count() - 1);
int result = rando.Next(0,Main.AllPlayerControls.Count());
// GetPlayer.GetPlayerById(result).RpcSetRoleV3(RoleTypes.Impostor,true);
GetPlayer.GetPlayerById(result).RpcSetRoleV3(RoleTypes.Impostor,true);
GetPlayer.numImpostors++;
Expand Down Expand Up @@ -295,16 +295,16 @@ public static void Postfix(EndGameManager __instance)
Info(s,"EndSummary");
}
}
[HarmonyPatch(typeof(PlayerControl),nameof(PlayerControl.RpcSetRole))]
[HarmonyPatch(typeof(PlayerControl),nameof(PlayerControl.CoSetRole))]
class RpcSetRolePatch
{
public static bool Prefix(PlayerControl __instance, [HarmonyArgument(0)] RoleTypes roleTypes,[HarmonyArgument(1)] bool canOver)
{
if (__instance == null || roleTypes == null || canOver == null) return true;
if (AmongUsClient.Instance.AmHost) return true;
if(!canOver) __instance.RpcSetRole(roleTypes,true);

return canOver;
}
}
// [HarmonyPatch(typeof(PlayerControl),nameof(PlayerControl.RpcSetRole))]
// [HarmonyPatch(typeof(PlayerControl),nameof(PlayerControl.CoSetRole))]
// class RpcSetRolePatch
// {
// public static bool Prefix(PlayerControl __instance, [HarmonyArgument(0)] RoleTypes roleTypes,[HarmonyArgument(1)] bool canOver)
// {
// if (__instance == null || roleTypes == null || canOver == null) return true;
// if (AmongUsClient.Instance.AmHost) return true;
// if(!canOver) __instance.RpcSetRole(roleTypes,true);
//
// return canOver;
// }
// }
2 changes: 1 addition & 1 deletion YuEzTools/Patches/ShipStatus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public static bool Prefix(ShipStatus __instance, [HarmonyArgument(0)] SystemType
{
if (!Toggles.EnableAntiCheat) return true;
var amount = MessageReader.Get(reader).ReadByte();
if (AntiCheatForAll.RpcUpdateSystemCheck(player, systemType, amount) || (GetPlayer.IsHideNSeek && AntiCheatForAll.RpcUpdateSystemCheckFHS(player, systemType, amount)) || GetPlayer.isMeeting)
if (AntiCheatForAll.RpcUpdateSystemCheck(player, systemType, amount) || (GetPlayer.IsHideNSeek && AntiCheatForAll.RpcUpdateSystemCheckFHS(player, systemType, amount)) /*|| GetPlayer.isMeeting*/)
{
__instance.RpcUpdateSystem(systemType, 16);
if(!Main.HackerList.Contains(player.GetClientId())) Main.HackerList.Add(player.GetClientId());
Expand Down
2 changes: 1 addition & 1 deletion YuEzTools/YuEzTools.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

<ItemGroup>
<!-- nuget.bepinex.dev -->
<PackageReference Include="AmongUs.GameLibs.Steam" Version="2024.8.13" PrivateAssets="all" />
<PackageReference Include="AmongUs.GameLibs.Steam" Version="2024.9.4" PrivateAssets="all" />
<PackageReference Include="BepInEx.IL2CPP.MSBuild" Version="2.1.0-rc.1" PrivatPeAssets="all" ExcludeAssets="runtime" />
<PackageReference Include="BepInEx.Unity.IL2CPP" Version="6.0.0-be.688" Private="false" ExcludeAssets="runtime;native" />
<!-- nuget.org -->
Expand Down

0 comments on commit c42d826

Please sign in to comment.