Fix gamerule display issues (#28178)
* A comprehensive rule list for joining admins and mid round command to get rule list added * Fix up for when a rule is added vs started and some logging * fix command help localization, fix admin flags and spam anouncement. * Send admin message only to the joining player not all admins. * Bit better formatting in chat box
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
using System.Linq;
|
||||
using Content.Server.Database;
|
||||
using Content.Shared.Administration;
|
||||
using Content.Shared.CCVar;
|
||||
using Content.Shared.GameTicking;
|
||||
using Content.Shared.GameWindow;
|
||||
@@ -196,6 +198,15 @@ namespace Content.Server.GameTicking
|
||||
_playerGameStatuses[session.UserId] = PlayerGameStatus.JoinedGame;
|
||||
_db.AddRoundPlayers(RoundId, session.UserId);
|
||||
|
||||
if (_adminManager.HasAdminFlag(session, AdminFlags.Admin))
|
||||
{
|
||||
if (_allPreviousGameRules.Count > 0)
|
||||
{
|
||||
var rulesMessage = GetGameRulesListMessage(true);
|
||||
_chatManager.SendAdminAnnouncementMessage(session, Loc.GetString("starting-rule-selected-preset", ("preset", rulesMessage)));
|
||||
}
|
||||
}
|
||||
|
||||
RaiseNetworkEvent(new TickerJoinGameEvent(), session.Channel);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user