немного снизим количество 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.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<SkeletonAspectComponent>
{
[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<PlayerSpawnCompleteEvent>(HandleLateJoin);
_proto = _protoMan.Index<PolymorphPrototype>("AspectForcedSkeleton");
// _proto = _protoMan.Index<PolymorphPrototype>("AspectForcedSkeleton");
}
protected override void Started(EntityUid uid, SkeletonAspectComponent component, GameRuleComponent gameRule, GameRuleStartedEvent args)

View File

@@ -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<ERTRecruitmentRuleComponent>
{
[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<ERTRecruitmentRuleCo
}
*/
var ERTMap = EnsureComp<ERTMapComponent>(outpost);
ERTMap.MapId = mapId;
var ertMap = EnsureComp<ERTMapComponent>(outpost);
ertMap.MapId = mapId;
//ERTMap.Shuttle = shuttleId;
return true;

View File

@@ -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()
{

View File

@@ -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;
/// </summary>
public sealed class MagneticGlovesSystem : EntitySystem
{
[Dependency] private readonly SharedContainerSystem _sharedContainer = default!;
[Dependency] private readonly IGameTiming _gameTiming = default!;
[Dependency] private readonly SharedPopupSystem _popup = default!;
/// <inheritdoc/>
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<KeepItemsOnFallComponent>(owner);
if (TryComp<MagneticGlovesAdvancedComponent>(uid, out var adv))
if (TryComp<MagneticGlovesAdvancedComponent>(uid, out _))
{
RemComp<PreventDisarmComponent>(owner);
RemComp<PreventStrippingFromHandsAndGlovesComponent>(owner);
@@ -84,7 +80,7 @@ public sealed class MagneticGlovesSystem : EntitySystem
else if (component.Enabled)
{
EnsureComp<KeepItemsOnFallComponent>(owner);
if (TryComp<MagneticGlovesAdvancedComponent>(uid, out var adv))
if (TryComp<MagneticGlovesAdvancedComponent>(uid, out _))
{
EnsureComp<PreventDisarmComponent>(owner);
EnsureComp<PreventStrippingFromHandsAndGlovesComponent>(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);
}
}
}

View File

@@ -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<string>? 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<string>? 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; }

View File

@@ -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!;