@@ -6,6 +6,7 @@ using Content.Server.Voting.Managers;
|
||||
using Content.Shared.Administration;
|
||||
using Content.Shared.Database;
|
||||
using Content.Shared.Voting;
|
||||
using Robust.Server.Player;
|
||||
using Robust.Shared.Console;
|
||||
|
||||
namespace Content.Server.Voting
|
||||
@@ -35,14 +36,14 @@ namespace Content.Server.Voting
|
||||
|
||||
var mgr = IoCManager.Resolve<IVoteManager>();
|
||||
|
||||
if (shell.Player != null && !mgr.CanCallVote(shell.Player, type))
|
||||
if (shell.Player != null && !mgr.CanCallVote((IPlayerSession) shell.Player, type))
|
||||
{
|
||||
_adminLogger.Add(LogType.Vote, LogImpact.Medium, $"{shell.Player} failed to start {type.ToString()} vote");
|
||||
shell.WriteError(Loc.GetString("cmd-createvote-cannot-call-vote-now"));
|
||||
return;
|
||||
}
|
||||
|
||||
mgr.CreateStandardVote(shell.Player, type);
|
||||
mgr.CreateStandardVote((IPlayerSession?) shell.Player, type);
|
||||
}
|
||||
|
||||
public CompletionResult GetCompletion(IConsoleShell shell, string[] args)
|
||||
@@ -91,7 +92,7 @@ namespace Content.Server.Voting
|
||||
options.Options.Add((args[i], i));
|
||||
}
|
||||
|
||||
options.SetInitiatorOrServer(shell.Player);
|
||||
options.SetInitiatorOrServer((IPlayerSession?) shell.Player);
|
||||
|
||||
if (shell.Player != null)
|
||||
_adminLogger.Add(LogType.Vote, LogImpact.Medium, $"{shell.Player} initiated a custom vote: {options.Title} - {string.Join("; ", options.Options.Select(x => x.text))}");
|
||||
@@ -186,7 +187,7 @@ namespace Content.Server.Voting
|
||||
return;
|
||||
}
|
||||
|
||||
vote.CastVote(shell.Player!, optionN);
|
||||
vote.CastVote((IPlayerSession) shell.Player!, optionN);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user