diff --git a/Content.Client/GameObjects/Components/Command/CommunicationsConsoleBoundUserInterface.cs b/Content.Client/GameObjects/Components/Command/CommunicationsConsoleBoundUserInterface.cs index c82ded4c7a..20c060cc3c 100644 --- a/Content.Client/GameObjects/Components/Command/CommunicationsConsoleBoundUserInterface.cs +++ b/Content.Client/GameObjects/Components/Command/CommunicationsConsoleBoundUserInterface.cs @@ -14,7 +14,9 @@ namespace Content.Client.GameObjects.Components.Command [ViewVariables] private CommunicationsConsoleMenu _menu; +#pragma warning disable 649 [Dependency] private IGameTiming _gameTiming; +#pragma warning restore 649 public bool CountdownStarted { get; private set; } @@ -55,13 +57,6 @@ namespace Content.Client.GameObjects.Components.Command SendMessage(new CommunicationsConsoleRecallEmergencyShuttleMessage()); } - protected override void ReceiveMessage(BoundUserInterfaceMessage message) - { - switch (message) - { - } - } - protected override void UpdateState(BoundUserInterfaceState state) { if (!(state is CommunicationsConsoleInterfaceState commsState)) diff --git a/Content.Client/GameObjects/Components/Instruments/InstrumentComponent.cs b/Content.Client/GameObjects/Components/Instruments/InstrumentComponent.cs index db315ef920..e4c9e6c0fe 100644 --- a/Content.Client/GameObjects/Components/Instruments/InstrumentComponent.cs +++ b/Content.Client/GameObjects/Components/Instruments/InstrumentComponent.cs @@ -32,7 +32,6 @@ namespace Content.Client.GameObjects.Components.Instruments #pragma warning disable 649 [Dependency] private IMidiManager _midiManager; - [Dependency] private readonly IGameTiming _gameTiming; #pragma warning restore 649 [CanBeNull] diff --git a/Content.Client/GameObjects/EntitySystems/CombatModeSystem.cs b/Content.Client/GameObjects/EntitySystems/CombatModeSystem.cs index 60ecdcd3fe..3a80a2a959 100644 --- a/Content.Client/GameObjects/EntitySystems/CombatModeSystem.cs +++ b/Content.Client/GameObjects/EntitySystems/CombatModeSystem.cs @@ -28,8 +28,6 @@ namespace Content.Client.GameObjects.EntitySystems #pragma warning disable 649 [Dependency] private readonly IGameHud _gameHud; [Dependency] private readonly IPlayerManager _playerManager; - [Dependency] private readonly IInputManager _inputManager; - [Dependency] private readonly IOverlayManager _overlayManager; [Dependency] private readonly IGameTiming _gameTiming; #pragma warning restore 649 diff --git a/Content.Client/GameObjects/EntitySystems/VerbSystem.cs b/Content.Client/GameObjects/EntitySystems/VerbSystem.cs index 53b7cf87af..8b1d64d6d3 100644 --- a/Content.Client/GameObjects/EntitySystems/VerbSystem.cs +++ b/Content.Client/GameObjects/EntitySystems/VerbSystem.cs @@ -46,7 +46,6 @@ namespace Content.Client.GameObjects.EntitySystems [Dependency] private readonly IItemSlotManager _itemSlotManager; [Dependency] private readonly IGameTiming _gameTiming; [Dependency] private readonly IUserInterfaceManager _userInterfaceManager; - [Dependency] private readonly IResourceCache _resourceCache; #pragma warning restore 649 private EntityList _currentEntityList; diff --git a/Content.Client/State/LauncherConnecting.cs b/Content.Client/State/LauncherConnecting.cs index 3a31b1237a..0f530e5a54 100644 --- a/Content.Client/State/LauncherConnecting.cs +++ b/Content.Client/State/LauncherConnecting.cs @@ -48,7 +48,6 @@ namespace Content.Client.State var address = _gameController.LaunchState.Ss14Address ?? _gameController.LaunchState.ConnectAddress; - VBoxContainer disconnected; _control = new Control { Stylesheet = _stylesheetManager.SheetSpace, diff --git a/Content.Server/GameObjects/Components/Chemistry/PourableComponent.cs b/Content.Server/GameObjects/Components/Chemistry/PourableComponent.cs index d2b999a8d4..fdbd9ed5ca 100644 --- a/Content.Server/GameObjects/Components/Chemistry/PourableComponent.cs +++ b/Content.Server/GameObjects/Components/Chemistry/PourableComponent.cs @@ -28,7 +28,6 @@ namespace Content.Server.GameObjects.Components.Chemistry #pragma warning disable 649 [Dependency] private readonly IServerNotifyManager _notifyManager; [Dependency] private readonly ILocalizationManager _localizationManager; - [Dependency] private readonly IEntitySystemManager _entitySystemManager; #pragma warning restore 649 public override string Name => "Pourable"; diff --git a/Content.Server/GameObjects/Components/Construction/ConstructionComponent.cs b/Content.Server/GameObjects/Components/Construction/ConstructionComponent.cs index 8e9c91bd1a..65089adac6 100644 --- a/Content.Server/GameObjects/Components/Construction/ConstructionComponent.cs +++ b/Content.Server/GameObjects/Components/Construction/ConstructionComponent.cs @@ -20,9 +20,6 @@ using Robust.Shared.IoC; using Robust.Shared.Localization; using Robust.Shared.ViewVariables; 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 { @@ -38,12 +35,6 @@ namespace Content.Server.GameObjects.Components.Construction SpriteComponent Sprite; 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() { diff --git a/Content.Server/GameObjects/Components/Construction/ConstructorComponent.cs b/Content.Server/GameObjects/Components/Construction/ConstructorComponent.cs index 5ac9f6a4c8..3c6e79f50b 100644 --- a/Content.Server/GameObjects/Components/Construction/ConstructorComponent.cs +++ b/Content.Server/GameObjects/Components/Construction/ConstructorComponent.cs @@ -30,8 +30,6 @@ namespace Content.Server.GameObjects.Components.Construction [Dependency] private readonly IMapManager _mapManager; [Dependency] private readonly IServerEntityManager _serverEntityManager; [Dependency] private readonly IEntitySystemManager _entitySystemManager; - [Dependency] private readonly ISharedNotifyManager _notifyManager; - [Dependency] private readonly ILocalizationManager _localizationManager; #pragma warning restore 649 public override void HandleNetworkMessage(ComponentMessage message, INetChannel channel, ICommonSession session = null) diff --git a/Content.Server/GameObjects/Components/Doors/AirlockComponent.cs b/Content.Server/GameObjects/Components/Doors/AirlockComponent.cs index c6d280ff3f..14483c105b 100644 --- a/Content.Server/GameObjects/Components/Doors/AirlockComponent.cs +++ b/Content.Server/GameObjects/Components/Doors/AirlockComponent.cs @@ -26,10 +26,6 @@ namespace Content.Server.GameObjects.Components.Doors { public override string Name => "Airlock"; -#pragma warning disable 649 - [Dependency] private readonly ILocalizationManager _localizationMgr; -#pragma warning restore 649 - /// /// Duration for which power will be disabled after pulsing either power wire. /// diff --git a/Content.Server/GameObjects/Components/Fluids/PuddleComponent.cs b/Content.Server/GameObjects/Components/Fluids/PuddleComponent.cs index 3a3d06b8fa..1c11d44b02 100644 --- a/Content.Server/GameObjects/Components/Fluids/PuddleComponent.cs +++ b/Content.Server/GameObjects/Components/Fluids/PuddleComponent.cs @@ -18,7 +18,6 @@ using Robust.Shared.Serialization; using Robust.Shared.Utility; using Robust.Shared.ViewVariables; using Timer = Robust.Shared.Timers.Timer; -using Robust.Shared.Utility; namespace Content.Server.GameObjects.Components.Fluids { diff --git a/Content.Server/GameObjects/Components/Instruments/InstrumentComponent.cs b/Content.Server/GameObjects/Components/Instruments/InstrumentComponent.cs index b35178f5bd..5c7f05872c 100644 --- a/Content.Server/GameObjects/Components/Instruments/InstrumentComponent.cs +++ b/Content.Server/GameObjects/Components/Instruments/InstrumentComponent.cs @@ -29,7 +29,9 @@ namespace Content.Server.GameObjects.Components.Instruments public class InstrumentComponent : SharedInstrumentComponent, IDropped, IHandSelected, IHandDeselected, IActivate, IUse, IThrown { +#pragma warning disable 649 [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. 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) InstrumentPlayer = null; diff --git a/Content.Server/GameObjects/Components/Interactable/TilePryingComponent.cs b/Content.Server/GameObjects/Components/Interactable/TilePryingComponent.cs index 4a08588a5f..be625da60f 100644 --- a/Content.Server/GameObjects/Components/Interactable/TilePryingComponent.cs +++ b/Content.Server/GameObjects/Components/Interactable/TilePryingComponent.cs @@ -16,11 +16,9 @@ namespace Content.Server.GameObjects.Components.Interactable public class TilePryingComponent : Component, IAfterInteract { #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 IRobustRandom _robustRandom; #pragma warning restore 649 public override string Name => "TilePrying"; diff --git a/Content.Server/GameObjects/Components/Interactable/ToolComponent.cs b/Content.Server/GameObjects/Components/Interactable/ToolComponent.cs index 9ef6d8d96f..6c2c2ea22d 100644 --- a/Content.Server/GameObjects/Components/Interactable/ToolComponent.cs +++ b/Content.Server/GameObjects/Components/Interactable/ToolComponent.cs @@ -36,9 +36,7 @@ namespace Content.Server.GameObjects.Components.Interactable public class ToolComponent : SharedToolComponent { #pragma warning disable 649 - [Dependency] private IEntitySystemManager _entitySystemManager; - [Dependency] private readonly ITileDefinitionManager _tileDefinitionManager; - [Dependency] private readonly IMapManager _mapManager; + [Dependency] private readonly IEntitySystemManager _entitySystemManager; [Dependency] private readonly IPrototypeManager _prototypeManager; [Dependency] private readonly IRobustRandom _robustRandom; #pragma warning restore 649 diff --git a/Content.Server/GameObjects/Components/Research/LatheComponent.cs b/Content.Server/GameObjects/Components/Research/LatheComponent.cs index 34c4223468..9b3f7cd56b 100644 --- a/Content.Server/GameObjects/Components/Research/LatheComponent.cs +++ b/Content.Server/GameObjects/Components/Research/LatheComponent.cs @@ -195,7 +195,7 @@ namespace Content.Server.GameObjects.Components.Research break; } - Timer.Spawn(InsertionTime, async () => + Timer.Spawn(InsertionTime, () => { State = LatheState.Base; SetAppearance(LatheVisualState.Idle); diff --git a/Content.Server/GameObjects/Components/Weapon/Melee/StunbatonComponent.cs b/Content.Server/GameObjects/Components/Weapon/Melee/StunbatonComponent.cs index a1a0898ad3..6725d63335 100644 --- a/Content.Server/GameObjects/Components/Weapon/Melee/StunbatonComponent.cs +++ b/Content.Server/GameObjects/Components/Weapon/Melee/StunbatonComponent.cs @@ -25,10 +25,12 @@ namespace Content.Server.GameObjects.Components.Weapon.Melee [RegisterComponent] public class StunbatonComponent : MeleeWeaponComponent, IUse, IExamine, IMapInit, IInteractUsing { +#pragma warning disable 649 [Dependency] private IRobustRandom _robustRandom; [Dependency] private IEntitySystemManager _entitySystemManager; [Dependency] private readonly ISharedNotifyManager _notifyManager; [Dependency] private readonly ILocalizationManager _localizationManager; +#pragma warning restore 649 public override string Name => "Stunbaton"; diff --git a/Content.Server/GameObjects/EntitySystems/Click/InteractionSystem.cs b/Content.Server/GameObjects/EntitySystems/Click/InteractionSystem.cs index 14332405bb..160f8d756b 100644 --- a/Content.Server/GameObjects/EntitySystems/Click/InteractionSystem.cs +++ b/Content.Server/GameObjects/EntitySystems/Click/InteractionSystem.cs @@ -315,13 +315,8 @@ namespace Content.Server.GameObjects.EntitySystems { #pragma warning disable 649 [Dependency] private readonly IMapManager _mapManager; - [Dependency] private readonly IPhysicsManager _physicsManager; - [Dependency] private readonly ILocalizationManager _localizationManager; #pragma warning restore 649 - public const float InteractionRange = 2; - public const float InteractionRangeSquared = InteractionRange * InteractionRange; - public override void Initialize() { var inputSys = EntitySystemManager.GetEntitySystem(); diff --git a/Content.Server/GameObjects/EntitySystems/HandsSystem.cs b/Content.Server/GameObjects/EntitySystems/HandsSystem.cs index 97454023fb..1a518b864d 100644 --- a/Content.Server/GameObjects/EntitySystems/HandsSystem.cs +++ b/Content.Server/GameObjects/EntitySystems/HandsSystem.cs @@ -27,7 +27,6 @@ namespace Content.Server.GameObjects.EntitySystems { #pragma warning disable 649 [Dependency] private readonly IMapManager _mapManager; - [Dependency] private readonly IEntitySystemManager _entitySystemManager; [Dependency] private readonly IServerNotifyManager _notifyManager; #pragma warning restore 649 diff --git a/Content.Server/GameTicking/GamePresets/PresetSuspicion.cs b/Content.Server/GameTicking/GamePresets/PresetSuspicion.cs index d4692cecf8..4616888dd5 100644 --- a/Content.Server/GameTicking/GamePresets/PresetSuspicion.cs +++ b/Content.Server/GameTicking/GamePresets/PresetSuspicion.cs @@ -19,7 +19,6 @@ namespace Content.Server.GameTicking.GamePresets public class PresetSuspicion : GamePreset { #pragma warning disable 649 - [Dependency] private readonly ISandboxManager _sandboxManager; [Dependency] private readonly IChatManager _chatManager; [Dependency] private readonly IGameTicker _gameTicker; [Dependency] private readonly IRobustRandom _random; diff --git a/Content.Server/Health/BodySystem/Mechanism/DroppedMechanismComponent.cs b/Content.Server/Health/BodySystem/Mechanism/DroppedMechanismComponent.cs index 95a007f226..1de01a25a4 100644 --- a/Content.Server/Health/BodySystem/Mechanism/DroppedMechanismComponent.cs +++ b/Content.Server/Health/BodySystem/Mechanism/DroppedMechanismComponent.cs @@ -13,16 +13,10 @@ namespace Content.Server.BodySystem { /// /// Component containing the data for a dropped Mechanism entity. - /// + /// [RegisterComponent] public class DroppedMechanismComponent : Component { - - #pragma warning disable CS0649 - [Dependency] - private IPrototypeManager _prototypeManager; - #pragma warning restore - public sealed override string Name => "DroppedMechanism"; [ViewVariables] diff --git a/Content.Server/Health/BodySystem/Surgery/ServerSurgeryToolComponent.cs b/Content.Server/Health/BodySystem/Surgery/ServerSurgeryToolComponent.cs index 42694bde13..0300df1a85 100644 --- a/Content.Server/Health/BodySystem/Surgery/ServerSurgeryToolComponent.cs +++ b/Content.Server/Health/BodySystem/Surgery/ServerSurgeryToolComponent.cs @@ -30,12 +30,6 @@ namespace Content.Server.GameObjects.Components.Weapon.Melee [RegisterComponent] 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 SubscribedSessions = new HashSet(); private Dictionary _surgeryOptionsCache = new Dictionary(); private BodyManagerComponent _targetCache; diff --git a/Content.Shared/GameObjects/EntitySystems/SharedInteractionSystem.cs b/Content.Shared/GameObjects/EntitySystems/SharedInteractionSystem.cs index 6b0a937ff8..787e91f041 100644 --- a/Content.Shared/GameObjects/EntitySystems/SharedInteractionSystem.cs +++ b/Content.Shared/GameObjects/EntitySystems/SharedInteractionSystem.cs @@ -19,7 +19,6 @@ namespace Content.Server.GameObjects.EntitySystems public class SharedInteractionSystem : EntitySystem { #pragma warning disable 649 - [Dependency] private readonly IMapManager _mapManager; [Dependency] private readonly IPhysicsManager _physicsManager; #pragma warning restore 649 diff --git a/Content.Shared/Health/BodySystem/Mechanism/MechanismPrototype.cs b/Content.Shared/Health/BodySystem/Mechanism/MechanismPrototype.cs index 206e5f28de..ce63af1fd2 100644 --- a/Content.Shared/Health/BodySystem/Mechanism/MechanismPrototype.cs +++ b/Content.Shared/Health/BodySystem/Mechanism/MechanismPrototype.cs @@ -12,7 +12,7 @@ namespace Content.Shared.BodySystem { /// /// Prototype for the Mechanism class. - /// + /// [Prototype("mechanism")] [NetSerializable, Serializable] public class MechanismPrototype : IPrototype, IIndexedPrototype { @@ -20,7 +20,6 @@ namespace Content.Shared.BodySystem { private string _name; private string _description; private string _examineMessage; - private string _spritePath; private string _rsiPath; private string _rsiState; private int _durability; @@ -34,10 +33,10 @@ namespace Content.Shared.BodySystem { [ViewVariables] public string Name => _name; - + [ViewVariables] - public string Description => _description; - + public string Description => _description; + [ViewVariables] public string ExamineMessage => _examineMessage; @@ -49,19 +48,19 @@ namespace Content.Shared.BodySystem { [ViewVariables] public int Durability => _durability; - + [ViewVariables] - public int DestroyThreshold => _destroyThreshold; - + public int DestroyThreshold => _destroyThreshold; + [ViewVariables] public int Resistance => _resistance; - + [ViewVariables] public int Size => _size; [ViewVariables] - public BodyPartCompatibility Compatibility => _compatibility; - + public BodyPartCompatibility Compatibility => _compatibility; + public virtual void LoadFrom(YamlMappingNode mapping){ var serializer = YamlObjectSerializer.NewReader(mapping); @@ -74,9 +73,9 @@ namespace Content.Shared.BodySystem { serializer.DataField(ref _durability, "durability", 0); serializer.DataField(ref _destroyThreshold, "destroyThreshold", 0); serializer.DataField(ref _resistance, "resistance", 0); - serializer.DataField(ref _size, "size", 2); + serializer.DataField(ref _size, "size", 2); serializer.DataField(ref _compatibility, "compatibility", BodyPartCompatibility.Universal); - } + } } }