From cea1b21832eb3181f289a33ab85a8d7a614486c7 Mon Sep 17 00:00:00 2001 From: wrexbe <81056464+wrexbe@users.noreply.github.com> Date: Fri, 21 Jan 2022 01:38:35 -0800 Subject: [PATCH] Fixing some warnings (#6250) Co-authored-by: Paul Ritter --- Content.Benchmarks/DynamicTreeBenchmark.cs | 10 +++--- .../AI/ClientPathfindingDebugSystem.cs | 3 +- Content.Client/AME/UI/AMEWindow.xaml | 4 +-- Content.Client/AME/UI/AMEWindow.xaml.cs | 2 +- .../Access/UI/IdCardConsoleWindow.xaml | 4 +-- .../Access/UI/IdCardConsoleWindow.xaml.cs | 2 +- Content.Client/Actions/UI/ActionMenu.cs | 2 +- .../Administration/AdminVerbSystem.cs | 1 - .../UI/AdminAnnounceWindow.xaml | 4 +-- .../UI/AdminAnnounceWindow.xaml.cs | 2 +- .../Administration/UI/AdminMenuWindow.xaml | 4 +-- .../Administration/UI/AdminMenuWindow.xaml.cs | 2 +- .../UI/CustomControls/UICommandButton.cs | 4 +-- .../UI/Logs/AdminLogsWindow.xaml | 4 +-- .../UI/Logs/AdminLogsWindow.xaml.cs | 2 +- .../UI/ManageSolutions/AddReagentWindow.xaml | 4 +-- .../ManageSolutions/AddReagentWindow.xaml.cs | 2 +- .../ManageSolutions/EditSolutionsWindow.xaml | 4 +-- .../EditSolutionsWindow.xaml.cs | 2 +- .../Administration/UI/PermissionsEui.cs | 8 ++--- .../UI/SetOutfit/SetOutfitMenu.xaml | 4 +-- .../UI/SetOutfit/SetOutfitMenu.xaml.cs | 2 +- .../UI/Tabs/AdminTab/AdminShuttleWindow.xaml | 4 +-- .../Tabs/AdminTab/AdminShuttleWindow.xaml.cs | 2 +- .../UI/Tabs/AdminTab/BanWindow.xaml | 4 +-- .../UI/Tabs/AdminTab/BanWindow.xaml.cs | 2 +- .../UI/Tabs/AdminTab/PlayerActionsWindow.xaml | 4 +-- .../Tabs/AdminTab/PlayerActionsWindow.xaml.cs | 2 +- .../UI/Tabs/AdminTab/TeleportWindow.xaml | 4 +-- .../UI/Tabs/AdminTab/TeleportWindow.xaml.cs | 2 +- .../Tabs/AdminbusTab/StationEventsWindow.xaml | 4 +-- .../AdminbusTab/StationEventsWindow.xaml.cs | 2 +- .../UI/Tabs/AtmosTab/AddAtmosWindow.xaml | 4 +-- .../UI/Tabs/AtmosTab/AddAtmosWindow.xaml.cs | 2 +- .../UI/Tabs/AtmosTab/AddGasWindow.xaml | 4 +-- .../UI/Tabs/AtmosTab/AddGasWindow.xaml.cs | 2 +- .../UI/Tabs/AtmosTab/FillGasWindow.xaml | 4 +-- .../UI/Tabs/AtmosTab/FillGasWindow.xaml.cs | 2 +- .../Tabs/AtmosTab/SetTemperatureWindow.xaml | 4 +-- .../AtmosTab/SetTemperatureWindow.xaml.cs | 2 +- Content.Client/Arcade/BlockGameMenu.cs | 2 +- .../Arcade/SpaceVillainArcadeMenu.cs | 2 +- .../Atmos/Monitor/UI/AirAlarmWindow.xaml | 4 +-- .../Atmos/Monitor/UI/AirAlarmWindow.xaml.cs | 2 +- Content.Client/Atmos/UI/GasAnalyzerMenu.cs | 2 +- .../Atmos/UI/GasCanisterWindow.xaml | 4 +-- .../Atmos/UI/GasCanisterWindow.xaml.cs | 2 +- Content.Client/Atmos/UI/GasFilterWindow.xaml | 4 +-- .../Atmos/UI/GasFilterWindow.xaml.cs | 2 +- Content.Client/Atmos/UI/GasMixerWindow.xaml | 4 +-- .../Atmos/UI/GasMixerWindow.xaml.cs | 2 +- .../Atmos/UI/GasPressurePumpWindow.xaml | 4 +-- .../Atmos/UI/GasPressurePumpWindow.xaml.cs | 2 +- .../Atmos/UI/GasVolumePumpWindow.xaml | 4 +-- .../Atmos/UI/GasVolumePumpWindow.xaml.cs | 2 +- Content.Client/Body/UI/BodyScannerDisplay.cs | 2 +- Content.Client/Cargo/UI/CargoConsoleMenu.xaml | 4 +-- .../Cargo/UI/CargoConsoleMenu.xaml.cs | 2 +- .../Cargo/UI/CargoConsoleOrderMenu.xaml | 4 +-- .../Cargo/UI/CargoConsoleOrderMenu.xaml.cs | 2 +- .../Cargo/UI/GalacticBankSelectionMenu.cs | 2 +- .../MagicMirrorBoundUserInterface.cs | 2 +- .../CharacterInterfaceComponent.cs | 2 +- .../CharacterInterfaceSystem.cs | 4 +-- .../Chemistry/UI/ChemMasterWindow.xaml | 4 +-- .../Chemistry/UI/ChemMasterWindow.xaml.cs | 4 +-- .../Chemistry/UI/ReagentDispenserWindow.xaml | 4 +-- .../UI/ReagentDispenserWindow.xaml.cs | 2 +- .../Chemistry/UI/TransferAmountWindow.xaml | 4 +-- .../Chemistry/UI/TransferAmountWindow.xaml.cs | 2 +- .../Cloning/UI/AcceptCloningWindow.cs | 2 +- Content.Client/Cloning/UI/CloningPodWindow.cs | 2 +- .../UI/CommunicationsConsoleMenu.cs | 2 +- .../Configurable/UI/ConfigurationMenu.cs | 2 +- .../Construction/UI/ConstructionMenu.xaml | 4 +-- .../Construction/UI/ConstructionMenu.xaml.cs | 2 +- Content.Client/Crayon/UI/CrayonWindow.xaml | 4 +-- Content.Client/Crayon/UI/CrayonWindow.xaml.cs | 2 +- Content.Client/Credits/CreditsWindow.xaml | 4 +-- Content.Client/Credits/CreditsWindow.xaml.cs | 2 +- .../Disposal/UI/DisposalRouterWindow.xaml | 4 +-- .../Disposal/UI/DisposalRouterWindow.xaml.cs | 2 +- .../Disposal/UI/DisposalTaggerWindow.xaml | 4 +-- .../Disposal/UI/DisposalTaggerWindow.xaml.cs | 2 +- .../Disposal/UI/DisposalUnitWindow.xaml | 4 +-- .../Disposal/UI/DisposalUnitWindow.xaml.cs | 2 +- Content.Client/EscapeMenu/UI/EscapeMenu.xaml | 4 +-- .../EscapeMenu/UI/EscapeMenu.xaml.cs | 2 +- Content.Client/EscapeMenu/UI/OptionsMenu.xaml | 4 +-- .../EscapeMenu/UI/OptionsMenu.xaml.cs | 2 +- .../GameTicking/Managers/ClientGameTicker.cs | 4 +-- .../Ghost/Roles/UI/GhostRoleRulesWindow.xaml | 6 ++-- .../Roles/UI/GhostRoleRulesWindow.xaml.cs | 4 +-- .../Ghost/Roles/UI/GhostRolesWindow.xaml | 4 +-- .../Ghost/Roles/UI/GhostRolesWindow.xaml.cs | 2 +- .../Ghost/Roles/UI/MakeGhostRoleWindow.xaml | 4 +-- .../Roles/UI/MakeGhostRoleWindow.xaml.cs | 2 +- .../Ghost/UI/GhostTargetWindow.xaml | 4 +-- .../Ghost/UI/GhostTargetWindow.xaml.cs | 2 +- Content.Client/Info/RulesAndInfoWindow.cs | 2 +- .../Instruments/UI/InstrumentMenu.xaml | 4 +-- .../Instruments/UI/InstrumentMenu.xaml.cs | 2 +- .../Inventory/ClientInventoryComponent.cs | 2 +- .../Inventory/ClientInventorySystem.cs | 6 ++-- Content.Client/Kitchen/UI/GrinderMenu.xaml | 4 +-- Content.Client/Kitchen/UI/GrinderMenu.xaml.cs | 2 +- Content.Client/Kitchen/UI/MicrowaveMenu.xaml | 4 +-- .../Kitchen/UI/MicrowaveMenu.xaml.cs | 2 +- .../Labels/UI/HandLabelerWindow.xaml | 4 +-- .../Labels/UI/HandLabelerWindow.xaml.cs | 2 +- Content.Client/LateJoin/LateJoinGui.cs | 2 +- Content.Client/Lathe/UI/LatheMenu.cs | 2 +- Content.Client/Lathe/UI/LatheQueueMenu.cs | 2 +- .../Lobby/UI/LobbyCharacterPreviewPanel.cs | 1 - .../Lobby/UI/ObserveWarningWindow.xaml | 4 +-- .../Lobby/UI/ObserveWarningWindow.xaml.cs | 2 +- .../UI/SignalPortSelectorMenu.xaml | 4 +-- .../UI/SignalPortSelectorMenu.xaml.cs | 2 +- .../CrewMonitoring/CrewMonitoringWindow.xaml | 4 +-- .../CrewMonitoringWindow.xaml.cs | 2 +- .../UI/MedicalScannerWindow.xaml | 4 +-- .../UI/MedicalScannerWindow.xaml.cs | 2 +- Content.Client/Nuke/NukeMenu.xaml | 4 +-- Content.Client/Nuke/NukeMenu.xaml.cs | 2 +- Content.Client/PDA/PDAMenu.xaml | 4 +-- Content.Client/PDA/PDAMenu.xaml.cs | 2 +- Content.Client/Paper/UI/PaperWindow.xaml | 4 +-- Content.Client/Paper/UI/PaperWindow.xaml.cs | 2 +- Content.Client/Power/APC/UI/ApcMenu.xaml | 4 +-- Content.Client/Power/APC/UI/ApcMenu.xaml.cs | 2 +- Content.Client/Power/SolarControlWindow.xaml | 4 +-- .../Power/SolarControlWindow.xaml.cs | 2 +- .../UI/ResearchClientServerSelectionMenu.xaml | 4 +-- .../ResearchClientServerSelectionMenu.xaml.cs | 2 +- .../Research/UI/ResearchConsoleMenu.xaml | 4 +-- .../Research/UI/ResearchConsoleMenu.xaml.cs | 2 +- .../RoundEnd/RoundEndSummaryWindow.cs | 2 +- Content.Client/Sandbox/SandboxManager.cs | 2 +- .../Storage/ClientStorageComponent.cs | 2 +- Content.Client/Strip/StrippingMenu.cs | 2 +- Content.Client/Stylesheets/StyleBase.cs | 6 ++-- Content.Client/Stylesheets/StyleNano.cs | 34 +++++++++---------- Content.Client/Tabletop/TabletopSystem.cs | 2 +- .../Tabletop/UI/TabletopWindow.xaml | 4 +-- .../Tabletop/UI/TabletopWindow.xaml.cs | 2 +- Content.Client/Traitor/Uplink/UplinkMenu.xaml | 4 +-- .../Traitor/Uplink/UplinkMenu.xaml.cs | 4 +-- .../Traitor/Uplink/UplinkWithdrawWindow.xaml | 4 +-- .../Uplink/UplinkWithdrawWindow.xaml.cs | 2 +- .../Atmos/GasTank/GasTankWindow.cs | 2 +- .../UI/VendingMachineMenu.xaml | 4 +-- .../UI/VendingMachineMenu.xaml.cs | 2 +- Content.Client/Wires/UI/WiresMenu.cs | 2 +- .../Combat/Melee/SwingMeleeWeaponOperator.cs | 4 +-- .../AI/Pathfinding/PathfindingSystem.cs | 10 +++--- .../AI/Utility/NpcBehaviorManager.cs | 1 - .../States/Inventory/EquippedEntityState.cs | 2 +- .../AME/Components/AMEControllerComponent.cs | 6 ++-- .../Atmos/Components/GasAnalyzerComponent.cs | 4 +-- .../Components/MovedByPressureComponent.cs | 7 ++-- .../Atmos/EntitySystems/AirtightSystem.cs | 1 - .../Botany/Components/PlantHolderComponent.cs | 2 +- .../Chat/Commands/SuicideCommand.cs | 2 +- .../Components/ChemMasterComponent.cs | 2 +- .../Components/ReagentDispenserComponent.cs | 2 +- .../ReactionEffects/AreaReactionEffect.cs | 9 +---- .../Climbing/Components/ClimbableComponent.cs | 2 +- .../Climbing/Components/ClimbingComponent.cs | 4 +-- .../ConstructionSystem.Initial.cs | 4 +-- .../Components/DisposalRouterComponent.cs | 2 +- .../Components/DisposalTaggerComponent.cs | 2 +- Content.Server/DoAfter/DoAfter.cs | 4 +-- .../EntitySystems/ExplosionSystem.cs | 8 ++++- .../Explosion/EntitySystems/TriggerSystem.cs | 1 - .../GameTicking/GameTicker.Lobby.cs | 2 +- .../GameTicking/Rules/GameRuleSystem.cs | 2 +- .../Hands/Components/HandsComponent.cs | 2 +- .../Interaction/InteractionSystem.cs | 2 +- .../Inventory/ServerInventorySystem.cs | 2 +- .../Kitchen/Components/MicrowaveComponent.cs | 2 +- .../Components/MaterialStorageComponent.cs | 26 +++++++------- Content.Server/MoMMI/MoMMILink.cs | 8 ++--- .../EntitySystems/ExtensionCableSystem.cs | 3 +- .../Shuttles/EntitySystems/ShuttleSystem.cs | 7 +++- .../Components/ServerStorageComponent.cs | 4 +-- Content.Server/Strip/StrippableComponent.cs | 6 ++-- .../Ranged/ServerRangedWeaponComponent.cs | 2 +- Content.Server/WireHacking/WiresComponent.cs | 2 +- .../Reaction/SharedChemicalReactionSystem.cs | 20 +++++------ .../Climbing/SharedClimbingComponent.cs | 6 ++-- Content.Shared/Throwing/ThrownItemSystem.cs | 15 ++++---- 191 files changed, 341 insertions(+), 340 deletions(-) diff --git a/Content.Benchmarks/DynamicTreeBenchmark.cs b/Content.Benchmarks/DynamicTreeBenchmark.cs index 9b42061a1c..9dff449809 100644 --- a/Content.Benchmarks/DynamicTreeBenchmark.cs +++ b/Content.Benchmarks/DynamicTreeBenchmark.cs @@ -1,4 +1,4 @@ -using BenchmarkDotNet.Attributes; +using BenchmarkDotNet.Attributes; using Robust.Shared.Maths; using Robust.Shared.Physics; @@ -7,7 +7,7 @@ namespace Content.Benchmarks [SimpleJob, MemoryDiagnoser] public class DynamicTreeBenchmark { - private static readonly Box2[] aabbs1 = + private static readonly Box2[] _aabbs1 = { ((Box2) default).Enlarged(1), //2x2 square ((Box2) default).Enlarged(2), //4x4 square @@ -37,11 +37,11 @@ namespace Content.Benchmarks public void Setup() { _b2Tree = new B2DynamicTree(); - _tree = new DynamicTree((in int value) => aabbs1[value], capacity: 16); + _tree = new DynamicTree((in int value) => _aabbs1[value], capacity: 16); - for (var i = 0; i < aabbs1.Length; i++) + for (var i = 0; i < _aabbs1.Length; i++) { - var aabb = aabbs1[i]; + var aabb = _aabbs1[i]; _b2Tree.CreateProxy(aabb, i); _tree.Add(i); } diff --git a/Content.Client/AI/ClientPathfindingDebugSystem.cs b/Content.Client/AI/ClientPathfindingDebugSystem.cs index 1068bcae54..428fbeffeb 100644 --- a/Content.Client/AI/ClientPathfindingDebugSystem.cs +++ b/Content.Client/AI/ClientPathfindingDebugSystem.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using Content.Shared.AI; @@ -18,7 +18,6 @@ namespace Content.Client.AI #if DEBUG public class ClientPathfindingDebugSystem : EntitySystem { - [Dependency] private readonly IOverlayManager _overlayManager = default!; [Dependency] private readonly IPrototypeManager _prototypeManager = default!; [Dependency] private readonly IEyeManager _eyeManager = default!; [Dependency] private readonly IPlayerManager _playerManager = default!; diff --git a/Content.Client/AME/UI/AMEWindow.xaml b/Content.Client/AME/UI/AMEWindow.xaml index bc1e7d9ded..8769e3124e 100644 --- a/Content.Client/AME/UI/AMEWindow.xaml +++ b/Content.Client/AME/UI/AMEWindow.xaml @@ -1,4 +1,4 @@ - @@ -43,4 +43,4 @@ - + diff --git a/Content.Client/AME/UI/AMEWindow.xaml.cs b/Content.Client/AME/UI/AMEWindow.xaml.cs index 90c345faf7..83f7b354db 100644 --- a/Content.Client/AME/UI/AMEWindow.xaml.cs +++ b/Content.Client/AME/UI/AMEWindow.xaml.cs @@ -12,7 +12,7 @@ using static Content.Shared.AME.SharedAMEControllerComponent; namespace Content.Client.AME.UI { [GenerateTypedNameReferences] - public partial class AMEWindow : SS14Window + public partial class AMEWindow : DefaultWindow { public AMEWindow(AMEControllerBoundUserInterface ui) { diff --git a/Content.Client/Access/UI/IdCardConsoleWindow.xaml b/Content.Client/Access/UI/IdCardConsoleWindow.xaml index b384e448fa..5c47218870 100644 --- a/Content.Client/Access/UI/IdCardConsoleWindow.xaml +++ b/Content.Client/Access/UI/IdCardConsoleWindow.xaml @@ -1,4 +1,4 @@ - @@ -27,4 +27,4 @@ - + diff --git a/Content.Client/Access/UI/IdCardConsoleWindow.xaml.cs b/Content.Client/Access/UI/IdCardConsoleWindow.xaml.cs index e835c7e6f7..c6be90059f 100644 --- a/Content.Client/Access/UI/IdCardConsoleWindow.xaml.cs +++ b/Content.Client/Access/UI/IdCardConsoleWindow.xaml.cs @@ -13,7 +13,7 @@ using static Content.Shared.Access.Components.SharedIdCardConsoleComponent; namespace Content.Client.Access.UI { [GenerateTypedNameReferences] - public partial class IdCardConsoleWindow : SS14Window + public partial class IdCardConsoleWindow : DefaultWindow { private readonly IdCardConsoleBoundUserInterface _owner; diff --git a/Content.Client/Actions/UI/ActionMenu.cs b/Content.Client/Actions/UI/ActionMenu.cs index bb7f996ad0..dfce37feb8 100644 --- a/Content.Client/Actions/UI/ActionMenu.cs +++ b/Content.Client/Actions/UI/ActionMenu.cs @@ -27,7 +27,7 @@ namespace Content.Client.Actions.UI /// Action selection menu, allows filtering and searching over all possible /// actions and populating those actions into the hotbar. /// - public class ActionMenu : SS14Window + public class ActionMenu : DefaultWindow { private const string ItemTag = "item"; private const string NotItemTag = "not item"; diff --git a/Content.Client/Administration/AdminVerbSystem.cs b/Content.Client/Administration/AdminVerbSystem.cs index b787495844..6e8998cd7a 100644 --- a/Content.Client/Administration/AdminVerbSystem.cs +++ b/Content.Client/Administration/AdminVerbSystem.cs @@ -12,7 +12,6 @@ namespace Content.Client.Verbs class AdminVerbSystem : EntitySystem { [Dependency] private readonly IClientConGroupController _clientConGroupController = default!; - [Dependency] private readonly IViewVariablesManager _viewVariablesManager = default!; [Dependency] private readonly IClientConsoleHost _clientConsoleHost = default!; public override void Initialize() diff --git a/Content.Client/Administration/UI/AdminAnnounceWindow.xaml b/Content.Client/Administration/UI/AdminAnnounceWindow.xaml index 20c64f827d..bb5c29bc78 100644 --- a/Content.Client/Administration/UI/AdminAnnounceWindow.xaml +++ b/Content.Client/Administration/UI/AdminAnnounceWindow.xaml @@ -1,4 +1,4 @@ - @@ -12,4 +12,4 @@