Skip to content

Commit

Permalink
Setup Host-Only cheats
Browse files Browse the repository at this point in the history
  • Loading branch information
scp222thj committed Sep 7, 2024
1 parent a573cd5 commit 9dc1298
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/UI/MenuUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ private void Update(){
CheatToggles.changeRole = CheatToggles.killAll = CheatToggles.telekillPlayer = CheatToggles.killAllCrew = CheatToggles.killAllImps = CheatToggles.teleportCursor = CheatToggles.teleportPlayer = CheatToggles.spectate = CheatToggles.freecam = CheatToggles.killPlayer = false;
}

if(!Utils.isHost){
if(!Utils.isHost && !Utils.isFreePlay){
CheatToggles.killAll = CheatToggles.telekillPlayer = CheatToggles.killAllCrew = CheatToggles.killAllImps = CheatToggles.killPlayer = CheatToggles.zeroKillCd = CheatToggles.killAnyone = CheatToggles.killVanished = false;
}

Expand Down
18 changes: 9 additions & 9 deletions src/Utilities/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@ public static class Utils
{
//Useful for getting full lists of all the Among Us cosmetics IDs
public static ReferenceDataManager referenceDataManager = DestroyableSingleton<ReferenceDataManager>.Instance;
public static bool isShip => ShipStatus.Instance != null;
public static bool isLobby => AmongUsClient.Instance.GameState == InnerNetClient.GameStates.Joined && !isFreePlay;
public static bool isOnlineGame => AmongUsClient.Instance.NetworkMode == NetworkModes.OnlineGame;
public static bool isLocalGame => AmongUsClient.Instance.NetworkMode == NetworkModes.LocalGame;
public static bool isFreePlay => AmongUsClient.Instance.NetworkMode == NetworkModes.FreePlay;
public static bool isPlayer => PlayerControl.LocalPlayer != null;
public static bool isHost = AmongUsClient.Instance.AmHost;
public static bool isInGame => AmongUsClient.Instance.GameState == InnerNetClient.GameStates.Started && isPlayer;
public static bool isShip => ShipStatus.Instance;
public static bool isLobby => AmongUsClient.Instance && AmongUsClient.Instance.GameState == InnerNetClient.GameStates.Joined && !isFreePlay;
public static bool isOnlineGame => AmongUsClient.Instance && AmongUsClient.Instance.NetworkMode == NetworkModes.OnlineGame;
public static bool isLocalGame => AmongUsClient.Instance && AmongUsClient.Instance.NetworkMode == NetworkModes.LocalGame;
public static bool isFreePlay => AmongUsClient.Instance && AmongUsClient.Instance.NetworkMode == NetworkModes.FreePlay;
public static bool isPlayer => PlayerControl.LocalPlayer;
public static bool isHost = AmongUsClient.Instance && AmongUsClient.Instance.AmHost;
public static bool isInGame => AmongUsClient.Instance && AmongUsClient.Instance.GameState == InnerNetClient.GameStates.Started && isPlayer;
public static bool isMeeting => MeetingHud.Instance;
public static bool isMeetingVoting => isMeeting && MeetingHud.Instance.state is MeetingHud.VoteStates.Voted or MeetingHud.VoteStates.NotVoted;
public static bool isMeetingProceeding => isMeeting && MeetingHud.Instance.state is MeetingHud.VoteStates.Proceeding;
public static bool isExiling => ExileController.Instance != null && !(AirshipIsActive && SpawnInMinigame.Instance.isActiveAndEnabled);
public static bool isExiling => ExileController.Instance && !(AirshipIsActive && SpawnInMinigame.Instance.isActiveAndEnabled);
public static bool isNormalGame => GameOptionsManager.Instance.CurrentGameOptions.GameMode == GameModes.Normal;
public static bool isHideNSeek => GameOptionsManager.Instance.CurrentGameOptions.GameMode == GameModes.HideNSeek;
public static bool SkeldIsActive => (MapNames)GameOptionsManager.Instance.CurrentGameOptions.MapId == MapNames.Skeld;
Expand Down

0 comments on commit 9dc1298

Please sign in to comment.