немного снизим количество warning при билде

This commit is contained in:
Remuchi
2024-04-17 11:52:49 +07:00
parent 44b9c3d723
commit 787ce1e674
6 changed files with 55 additions and 69 deletions

View File

@@ -1,29 +1,29 @@
using Content.Server.GameTicking; using Content.Server.GameTicking;
using Content.Server.GameTicking.Rules.Components; using Content.Server.GameTicking.Rules.Components;
using Content.Server.Humanoid; // using Content.Server.Humanoid;
using Content.Server.Polymorph.Systems; // using Content.Server.Polymorph.Systems;
using Content.Server._White.AspectsSystem.Aspects.Components; using Content.Server._White.AspectsSystem.Aspects.Components;
using Content.Server._White.AspectsSystem.Base; using Content.Server._White.AspectsSystem.Base;
using Content.Shared.Humanoid; using Content.Shared.Humanoid;
using Content.Shared.Polymorph; // using Content.Shared.Polymorph;
using Robust.Shared.Prototypes; // using Robust.Shared.Prototypes;
namespace Content.Server._White.AspectsSystem.Aspects; namespace Content.Server._White.AspectsSystem.Aspects;
public sealed class SkeletonAspect : AspectSystem<SkeletonAspectComponent> public sealed class SkeletonAspect : AspectSystem<SkeletonAspectComponent>
{ {
[Dependency] private readonly IPrototypeManager _protoMan = default!; // [Dependency] private readonly IPrototypeManager _protoMan = default!;
[Dependency] private readonly PolymorphSystem _polymorph = default!; // [Dependency] private readonly PolymorphSystem _polymorph = default!;
[Dependency] private readonly HumanoidAppearanceSystem _humanoidAppearance = default!; // [Dependency] private readonly HumanoidAppearanceSystem _humanoidAppearance = default!;
//
private PolymorphPrototype _proto = default!; // private PolymorphPrototype _proto = default!;
public override void Initialize() public override void Initialize()
{ {
base.Initialize(); base.Initialize();
SubscribeLocalEvent<PlayerSpawnCompleteEvent>(HandleLateJoin); SubscribeLocalEvent<PlayerSpawnCompleteEvent>(HandleLateJoin);
_proto = _protoMan.Index<PolymorphPrototype>("AspectForcedSkeleton"); // _proto = _protoMan.Index<PolymorphPrototype>("AspectForcedSkeleton");
} }
protected override void Started(EntityUid uid, SkeletonAspectComponent component, GameRuleComponent gameRule, GameRuleStartedEvent args) protected override void Started(EntityUid uid, SkeletonAspectComponent component, GameRuleComponent gameRule, GameRuleStartedEvent args)

View File

@@ -1,14 +1,10 @@
using System.Linq; using System.Linq;
using System.Numerics;
using Content.Server.Chat.Managers; using Content.Server.Chat.Managers;
using Content.Server.Chat.Systems; using Content.Server.Chat.Systems;
using Content.Server.GameTicking; using Content.Server.GameTicking;
using Content.Server.GameTicking.Rules.Components; using Content.Server.GameTicking.Rules.Components;
using Content.Server.Shuttles.Components;
using Content.Server.Shuttles.Systems;
using Content.Server.StationEvents.Events; using Content.Server.StationEvents.Events;
using Content.Server._White.GhostRecruitment; using Content.Server._White.GhostRecruitment;
using Content.Shared.CCVar;
using Content.Shared._White; using Content.Shared._White;
using Content.Shared._White.GhostRecruitment; using Content.Shared._White.GhostRecruitment;
using JetBrains.Annotations; using JetBrains.Annotations;
@@ -20,13 +16,13 @@ using Robust.Shared.Map;
namespace Content.Server._White.ERTRecruitment; namespace Content.Server._White.ERTRecruitment;
[UsedImplicitly] [UsedImplicitly]
// ReSharper disable once InconsistentNaming
public sealed class ERTRecruitmentRule : StationEventSystem<ERTRecruitmentRuleComponent> public sealed class ERTRecruitmentRule : StationEventSystem<ERTRecruitmentRuleComponent>
{ {
[Dependency] private readonly IChatManager _chat = default!; [Dependency] private readonly IChatManager _chat = default!;
[Dependency] private readonly GhostRecruitmentSystem _recruitment = default!; [Dependency] private readonly GhostRecruitmentSystem _recruitment = default!;
[Dependency] private readonly IMapManager _mapManager = default!; [Dependency] private readonly IMapManager _mapManager = default!;
[Dependency] private readonly MapLoaderSystem _map = default!; [Dependency] private readonly MapLoaderSystem _map = default!;
[Dependency] private readonly ShuttleSystem _shuttle = default!;
[Dependency] private readonly ChatSystem _chatSystem = default!; [Dependency] private readonly ChatSystem _chatSystem = default!;
[Dependency] private readonly IConfigurationManager _cfgManager = default!; [Dependency] private readonly IConfigurationManager _cfgManager = default!;
@@ -191,8 +187,8 @@ public sealed class ERTRecruitmentRule : StationEventSystem<ERTRecruitmentRuleCo
} }
*/ */
var ERTMap = EnsureComp<ERTMapComponent>(outpost); var ertMap = EnsureComp<ERTMapComponent>(outpost);
ERTMap.MapId = mapId; ertMap.MapId = mapId;
//ERTMap.Shuttle = shuttleId; //ERTMap.Shuttle = shuttleId;
return true; return true;

View File

@@ -7,7 +7,6 @@ using Content.Shared.Humanoid;
using Content.Shared.Inventory; using Content.Shared.Inventory;
using Content.Shared._White.Other; using Content.Shared._White.Other;
using Robust.Shared.Audio.Systems; using Robust.Shared.Audio.Systems;
using Robust.Shared.Prototypes;
using Robust.Shared.Random; using Robust.Shared.Random;
namespace Content.Server._White.Halt namespace Content.Server._White.Halt
@@ -17,7 +16,6 @@ namespace Content.Server._White.Halt
[Dependency] private readonly ChatSystem _chat = default!; [Dependency] private readonly ChatSystem _chat = default!;
[Dependency] private readonly SharedAudioSystem _audio = default!; [Dependency] private readonly SharedAudioSystem _audio = default!;
[Dependency] private readonly IRobustRandom _random = default!; [Dependency] private readonly IRobustRandom _random = default!;
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
public override void Initialize() public override void Initialize()
{ {

View File

@@ -1,10 +1,8 @@
using Content.Server.Emp; using Content.Server.Emp;
using Content.Server.Power.Components;
using Content.Shared.Examine; using Content.Shared.Examine;
using Content.Shared.Inventory.Events; using Content.Shared.Inventory.Events;
using Content.Shared._White.MagGloves; using Content.Shared._White.MagGloves;
using Content.Shared.Popups; using Content.Shared.Popups;
using Robust.Shared.Containers;
using Robust.Shared.Timing; using Robust.Shared.Timing;
namespace Content.Server._White.MagGloves; namespace Content.Server._White.MagGloves;
@@ -14,10 +12,9 @@ namespace Content.Server._White.MagGloves;
/// </summary> /// </summary>
public sealed class MagneticGlovesSystem : EntitySystem public sealed class MagneticGlovesSystem : EntitySystem
{ {
[Dependency] private readonly SharedContainerSystem _sharedContainer = default!;
[Dependency] private readonly IGameTiming _gameTiming = default!; [Dependency] private readonly IGameTiming _gameTiming = default!;
[Dependency] private readonly SharedPopupSystem _popup = default!; [Dependency] private readonly SharedPopupSystem _popup = default!;
/// <inheritdoc/> /// <inheritdoc/>
public override void Initialize() public override void Initialize()
{ {
@@ -36,7 +33,6 @@ public sealed class MagneticGlovesSystem : EntitySystem
{ {
RaiseLocalEvent(uid, new ToggleMagneticGlovesEvent()); RaiseLocalEvent(uid, new ToggleMagneticGlovesEvent());
} }
} }
} }
@@ -75,7 +71,7 @@ public sealed class MagneticGlovesSystem : EntitySystem
if (!active) if (!active)
{ {
RemComp<KeepItemsOnFallComponent>(owner); RemComp<KeepItemsOnFallComponent>(owner);
if (TryComp<MagneticGlovesAdvancedComponent>(uid, out var adv)) if (TryComp<MagneticGlovesAdvancedComponent>(uid, out _))
{ {
RemComp<PreventDisarmComponent>(owner); RemComp<PreventDisarmComponent>(owner);
RemComp<PreventStrippingFromHandsAndGlovesComponent>(owner); RemComp<PreventStrippingFromHandsAndGlovesComponent>(owner);
@@ -84,7 +80,7 @@ public sealed class MagneticGlovesSystem : EntitySystem
else if (component.Enabled) else if (component.Enabled)
{ {
EnsureComp<KeepItemsOnFallComponent>(owner); EnsureComp<KeepItemsOnFallComponent>(owner);
if (TryComp<MagneticGlovesAdvancedComponent>(uid, out var adv)) if (TryComp<MagneticGlovesAdvancedComponent>(uid, out _))
{ {
EnsureComp<PreventDisarmComponent>(owner); EnsureComp<PreventDisarmComponent>(owner);
EnsureComp<PreventStrippingFromHandsAndGlovesComponent>(owner); EnsureComp<PreventStrippingFromHandsAndGlovesComponent>(owner);
@@ -94,11 +90,11 @@ public sealed class MagneticGlovesSystem : EntitySystem
public void OnExamined(EntityUid uid, MagneticGlovesComponent component, ExaminedEvent args) public void OnExamined(EntityUid uid, MagneticGlovesComponent component, ExaminedEvent args)
{ {
if (!args.IsInDetailsRange) if (!args.IsInDetailsRange)
return; 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) if (component.GlovesReadyAt < _gameTiming.CurTime)
{ {
@@ -113,4 +109,4 @@ public sealed class MagneticGlovesSystem : EntitySystem
args.PushMarkup(message); args.PushMarkup(message);
} }
} }

View File

@@ -2,22 +2,24 @@
namespace Content.Server._White.PandaSocket.Main; namespace Content.Server._White.PandaSocket.Main;
[Virtual]
public class PandaBaseMessage public class PandaBaseMessage
{ {
[JsonPropertyName("command")] [JsonPropertyName("command")]
public virtual string? Command { get; set; } public virtual string? Command { get; set; }
} }
[Virtual]
public class PandaBaseRequestEventMessage : PandaBaseMessage public class PandaBaseRequestEventMessage : PandaBaseMessage
{ {
[JsonPropertyName("token")] [JsonPropertyName("token")]
public string? Token { get; set; } public string? Token { get; set; }
} }
public class UtkaOOCRequest : PandaBaseRequestEventMessage public sealed class UtkaOOCRequest : PandaBaseRequestEventMessage
{ {
[JsonPropertyName("command")] [JsonPropertyName("command")]
public override string? Command => "ooc"; public override string Command => "ooc";
[JsonPropertyName("ckey")] [JsonPropertyName("ckey")]
public string? CKey { get; set; } public string? CKey { get; set; }
@@ -26,10 +28,10 @@ public class UtkaOOCRequest : PandaBaseRequestEventMessage
public string? Message { get; set; } public string? Message { get; set; }
} }
public class UtkaAsayRequest : PandaBaseRequestEventMessage public sealed class UtkaAsayRequest : PandaBaseRequestEventMessage
{ {
[JsonPropertyName("command")] [JsonPropertyName("command")]
public override string? Command => "asay"; public override string Command => "asay";
[JsonPropertyName("ackey")] [JsonPropertyName("ackey")]
public string? ACkey { get; set; } public string? ACkey { get; set; }
@@ -38,10 +40,10 @@ public class UtkaAsayRequest : PandaBaseRequestEventMessage
public string? Message { get; set; } public string? Message { get; set; }
} }
public class UtkaPmRequest : PandaBaseRequestEventMessage public sealed class UtkaPmRequest : PandaBaseRequestEventMessage
{ {
[JsonPropertyName("command")] [JsonPropertyName("command")]
public override string? Command => "discordpm"; public override string Command => "discordpm";
[JsonPropertyName("sender")] [JsonPropertyName("sender")]
public string? Sender { get; set; } public string? Sender { get; set; }
@@ -53,55 +55,55 @@ public class UtkaPmRequest : PandaBaseRequestEventMessage
public string? Message { get; set; } public string? Message { get; set; }
} }
public class UtkaPmResponse : PandaBaseMessage public sealed class UtkaPmResponse : PandaBaseMessage
{ {
[JsonPropertyName("command")] [JsonPropertyName("command")]
public override string? Command => "discordpm"; public override string Command => "discordpm";
[JsonPropertyName("message")] [JsonPropertyName("message")]
public bool? Message { get; set; } public bool? Message { get; set; }
} }
public class UtkaWhoRequest : PandaBaseRequestEventMessage public sealed class UtkaWhoRequest : PandaBaseRequestEventMessage
{ {
[JsonPropertyName("command")] [JsonPropertyName("command")]
public override string? Command => "who"; public override string Command => "who";
} }
public class UtkaWhoResponse : PandaBaseMessage public sealed class UtkaWhoResponse : PandaBaseMessage
{ {
[JsonPropertyName("command")] [JsonPropertyName("command")]
public override string? Command => "who"; public override string Command => "who";
[JsonPropertyName("players")] [JsonPropertyName("players")]
public List<string>? Players { get; set; } public List<string>? Players { get; set; }
} }
public class UtkaAdminWhoRequest : PandaBaseRequestEventMessage public sealed class UtkaAdminWhoRequest : PandaBaseRequestEventMessage
{ {
[JsonPropertyName("command")] [JsonPropertyName("command")]
public override string? Command => "adminwho"; public override string Command => "adminwho";
} }
public class UtkaAdminWhoResponse : PandaBaseMessage public sealed class UtkaAdminWhoResponse : PandaBaseMessage
{ {
[JsonPropertyName("command")] [JsonPropertyName("command")]
public override string? Command => "adminwho"; public override string Command => "adminwho";
[JsonPropertyName("admins")] [JsonPropertyName("admins")]
public List<string>? Admins { get; set; } public List<string>? Admins { get; set; }
} }
public class UtkaStatusRequest : PandaBaseRequestEventMessage public sealed class UtkaStatusRequest : PandaBaseRequestEventMessage
{ {
[JsonPropertyName("command")] [JsonPropertyName("command")]
public override string? Command => "status"; public override string Command => "status";
} }
public class UtkaStatusResponse : PandaBaseMessage public sealed class UtkaStatusResponse : PandaBaseMessage
{ {
[JsonPropertyName("command")] [JsonPropertyName("command")]
public override string? Command => "status"; public override string Command => "status";
[JsonPropertyName("players")] [JsonPropertyName("players")]
public int? Players { get; set; } public int? Players { get; set; }
@@ -125,7 +127,7 @@ public class UtkaStatusResponse : PandaBaseMessage
public sealed class UtkaBanRequest : PandaBaseRequestEventMessage public sealed class UtkaBanRequest : PandaBaseRequestEventMessage
{ {
[JsonPropertyName("command")] [JsonPropertyName("command")]
public override string? Command => "ban"; public override string Command => "ban";
[JsonPropertyName("ckey")] [JsonPropertyName("ckey")]
public string? Ckey { get; set; } public string? Ckey { get; set; }
@@ -149,7 +151,7 @@ public sealed class UtkaBanRequest : PandaBaseRequestEventMessage
public sealed class UtkaBanResponse : PandaBaseMessage public sealed class UtkaBanResponse : PandaBaseMessage
{ {
[JsonPropertyName("command")] [JsonPropertyName("command")]
public override string? Command => "ban"; public override string Command => "ban";
[JsonPropertyName("banned")] [JsonPropertyName("banned")]
public bool? Banned { get; set; } public bool? Banned { get; set; }
@@ -157,7 +159,7 @@ public sealed class UtkaBanResponse : PandaBaseMessage
public sealed class UtkaJobBanRequest : PandaBaseRequestEventMessage public sealed class UtkaJobBanRequest : PandaBaseRequestEventMessage
{ {
public override string? Command => "jobban"; public override string Command => "jobban";
[JsonPropertyName("ckey")] [JsonPropertyName("ckey")]
public string? Ckey { get; set; } public string? Ckey { get; set; }
@@ -181,7 +183,7 @@ public sealed class UtkaJobBanRequest : PandaBaseRequestEventMessage
public sealed class UtkaJobBanResponse : PandaBaseMessage public sealed class UtkaJobBanResponse : PandaBaseMessage
{ {
[JsonPropertyName("command")] [JsonPropertyName("command")]
public override string? Command => "jobban"; public override string Command => "jobban";
[JsonPropertyName("banned")] [JsonPropertyName("banned")]
public bool? Banned { get; set; } public bool? Banned { get; set; }
@@ -190,13 +192,13 @@ public sealed class UtkaJobBanResponse : PandaBaseMessage
public sealed class UtkaRestartRoundRequest : PandaBaseRequestEventMessage public sealed class UtkaRestartRoundRequest : PandaBaseRequestEventMessage
{ {
[JsonPropertyName("command")] [JsonPropertyName("command")]
public override string? Command => "restartround"; public override string Command => "restartround";
} }
public sealed class UtkaRestartRoundResponse : PandaBaseMessage public sealed class UtkaRestartRoundResponse : PandaBaseMessage
{ {
[JsonPropertyName("command")] [JsonPropertyName("command")]
public override string? Command => "restartround"; public override string Command => "restartround";
[JsonPropertyName("restarted")] [JsonPropertyName("restarted")]
public bool? Restarted { get; set; } public bool? Restarted { get; set; }
@@ -205,7 +207,7 @@ public sealed class UtkaRestartRoundResponse : PandaBaseMessage
public sealed class UtkaUnbanRequest : PandaBaseRequestEventMessage public sealed class UtkaUnbanRequest : PandaBaseRequestEventMessage
{ {
[JsonPropertyName("command")] [JsonPropertyName("command")]
public override string? Command => "unban"; public override string Command => "unban";
[JsonPropertyName("ackey")] [JsonPropertyName("ackey")]
public string? ACkey { get; set; } public string? ACkey { get; set; }
@@ -217,7 +219,7 @@ public sealed class UtkaUnbanRequest : PandaBaseRequestEventMessage
public sealed class UtkaUnbanResponse : PandaBaseMessage public sealed class UtkaUnbanResponse : PandaBaseMessage
{ {
[JsonPropertyName("command")] [JsonPropertyName("command")]
public override string? Command => "unban"; public override string Command => "unban";
[JsonPropertyName("unbanned")] [JsonPropertyName("unbanned")]
public bool? Unbanned { get; set; } public bool? Unbanned { get; set; }
@@ -226,7 +228,7 @@ public sealed class UtkaUnbanResponse : PandaBaseMessage
public sealed class UtkaUnJobBanRequest : PandaBaseRequestEventMessage public sealed class UtkaUnJobBanRequest : PandaBaseRequestEventMessage
{ {
[JsonPropertyName("command")] [JsonPropertyName("command")]
public override string? Command => "unjobban"; public override string Command => "unjobban";
[JsonPropertyName("ackey")] [JsonPropertyName("ackey")]
public string? ACkey { get; set; } public string? ACkey { get; set; }
@@ -238,7 +240,7 @@ public sealed class UtkaUnJobBanRequest : PandaBaseRequestEventMessage
public sealed class UtkaUnJobBanResponse : PandaBaseMessage public sealed class UtkaUnJobBanResponse : PandaBaseMessage
{ {
[JsonPropertyName("command")] [JsonPropertyName("command")]
public override string? Command => "unjobban"; public override string Command => "unjobban";
[JsonPropertyName("unbanned")] [JsonPropertyName("unbanned")]
public bool? Unbanned { get; set; } public bool? Unbanned { get; set; }
@@ -247,7 +249,7 @@ public sealed class UtkaUnJobBanResponse : PandaBaseMessage
public sealed class UtkaBannedEvent : PandaBaseRequestEventMessage public sealed class UtkaBannedEvent : PandaBaseRequestEventMessage
{ {
[JsonPropertyName("command")] [JsonPropertyName("command")]
public override string? Command => "banned"; public override string Command => "banned";
[JsonPropertyName("ckey")] [JsonPropertyName("ckey")]
public string? Ckey { get; set; } public string? Ckey { get; set; }
@@ -286,7 +288,7 @@ public sealed class UtkaChatMessageEvent : PandaBaseRequestEventMessage
public sealed class UtkaRoundStatusEvent : PandaBaseRequestEventMessage public sealed class UtkaRoundStatusEvent : PandaBaseRequestEventMessage
{ {
[JsonPropertyName("command")] [JsonPropertyName("command")]
public override string? Command => "roundstatus"; public override string Command => "roundstatus";
[JsonPropertyName("message")] [JsonPropertyName("message")]
public string? Message { get; set; } public string? Message { get; set; }
@@ -295,7 +297,7 @@ public sealed class UtkaRoundStatusEvent : PandaBaseRequestEventMessage
public sealed class UtkaChatMeEvent : PandaBaseRequestEventMessage public sealed class UtkaChatMeEvent : PandaBaseRequestEventMessage
{ {
[JsonPropertyName("command")] [JsonPropertyName("command")]
public override string? Command => "me"; public override string Command => "me";
[JsonPropertyName("ckey")] [JsonPropertyName("ckey")]
public string? Ckey { get; set; } public string? Ckey { get; set; }
@@ -310,7 +312,7 @@ public sealed class UtkaChatMeEvent : PandaBaseRequestEventMessage
public sealed class UtkaAhelpPmEvent : PandaBaseRequestEventMessage public sealed class UtkaAhelpPmEvent : PandaBaseRequestEventMessage
{ {
[JsonPropertyName("command")] [JsonPropertyName("command")]
public override string? Command => "pm"; public override string Command => "pm";
[JsonPropertyName("message")] [JsonPropertyName("message")]
public string? Message { get; set; } public string? Message { get; set; }

View File

@@ -7,17 +7,14 @@ using System.Net.Mime;
using System.Reflection; using System.Reflection;
using System.Text; using System.Text;
using System.Text.Json; using System.Text.Json;
using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Web; using System.Web;
using Content.Server._White.PandaSocket.Interfaces; using Content.Server._White.PandaSocket.Interfaces;
using Content.Shared._White; using Content.Shared._White;
using Microsoft.Extensions.Primitives; using Microsoft.Extensions.Primitives;
using Newtonsoft.Json; using Newtonsoft.Json;
using Robust.Server.Player;
using Robust.Shared.Asynchronous; using Robust.Shared.Asynchronous;
using Robust.Shared.Configuration; using Robust.Shared.Configuration;
using Robust.Shared.Network;
using JsonSerializer = System.Text.Json.JsonSerializer; using JsonSerializer = System.Text.Json.JsonSerializer;
namespace Content.Server._White.PandaSocket.Main; namespace Content.Server._White.PandaSocket.Main;
@@ -25,9 +22,6 @@ namespace Content.Server._White.PandaSocket.Main;
public sealed partial class PandaStatusHost : IDisposable public sealed partial class PandaStatusHost : IDisposable
{ {
[Dependency] private readonly IConfigurationManager _cfg = default!; [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 ILogManager _logMan = default!;
[Dependency] private readonly ITaskManager _taskManager = default!; [Dependency] private readonly ITaskManager _taskManager = default!;