diff --git a/Content.Server/_White/AspectsSystem/Aspects/SkeletonAspect.cs b/Content.Server/_White/AspectsSystem/Aspects/SkeletonAspect.cs index b358fa4de8..621c796110 100644 --- a/Content.Server/_White/AspectsSystem/Aspects/SkeletonAspect.cs +++ b/Content.Server/_White/AspectsSystem/Aspects/SkeletonAspect.cs @@ -1,29 +1,29 @@ using Content.Server.GameTicking; using Content.Server.GameTicking.Rules.Components; -using Content.Server.Humanoid; -using Content.Server.Polymorph.Systems; +// using Content.Server.Humanoid; +// using Content.Server.Polymorph.Systems; using Content.Server._White.AspectsSystem.Aspects.Components; using Content.Server._White.AspectsSystem.Base; using Content.Shared.Humanoid; -using Content.Shared.Polymorph; -using Robust.Shared.Prototypes; +// using Content.Shared.Polymorph; +// using Robust.Shared.Prototypes; namespace Content.Server._White.AspectsSystem.Aspects; public sealed class SkeletonAspect : AspectSystem { - [Dependency] private readonly IPrototypeManager _protoMan = default!; - [Dependency] private readonly PolymorphSystem _polymorph = default!; - [Dependency] private readonly HumanoidAppearanceSystem _humanoidAppearance = default!; - - private PolymorphPrototype _proto = default!; + // [Dependency] private readonly IPrototypeManager _protoMan = default!; + // [Dependency] private readonly PolymorphSystem _polymorph = default!; + // [Dependency] private readonly HumanoidAppearanceSystem _humanoidAppearance = default!; + // + // private PolymorphPrototype _proto = default!; public override void Initialize() { base.Initialize(); SubscribeLocalEvent(HandleLateJoin); - _proto = _protoMan.Index("AspectForcedSkeleton"); + // _proto = _protoMan.Index("AspectForcedSkeleton"); } protected override void Started(EntityUid uid, SkeletonAspectComponent component, GameRuleComponent gameRule, GameRuleStartedEvent args) diff --git a/Content.Server/_White/ERTRecruitment/ERTRecruitmentRule.cs b/Content.Server/_White/ERTRecruitment/ERTRecruitmentRule.cs index 238c93dbfa..150604dc2c 100644 --- a/Content.Server/_White/ERTRecruitment/ERTRecruitmentRule.cs +++ b/Content.Server/_White/ERTRecruitment/ERTRecruitmentRule.cs @@ -1,14 +1,10 @@ using System.Linq; -using System.Numerics; using Content.Server.Chat.Managers; using Content.Server.Chat.Systems; using Content.Server.GameTicking; using Content.Server.GameTicking.Rules.Components; -using Content.Server.Shuttles.Components; -using Content.Server.Shuttles.Systems; using Content.Server.StationEvents.Events; using Content.Server._White.GhostRecruitment; -using Content.Shared.CCVar; using Content.Shared._White; using Content.Shared._White.GhostRecruitment; using JetBrains.Annotations; @@ -20,13 +16,13 @@ using Robust.Shared.Map; namespace Content.Server._White.ERTRecruitment; [UsedImplicitly] +// ReSharper disable once InconsistentNaming public sealed class ERTRecruitmentRule : StationEventSystem { [Dependency] private readonly IChatManager _chat = default!; [Dependency] private readonly GhostRecruitmentSystem _recruitment = default!; [Dependency] private readonly IMapManager _mapManager = default!; [Dependency] private readonly MapLoaderSystem _map = default!; - [Dependency] private readonly ShuttleSystem _shuttle = default!; [Dependency] private readonly ChatSystem _chatSystem = default!; [Dependency] private readonly IConfigurationManager _cfgManager = default!; @@ -191,8 +187,8 @@ public sealed class ERTRecruitmentRule : StationEventSystem(outpost); - ERTMap.MapId = mapId; + var ertMap = EnsureComp(outpost); + ertMap.MapId = mapId; //ERTMap.Shuttle = shuttleId; return true; diff --git a/Content.Server/_White/Halt/HaltSystem.cs b/Content.Server/_White/Halt/HaltSystem.cs index cb6487833a..eb7d85f6b4 100644 --- a/Content.Server/_White/Halt/HaltSystem.cs +++ b/Content.Server/_White/Halt/HaltSystem.cs @@ -7,7 +7,6 @@ using Content.Shared.Humanoid; using Content.Shared.Inventory; using Content.Shared._White.Other; using Robust.Shared.Audio.Systems; -using Robust.Shared.Prototypes; using Robust.Shared.Random; namespace Content.Server._White.Halt @@ -17,7 +16,6 @@ namespace Content.Server._White.Halt [Dependency] private readonly ChatSystem _chat = default!; [Dependency] private readonly SharedAudioSystem _audio = default!; [Dependency] private readonly IRobustRandom _random = default!; - [Dependency] private readonly IPrototypeManager _prototypeManager = default!; public override void Initialize() { diff --git a/Content.Server/_White/MagGloves/MagneticGlovesSystem.cs b/Content.Server/_White/MagGloves/MagneticGlovesSystem.cs index 37f61b0522..921c023494 100644 --- a/Content.Server/_White/MagGloves/MagneticGlovesSystem.cs +++ b/Content.Server/_White/MagGloves/MagneticGlovesSystem.cs @@ -1,10 +1,8 @@ using Content.Server.Emp; -using Content.Server.Power.Components; using Content.Shared.Examine; using Content.Shared.Inventory.Events; using Content.Shared._White.MagGloves; using Content.Shared.Popups; -using Robust.Shared.Containers; using Robust.Shared.Timing; namespace Content.Server._White.MagGloves; @@ -14,10 +12,9 @@ namespace Content.Server._White.MagGloves; /// public sealed class MagneticGlovesSystem : EntitySystem { - - [Dependency] private readonly SharedContainerSystem _sharedContainer = default!; [Dependency] private readonly IGameTiming _gameTiming = default!; [Dependency] private readonly SharedPopupSystem _popup = default!; + /// public override void Initialize() { @@ -36,7 +33,6 @@ public sealed class MagneticGlovesSystem : EntitySystem { RaiseLocalEvent(uid, new ToggleMagneticGlovesEvent()); } - } } @@ -75,7 +71,7 @@ public sealed class MagneticGlovesSystem : EntitySystem if (!active) { RemComp(owner); - if (TryComp(uid, out var adv)) + if (TryComp(uid, out _)) { RemComp(owner); RemComp(owner); @@ -84,7 +80,7 @@ public sealed class MagneticGlovesSystem : EntitySystem else if (component.Enabled) { EnsureComp(owner); - if (TryComp(uid, out var adv)) + if (TryComp(uid, out _)) { EnsureComp(owner); EnsureComp(owner); @@ -94,11 +90,11 @@ public sealed class MagneticGlovesSystem : EntitySystem public void OnExamined(EntityUid uid, MagneticGlovesComponent component, ExaminedEvent args) { - if (!args.IsInDetailsRange) return; - var message = Loc.GetString("maggloves-ready-in") + " " + component.GlovesReadyAt.Subtract(_gameTiming.CurTime).TotalSeconds.ToString("0"); + var message = Loc.GetString("maggloves-ready-in") + " " + + component.GlovesReadyAt.Subtract(_gameTiming.CurTime).TotalSeconds.ToString("0"); if (component.GlovesReadyAt < _gameTiming.CurTime) { @@ -113,4 +109,4 @@ public sealed class MagneticGlovesSystem : EntitySystem args.PushMarkup(message); } -} +} \ No newline at end of file diff --git a/Content.Server/_White/PandaSocket/Main/PandaCommunication.cs b/Content.Server/_White/PandaSocket/Main/PandaCommunication.cs index b92c699249..31fb903899 100644 --- a/Content.Server/_White/PandaSocket/Main/PandaCommunication.cs +++ b/Content.Server/_White/PandaSocket/Main/PandaCommunication.cs @@ -2,22 +2,24 @@ namespace Content.Server._White.PandaSocket.Main; +[Virtual] public class PandaBaseMessage { [JsonPropertyName("command")] public virtual string? Command { get; set; } } +[Virtual] public class PandaBaseRequestEventMessage : PandaBaseMessage { [JsonPropertyName("token")] public string? Token { get; set; } } -public class UtkaOOCRequest : PandaBaseRequestEventMessage +public sealed class UtkaOOCRequest : PandaBaseRequestEventMessage { [JsonPropertyName("command")] - public override string? Command => "ooc"; + public override string Command => "ooc"; [JsonPropertyName("ckey")] public string? CKey { get; set; } @@ -26,10 +28,10 @@ public class UtkaOOCRequest : PandaBaseRequestEventMessage public string? Message { get; set; } } -public class UtkaAsayRequest : PandaBaseRequestEventMessage +public sealed class UtkaAsayRequest : PandaBaseRequestEventMessage { [JsonPropertyName("command")] - public override string? Command => "asay"; + public override string Command => "asay"; [JsonPropertyName("ackey")] public string? ACkey { get; set; } @@ -38,10 +40,10 @@ public class UtkaAsayRequest : PandaBaseRequestEventMessage public string? Message { get; set; } } -public class UtkaPmRequest : PandaBaseRequestEventMessage +public sealed class UtkaPmRequest : PandaBaseRequestEventMessage { [JsonPropertyName("command")] - public override string? Command => "discordpm"; + public override string Command => "discordpm"; [JsonPropertyName("sender")] public string? Sender { get; set; } @@ -53,55 +55,55 @@ public class UtkaPmRequest : PandaBaseRequestEventMessage public string? Message { get; set; } } -public class UtkaPmResponse : PandaBaseMessage +public sealed class UtkaPmResponse : PandaBaseMessage { [JsonPropertyName("command")] - public override string? Command => "discordpm"; + public override string Command => "discordpm"; [JsonPropertyName("message")] public bool? Message { get; set; } } -public class UtkaWhoRequest : PandaBaseRequestEventMessage +public sealed class UtkaWhoRequest : PandaBaseRequestEventMessage { [JsonPropertyName("command")] - public override string? Command => "who"; + public override string Command => "who"; } -public class UtkaWhoResponse : PandaBaseMessage +public sealed class UtkaWhoResponse : PandaBaseMessage { [JsonPropertyName("command")] - public override string? Command => "who"; + public override string Command => "who"; [JsonPropertyName("players")] public List? Players { get; set; } } -public class UtkaAdminWhoRequest : PandaBaseRequestEventMessage +public sealed class UtkaAdminWhoRequest : PandaBaseRequestEventMessage { [JsonPropertyName("command")] - public override string? Command => "adminwho"; + public override string Command => "adminwho"; } -public class UtkaAdminWhoResponse : PandaBaseMessage +public sealed class UtkaAdminWhoResponse : PandaBaseMessage { [JsonPropertyName("command")] - public override string? Command => "adminwho"; + public override string Command => "adminwho"; [JsonPropertyName("admins")] public List? Admins { get; set; } } -public class UtkaStatusRequest : PandaBaseRequestEventMessage +public sealed class UtkaStatusRequest : PandaBaseRequestEventMessage { [JsonPropertyName("command")] - public override string? Command => "status"; + public override string Command => "status"; } -public class UtkaStatusResponse : PandaBaseMessage +public sealed class UtkaStatusResponse : PandaBaseMessage { [JsonPropertyName("command")] - public override string? Command => "status"; + public override string Command => "status"; [JsonPropertyName("players")] public int? Players { get; set; } @@ -125,7 +127,7 @@ public class UtkaStatusResponse : PandaBaseMessage public sealed class UtkaBanRequest : PandaBaseRequestEventMessage { [JsonPropertyName("command")] - public override string? Command => "ban"; + public override string Command => "ban"; [JsonPropertyName("ckey")] public string? Ckey { get; set; } @@ -149,7 +151,7 @@ public sealed class UtkaBanRequest : PandaBaseRequestEventMessage public sealed class UtkaBanResponse : PandaBaseMessage { [JsonPropertyName("command")] - public override string? Command => "ban"; + public override string Command => "ban"; [JsonPropertyName("banned")] public bool? Banned { get; set; } @@ -157,7 +159,7 @@ public sealed class UtkaBanResponse : PandaBaseMessage public sealed class UtkaJobBanRequest : PandaBaseRequestEventMessage { - public override string? Command => "jobban"; + public override string Command => "jobban"; [JsonPropertyName("ckey")] public string? Ckey { get; set; } @@ -181,7 +183,7 @@ public sealed class UtkaJobBanRequest : PandaBaseRequestEventMessage public sealed class UtkaJobBanResponse : PandaBaseMessage { [JsonPropertyName("command")] - public override string? Command => "jobban"; + public override string Command => "jobban"; [JsonPropertyName("banned")] public bool? Banned { get; set; } @@ -190,13 +192,13 @@ public sealed class UtkaJobBanResponse : PandaBaseMessage public sealed class UtkaRestartRoundRequest : PandaBaseRequestEventMessage { [JsonPropertyName("command")] - public override string? Command => "restartround"; + public override string Command => "restartround"; } public sealed class UtkaRestartRoundResponse : PandaBaseMessage { [JsonPropertyName("command")] - public override string? Command => "restartround"; + public override string Command => "restartround"; [JsonPropertyName("restarted")] public bool? Restarted { get; set; } @@ -205,7 +207,7 @@ public sealed class UtkaRestartRoundResponse : PandaBaseMessage public sealed class UtkaUnbanRequest : PandaBaseRequestEventMessage { [JsonPropertyName("command")] - public override string? Command => "unban"; + public override string Command => "unban"; [JsonPropertyName("ackey")] public string? ACkey { get; set; } @@ -217,7 +219,7 @@ public sealed class UtkaUnbanRequest : PandaBaseRequestEventMessage public sealed class UtkaUnbanResponse : PandaBaseMessage { [JsonPropertyName("command")] - public override string? Command => "unban"; + public override string Command => "unban"; [JsonPropertyName("unbanned")] public bool? Unbanned { get; set; } @@ -226,7 +228,7 @@ public sealed class UtkaUnbanResponse : PandaBaseMessage public sealed class UtkaUnJobBanRequest : PandaBaseRequestEventMessage { [JsonPropertyName("command")] - public override string? Command => "unjobban"; + public override string Command => "unjobban"; [JsonPropertyName("ackey")] public string? ACkey { get; set; } @@ -238,7 +240,7 @@ public sealed class UtkaUnJobBanRequest : PandaBaseRequestEventMessage public sealed class UtkaUnJobBanResponse : PandaBaseMessage { [JsonPropertyName("command")] - public override string? Command => "unjobban"; + public override string Command => "unjobban"; [JsonPropertyName("unbanned")] public bool? Unbanned { get; set; } @@ -247,7 +249,7 @@ public sealed class UtkaUnJobBanResponse : PandaBaseMessage public sealed class UtkaBannedEvent : PandaBaseRequestEventMessage { [JsonPropertyName("command")] - public override string? Command => "banned"; + public override string Command => "banned"; [JsonPropertyName("ckey")] public string? Ckey { get; set; } @@ -286,7 +288,7 @@ public sealed class UtkaChatMessageEvent : PandaBaseRequestEventMessage public sealed class UtkaRoundStatusEvent : PandaBaseRequestEventMessage { [JsonPropertyName("command")] - public override string? Command => "roundstatus"; + public override string Command => "roundstatus"; [JsonPropertyName("message")] public string? Message { get; set; } @@ -295,7 +297,7 @@ public sealed class UtkaRoundStatusEvent : PandaBaseRequestEventMessage public sealed class UtkaChatMeEvent : PandaBaseRequestEventMessage { [JsonPropertyName("command")] - public override string? Command => "me"; + public override string Command => "me"; [JsonPropertyName("ckey")] public string? Ckey { get; set; } @@ -310,7 +312,7 @@ public sealed class UtkaChatMeEvent : PandaBaseRequestEventMessage public sealed class UtkaAhelpPmEvent : PandaBaseRequestEventMessage { [JsonPropertyName("command")] - public override string? Command => "pm"; + public override string Command => "pm"; [JsonPropertyName("message")] public string? Message { get; set; } diff --git a/Content.Server/_White/PandaSocket/Main/PandaStatusHost.cs b/Content.Server/_White/PandaSocket/Main/PandaStatusHost.cs index fa13b76d48..e62cd2c2d2 100644 --- a/Content.Server/_White/PandaSocket/Main/PandaStatusHost.cs +++ b/Content.Server/_White/PandaSocket/Main/PandaStatusHost.cs @@ -7,17 +7,14 @@ using System.Net.Mime; using System.Reflection; using System.Text; using System.Text.Json; -using System.Threading; using System.Threading.Tasks; using System.Web; using Content.Server._White.PandaSocket.Interfaces; using Content.Shared._White; using Microsoft.Extensions.Primitives; using Newtonsoft.Json; -using Robust.Server.Player; using Robust.Shared.Asynchronous; using Robust.Shared.Configuration; -using Robust.Shared.Network; using JsonSerializer = System.Text.Json.JsonSerializer; namespace Content.Server._White.PandaSocket.Main; @@ -25,9 +22,6 @@ namespace Content.Server._White.PandaSocket.Main; public sealed partial class PandaStatusHost : IDisposable { [Dependency] private readonly IConfigurationManager _cfg = default!; - [Dependency] private readonly IServerNetManager _netManager = default!; - [Dependency] private readonly IPlayerManager _playerManager = default!; - [Dependency] private readonly IDependencyCollection _deps = default!; [Dependency] private readonly ILogManager _logMan = default!; [Dependency] private readonly ITaskManager _taskManager = default!;