Skip to content

Commit

Permalink
Fix warden-detection
Browse files Browse the repository at this point in the history
  • Loading branch information
MSWS committed Aug 24, 2024
1 parent e60db40 commit 3803e8f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mod/Jailbreak.Warden/Commands/WardenOpenCommandsBehavior.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@

namespace Jailbreak.Warden.Commands;

public class WardenOpenCommandsBehavior(IWardenService warden, IWardenLocale msg,
IWardenCmdOpenLocale wardenCmdOpenMsg, IZoneManager zoneManager)
: IPluginBehavior, IWardenOpenCommand {
public class WardenOpenCommandsBehavior(IWardenService warden,
IWardenLocale msg, IWardenCmdOpenLocale wardenCmdOpenMsg,
IZoneManager zoneManager) : IPluginBehavior, IWardenOpenCommand {
public static readonly FakeConVar<int> CvOpenCommandCooldown = new(
"css_jb_warden_open_cooldown",
"Minimum seconds warden must wait before being able to open the cells.", 30,
Expand Down Expand Up @@ -56,7 +56,7 @@ public void Command_Open(CCSPlayerController? executor, CommandInfo info) {
var result = MapUtil.OpenCells(zoneManager);
IView message;
if (result) {
if (executor != null || !warden.IsWarden(executor)) {
if (executor != null && !warden.IsWarden(executor)) {
message = wardenCmdOpenMsg.CellsOpenedBy(executor);
} else { message = wardenCmdOpenMsg.CellsOpenedBy(null); }
} else { message = wardenCmdOpenMsg.OpeningFailed; }
Expand Down

0 comments on commit 3803e8f

Please sign in to comment.