Revert "Admin logs (#5419)"

This reverts commit 319aec109d.
This commit is contained in:
DrSmugleaf
2021-11-22 18:55:17 +01:00
parent edeccabb36
commit c18d07538a
65 changed files with 236 additions and 7021 deletions

View File

@@ -1,10 +0,0 @@
using Robust.Shared.GameObjects;
namespace Content.Server.GameTicking.Events;
/// <summary>
/// Raised at the start of <see cref="GameTicker.StartRound"/>
/// </summary>
public class RoundStartingEvent : EntityEventArgs
{
}

View File

@@ -1,4 +1,3 @@
using System;
using Content.Server.Players;
using Content.Shared.GameTicking;
using Content.Shared.GameWindow;
@@ -36,8 +35,6 @@ namespace Content.Server.GameTicking
case SessionStatus.Connected:
{
AddPlayerToDb(args.Session.UserId.UserId);
// Always make sure the client has player data. Mind gets assigned on spawn.
if (session.Data.ContentDataUncast == null)
session.Data.ContentDataUncast = new PlayerData(session.UserId, args.Session.Name);
@@ -109,14 +106,6 @@ namespace Content.Server.GameTicking
await _prefsManager.WaitPreferencesLoaded(session);
SpawnPlayer(session);
}
async void AddPlayerToDb(Guid id)
{
if (RoundId != 0 && _runLevel != GameRunLevel.PreRoundLobby)
{
await _db.AddRoundPlayers(RoundId, id);
}
}
}
private HumanoidCharacterProfile GetPlayerProfile(IPlayerSession p)

View File

@@ -1,9 +1,6 @@
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Linq;
using Content.Server.Database;
using Content.Server.GameTicking.Events;
using Content.Server.Players;
using Content.Server.Mind;
using Content.Server.Ghost;
@@ -36,8 +33,6 @@ namespace Content.Server.GameTicking
"ss14_round_length",
"Round length in seconds.");
[Dependency] private readonly IServerDbManager _db = default!;
[ViewVariables]
private TimeSpan _roundStartTimeSpan;
@@ -59,9 +54,6 @@ namespace Content.Server.GameTicking
}
}
[ViewVariables]
public int RoundId { get; private set; }
private void PreRoundSetup()
{
DefaultMap = _mapManager.CreateMap();
@@ -96,7 +88,7 @@ namespace Content.Server.GameTicking
Logger.InfoS("ticker", $"Loaded map in {timeSpan.TotalMilliseconds:N2}ms.");
}
public async void StartRound(bool force = false)
public void StartRound(bool force = false)
{
// If this game ticker is a dummy, do nothing!
if (DummyTicker)
@@ -105,12 +97,6 @@ namespace Content.Server.GameTicking
DebugTools.Assert(RunLevel == GameRunLevel.PreRoundLobby);
Logger.InfoS("ticker", "Starting round!");
var playerIds = _playersInLobby.Keys.Select(player => player.UserId.UserId).ToArray();
RoundId = await _db.AddNewRound(playerIds);
var startingEvent = new RoundStartingEvent();
RaiseLocalEvent(startingEvent);
SendServerMessage(Loc.GetString("game-ticker-start-round"));
List<IPlayerSession> readyPlayers;