Skip to content

Commit

Permalink
Disable killing in lobby for being too buggy
Browse files Browse the repository at this point in the history
  • Loading branch information
scp222thj committed Jun 22, 2024
1 parent d15d030 commit 790c1a1
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
16 changes: 12 additions & 4 deletions src/Cheats/MalumCheats.cs
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,18 @@ public static void murderAllCheat()
{
if (CheatToggles.murderAll){

// Kill all players by sending a successful MurderPlayer RPC call
foreach (var player in PlayerControl.AllPlayerControls)
{
Utils.murderPlayer(player, MurderResultFlags.Succeeded);
if (Utils.isLobby){

HudManager.Instance.Notifier.AddDisconnectMessage("Killing in lobby disabled for being too buggy");

}else{

// Kill all players by sending a successful MurderPlayer RPC call
foreach (var player in PlayerControl.AllPlayerControls)
{
Utils.murderPlayer(player, MurderResultFlags.Succeeded);
}

}

CheatToggles.murderAll = false;
Expand Down
6 changes: 6 additions & 0 deletions src/Cheats/MalumPPMCheats.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ public static void murderPlayerPPM()
CheatToggles.DisablePPMCheats("murderPlayer");
}

if (Utils.isLobby){
HudManager.Instance.Notifier.AddDisconnectMessage("Killing in lobby disabled for being too buggy");
CheatToggles.murderPlayer = false;
return;
}

List<NetworkedPlayerInfo> playerDataList = new List<NetworkedPlayerInfo>();

// All players are saved to playerList
Expand Down
1 change: 0 additions & 1 deletion src/UI/MenuUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ private void Update(){
//Some cheats only work if the ship is present, so they are turned off if it is not
if(!Utils.isShip){
CheatToggles.unfixableLights = CheatToggles.completeMyTasks = CheatToggles.kickVents = CheatToggles.reportBody = CheatToggles.closeMeeting = CheatToggles.reactorSab = CheatToggles.oxygenSab = CheatToggles.commsSab = CheatToggles.elecSab = CheatToggles.mushSab = CheatToggles.doorsSab = false;
//Sabotages_ShipStatus_FixedUpdate_Postfix.reactorSab = Sabotages_ShipStatus_FixedUpdate_Postfix.commsSab = Sabotages_ShipStatus_FixedUpdate_Postfix.elecSab = Sabotages_ShipStatus_FixedUpdate_Postfix.oxygenSab = UnfixableLights_ShipStatus_FixedUpdate_Postfix.isActive = false;
}
}

Expand Down

0 comments on commit 790c1a1

Please sign in to comment.