Fix compiler warnings

This commit is contained in:
Pieter-Jan Briers
2020-05-28 17:44:34 +02:00
parent 7573eb7863
commit 94917a63a6
22 changed files with 23 additions and 71 deletions

View File

@@ -14,7 +14,9 @@ namespace Content.Client.GameObjects.Components.Command
[ViewVariables] [ViewVariables]
private CommunicationsConsoleMenu _menu; private CommunicationsConsoleMenu _menu;
#pragma warning disable 649
[Dependency] private IGameTiming _gameTiming; [Dependency] private IGameTiming _gameTiming;
#pragma warning restore 649
public bool CountdownStarted { get; private set; } public bool CountdownStarted { get; private set; }
@@ -55,13 +57,6 @@ namespace Content.Client.GameObjects.Components.Command
SendMessage(new CommunicationsConsoleRecallEmergencyShuttleMessage()); SendMessage(new CommunicationsConsoleRecallEmergencyShuttleMessage());
} }
protected override void ReceiveMessage(BoundUserInterfaceMessage message)
{
switch (message)
{
}
}
protected override void UpdateState(BoundUserInterfaceState state) protected override void UpdateState(BoundUserInterfaceState state)
{ {
if (!(state is CommunicationsConsoleInterfaceState commsState)) if (!(state is CommunicationsConsoleInterfaceState commsState))

View File

@@ -32,7 +32,6 @@ namespace Content.Client.GameObjects.Components.Instruments
#pragma warning disable 649 #pragma warning disable 649
[Dependency] private IMidiManager _midiManager; [Dependency] private IMidiManager _midiManager;
[Dependency] private readonly IGameTiming _gameTiming;
#pragma warning restore 649 #pragma warning restore 649
[CanBeNull] [CanBeNull]

View File

@@ -28,8 +28,6 @@ namespace Content.Client.GameObjects.EntitySystems
#pragma warning disable 649 #pragma warning disable 649
[Dependency] private readonly IGameHud _gameHud; [Dependency] private readonly IGameHud _gameHud;
[Dependency] private readonly IPlayerManager _playerManager; [Dependency] private readonly IPlayerManager _playerManager;
[Dependency] private readonly IInputManager _inputManager;
[Dependency] private readonly IOverlayManager _overlayManager;
[Dependency] private readonly IGameTiming _gameTiming; [Dependency] private readonly IGameTiming _gameTiming;
#pragma warning restore 649 #pragma warning restore 649

View File

@@ -46,7 +46,6 @@ namespace Content.Client.GameObjects.EntitySystems
[Dependency] private readonly IItemSlotManager _itemSlotManager; [Dependency] private readonly IItemSlotManager _itemSlotManager;
[Dependency] private readonly IGameTiming _gameTiming; [Dependency] private readonly IGameTiming _gameTiming;
[Dependency] private readonly IUserInterfaceManager _userInterfaceManager; [Dependency] private readonly IUserInterfaceManager _userInterfaceManager;
[Dependency] private readonly IResourceCache _resourceCache;
#pragma warning restore 649 #pragma warning restore 649
private EntityList _currentEntityList; private EntityList _currentEntityList;

View File

@@ -48,7 +48,6 @@ namespace Content.Client.State
var address = _gameController.LaunchState.Ss14Address ?? _gameController.LaunchState.ConnectAddress; var address = _gameController.LaunchState.Ss14Address ?? _gameController.LaunchState.ConnectAddress;
VBoxContainer disconnected;
_control = new Control _control = new Control
{ {
Stylesheet = _stylesheetManager.SheetSpace, Stylesheet = _stylesheetManager.SheetSpace,

View File

@@ -28,7 +28,6 @@ namespace Content.Server.GameObjects.Components.Chemistry
#pragma warning disable 649 #pragma warning disable 649
[Dependency] private readonly IServerNotifyManager _notifyManager; [Dependency] private readonly IServerNotifyManager _notifyManager;
[Dependency] private readonly ILocalizationManager _localizationManager; [Dependency] private readonly ILocalizationManager _localizationManager;
[Dependency] private readonly IEntitySystemManager _entitySystemManager;
#pragma warning restore 649 #pragma warning restore 649
public override string Name => "Pourable"; public override string Name => "Pourable";

View File

@@ -20,9 +20,6 @@ using Robust.Shared.IoC;
using Robust.Shared.Localization; using Robust.Shared.Localization;
using Robust.Shared.ViewVariables; using Robust.Shared.ViewVariables;
using static Content.Shared.Construction.ConstructionStepMaterial; using static Content.Shared.Construction.ConstructionStepMaterial;
using static Content.Shared.Construction.ConstructionStepTool;
using Robust.Shared.Utility;
using Robust.Shared.Utility;
namespace Content.Server.GameObjects.Components.Construction namespace Content.Server.GameObjects.Components.Construction
{ {
@@ -38,12 +35,6 @@ namespace Content.Server.GameObjects.Components.Construction
SpriteComponent Sprite; SpriteComponent Sprite;
ITransformComponent Transform; ITransformComponent Transform;
#pragma warning disable 649
[Dependency] private IRobustRandom _random;
[Dependency] private readonly IEntitySystemManager _entitySystemManager;
[Dependency] private readonly IServerNotifyManager _notifyManager;
[Dependency] private readonly ILocalizationManager _localizationManager;
#pragma warning restore 649
public override void Initialize() public override void Initialize()
{ {

View File

@@ -30,8 +30,6 @@ namespace Content.Server.GameObjects.Components.Construction
[Dependency] private readonly IMapManager _mapManager; [Dependency] private readonly IMapManager _mapManager;
[Dependency] private readonly IServerEntityManager _serverEntityManager; [Dependency] private readonly IServerEntityManager _serverEntityManager;
[Dependency] private readonly IEntitySystemManager _entitySystemManager; [Dependency] private readonly IEntitySystemManager _entitySystemManager;
[Dependency] private readonly ISharedNotifyManager _notifyManager;
[Dependency] private readonly ILocalizationManager _localizationManager;
#pragma warning restore 649 #pragma warning restore 649
public override void HandleNetworkMessage(ComponentMessage message, INetChannel channel, ICommonSession session = null) public override void HandleNetworkMessage(ComponentMessage message, INetChannel channel, ICommonSession session = null)

View File

@@ -26,10 +26,6 @@ namespace Content.Server.GameObjects.Components.Doors
{ {
public override string Name => "Airlock"; public override string Name => "Airlock";
#pragma warning disable 649
[Dependency] private readonly ILocalizationManager _localizationMgr;
#pragma warning restore 649
/// <summary> /// <summary>
/// Duration for which power will be disabled after pulsing either power wire. /// Duration for which power will be disabled after pulsing either power wire.
/// </summary> /// </summary>

View File

@@ -18,7 +18,6 @@ using Robust.Shared.Serialization;
using Robust.Shared.Utility; using Robust.Shared.Utility;
using Robust.Shared.ViewVariables; using Robust.Shared.ViewVariables;
using Timer = Robust.Shared.Timers.Timer; using Timer = Robust.Shared.Timers.Timer;
using Robust.Shared.Utility;
namespace Content.Server.GameObjects.Components.Fluids namespace Content.Server.GameObjects.Components.Fluids
{ {

View File

@@ -29,7 +29,9 @@ namespace Content.Server.GameObjects.Components.Instruments
public class InstrumentComponent : SharedInstrumentComponent, public class InstrumentComponent : SharedInstrumentComponent,
IDropped, IHandSelected, IHandDeselected, IActivate, IUse, IThrown IDropped, IHandSelected, IHandDeselected, IActivate, IUse, IThrown
{ {
#pragma warning disable 649
[Dependency] private IServerNotifyManager _notifyManager; [Dependency] private IServerNotifyManager _notifyManager;
#pragma warning restore 649
// These 2 values are quite high for now, and this could be easily abused. Change this if people are abusing it. // These 2 values are quite high for now, and this could be easily abused. Change this if people are abusing it.
public const int MaxMidiEventsPerSecond = 20; public const int MaxMidiEventsPerSecond = 20;
@@ -98,7 +100,7 @@ namespace Content.Server.GameObjects.Components.Instruments
} }
} }
private void OnPlayerStatusChanged(object? sender, SessionStatusEventArgs e) private void OnPlayerStatusChanged(object sender, SessionStatusEventArgs e)
{ {
if (e.NewStatus == SessionStatus.Disconnected) if (e.NewStatus == SessionStatus.Disconnected)
InstrumentPlayer = null; InstrumentPlayer = null;

View File

@@ -16,11 +16,9 @@ namespace Content.Server.GameObjects.Components.Interactable
public class TilePryingComponent : Component, IAfterInteract public class TilePryingComponent : Component, IAfterInteract
{ {
#pragma warning disable 649 #pragma warning disable 649
[Dependency] private IEntitySystemManager _entitySystemManager; [Dependency] private readonly IEntitySystemManager _entitySystemManager;
[Dependency] private readonly ITileDefinitionManager _tileDefinitionManager; [Dependency] private readonly ITileDefinitionManager _tileDefinitionManager;
[Dependency] private readonly IMapManager _mapManager; [Dependency] private readonly IMapManager _mapManager;
[Dependency] private readonly IPrototypeManager _prototypeManager;
[Dependency] private readonly IRobustRandom _robustRandom;
#pragma warning restore 649 #pragma warning restore 649
public override string Name => "TilePrying"; public override string Name => "TilePrying";

View File

@@ -36,9 +36,7 @@ namespace Content.Server.GameObjects.Components.Interactable
public class ToolComponent : SharedToolComponent public class ToolComponent : SharedToolComponent
{ {
#pragma warning disable 649 #pragma warning disable 649
[Dependency] private IEntitySystemManager _entitySystemManager; [Dependency] private readonly IEntitySystemManager _entitySystemManager;
[Dependency] private readonly ITileDefinitionManager _tileDefinitionManager;
[Dependency] private readonly IMapManager _mapManager;
[Dependency] private readonly IPrototypeManager _prototypeManager; [Dependency] private readonly IPrototypeManager _prototypeManager;
[Dependency] private readonly IRobustRandom _robustRandom; [Dependency] private readonly IRobustRandom _robustRandom;
#pragma warning restore 649 #pragma warning restore 649

View File

@@ -195,7 +195,7 @@ namespace Content.Server.GameObjects.Components.Research
break; break;
} }
Timer.Spawn(InsertionTime, async () => Timer.Spawn(InsertionTime, () =>
{ {
State = LatheState.Base; State = LatheState.Base;
SetAppearance(LatheVisualState.Idle); SetAppearance(LatheVisualState.Idle);

View File

@@ -25,10 +25,12 @@ namespace Content.Server.GameObjects.Components.Weapon.Melee
[RegisterComponent] [RegisterComponent]
public class StunbatonComponent : MeleeWeaponComponent, IUse, IExamine, IMapInit, IInteractUsing public class StunbatonComponent : MeleeWeaponComponent, IUse, IExamine, IMapInit, IInteractUsing
{ {
#pragma warning disable 649
[Dependency] private IRobustRandom _robustRandom; [Dependency] private IRobustRandom _robustRandom;
[Dependency] private IEntitySystemManager _entitySystemManager; [Dependency] private IEntitySystemManager _entitySystemManager;
[Dependency] private readonly ISharedNotifyManager _notifyManager; [Dependency] private readonly ISharedNotifyManager _notifyManager;
[Dependency] private readonly ILocalizationManager _localizationManager; [Dependency] private readonly ILocalizationManager _localizationManager;
#pragma warning restore 649
public override string Name => "Stunbaton"; public override string Name => "Stunbaton";

View File

@@ -315,13 +315,8 @@ namespace Content.Server.GameObjects.EntitySystems
{ {
#pragma warning disable 649 #pragma warning disable 649
[Dependency] private readonly IMapManager _mapManager; [Dependency] private readonly IMapManager _mapManager;
[Dependency] private readonly IPhysicsManager _physicsManager;
[Dependency] private readonly ILocalizationManager _localizationManager;
#pragma warning restore 649 #pragma warning restore 649
public const float InteractionRange = 2;
public const float InteractionRangeSquared = InteractionRange * InteractionRange;
public override void Initialize() public override void Initialize()
{ {
var inputSys = EntitySystemManager.GetEntitySystem<InputSystem>(); var inputSys = EntitySystemManager.GetEntitySystem<InputSystem>();

View File

@@ -27,7 +27,6 @@ namespace Content.Server.GameObjects.EntitySystems
{ {
#pragma warning disable 649 #pragma warning disable 649
[Dependency] private readonly IMapManager _mapManager; [Dependency] private readonly IMapManager _mapManager;
[Dependency] private readonly IEntitySystemManager _entitySystemManager;
[Dependency] private readonly IServerNotifyManager _notifyManager; [Dependency] private readonly IServerNotifyManager _notifyManager;
#pragma warning restore 649 #pragma warning restore 649

View File

@@ -19,7 +19,6 @@ namespace Content.Server.GameTicking.GamePresets
public class PresetSuspicion : GamePreset public class PresetSuspicion : GamePreset
{ {
#pragma warning disable 649 #pragma warning disable 649
[Dependency] private readonly ISandboxManager _sandboxManager;
[Dependency] private readonly IChatManager _chatManager; [Dependency] private readonly IChatManager _chatManager;
[Dependency] private readonly IGameTicker _gameTicker; [Dependency] private readonly IGameTicker _gameTicker;
[Dependency] private readonly IRobustRandom _random; [Dependency] private readonly IRobustRandom _random;

View File

@@ -17,12 +17,6 @@ namespace Content.Server.BodySystem {
[RegisterComponent] [RegisterComponent]
public class DroppedMechanismComponent : Component public class DroppedMechanismComponent : Component
{ {
#pragma warning disable CS0649
[Dependency]
private IPrototypeManager _prototypeManager;
#pragma warning restore
public sealed override string Name => "DroppedMechanism"; public sealed override string Name => "DroppedMechanism";
[ViewVariables] [ViewVariables]

View File

@@ -30,12 +30,6 @@ namespace Content.Server.GameObjects.Components.Weapon.Melee
[RegisterComponent] [RegisterComponent]
public class ServerSurgeryToolComponent : SharedSurgeryToolComponent, IAfterInteract public class ServerSurgeryToolComponent : SharedSurgeryToolComponent, IAfterInteract
{ {
#pragma warning disable 649
[Dependency] private readonly IMapManager _mapManager;
[Dependency] private readonly IEntitySystemManager _entitySystemManager;
[Dependency] private readonly IPhysicsManager _physicsManager;
#pragma warning restore 649
public HashSet<IPlayerSession> SubscribedSessions = new HashSet<IPlayerSession>(); public HashSet<IPlayerSession> SubscribedSessions = new HashSet<IPlayerSession>();
private Dictionary<string, BodyPart> _surgeryOptionsCache = new Dictionary<string, BodyPart>(); private Dictionary<string, BodyPart> _surgeryOptionsCache = new Dictionary<string, BodyPart>();
private BodyManagerComponent _targetCache; private BodyManagerComponent _targetCache;

View File

@@ -19,7 +19,6 @@ namespace Content.Server.GameObjects.EntitySystems
public class SharedInteractionSystem : EntitySystem public class SharedInteractionSystem : EntitySystem
{ {
#pragma warning disable 649 #pragma warning disable 649
[Dependency] private readonly IMapManager _mapManager;
[Dependency] private readonly IPhysicsManager _physicsManager; [Dependency] private readonly IPhysicsManager _physicsManager;
#pragma warning restore 649 #pragma warning restore 649

View File

@@ -20,7 +20,6 @@ namespace Content.Shared.BodySystem {
private string _name; private string _name;
private string _description; private string _description;
private string _examineMessage; private string _examineMessage;
private string _spritePath;
private string _rsiPath; private string _rsiPath;
private string _rsiState; private string _rsiState;
private int _durability; private int _durability;