Fix compiler warnings.

This commit is contained in:
Pieter-Jan Briers
2020-11-11 01:48:54 +01:00
parent 0918e14827
commit 9e36ef2202
14 changed files with 8 additions and 16 deletions

View File

@@ -47,7 +47,6 @@ namespace Content.Client
[Dependency] private readonly IEscapeMenuOwner _escapeMenuOwner = default!;
[Dependency] private readonly IGameController _gameController = default!;
[Dependency] private readonly IStateManager _stateManager = default!;
[Dependency] private readonly IConfigurationManager _configurationManager = default!;
public override void Init()
{

View File

@@ -17,7 +17,6 @@ namespace Content.Server.Atmos
public class HighPressureMovementController : FrictionController
{
[Dependency] private IRobustRandom _robustRandom = default!;
[Dependency] private IPhysicsManager _physicsManager = default!;
public override IPhysicsComponent? ControlledComponent { protected get; set; }
private const float MoveForcePushRatio = 1f;

View File

@@ -43,7 +43,6 @@ namespace Content.Server.GameObjects.Components.Atmos
private int _integrity = 3;
[Dependency] private readonly IEntityManager _entityManager = default!;
[ViewVariables] private BoundUserInterface? _userInterface;
[ViewVariables] public GasMixture? Air { get; set; }

View File

@@ -20,7 +20,6 @@ namespace Content.Server.GameObjects.Components.Damage
public class DestructibleComponent : RuinableComponent, IDestroyAct
{
[Dependency] private readonly IEntitySystemManager _entitySystemManager = default!;
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
[Dependency] private readonly IRobustRandom _random = default!;
protected ActSystem ActSystem;

View File

@@ -20,7 +20,6 @@ namespace Content.Server.GameObjects.Components.Damage
[ComponentReference(typeof(IDamageableComponent))]
public abstract class RuinableComponent : DamageableComponent
{
[Dependency] private IRobustRandom _random = default!;
/// <summary>
/// Sound played upon destruction.
/// </summary>

View File

@@ -27,7 +27,6 @@ namespace Content.Server.GameObjects.Components.Singularity
public class ContainmentFieldGeneratorComponent : Component, ICollideBehavior
{
[Dependency] private IPhysicsManager _physicsManager = null!;
[Dependency] private IEntityManager _entityManager = null!;
public override string Name => "ContainmentFieldGenerator";

View File

@@ -38,8 +38,8 @@ namespace Content.Server.GameObjects.Components.Singularity
[Dependency] private readonly IEntityManager _entityManager = default!;
[Dependency] private readonly IRobustRandom _robustRandom = default!;
[ComponentDependency] private AppearanceComponent? _appearance;
[ComponentDependency] private AccessReader? _accessReader;
[ComponentDependency] private AppearanceComponent? _appearance = default;
[ComponentDependency] private AccessReader? _accessReader = default;
public override string Name => "Emitter";

View File

@@ -30,7 +30,6 @@ namespace Content.Server.GameObjects.Components.Singularity
public class SingularityComponent : Component, ICollideBehavior
{
[Dependency] private IEntityManager _entityManager = null!;
[Dependency] private IMapManager _mapManager = null!;
[Dependency] private IRobustRandom _random = null!;

View File

@@ -39,7 +39,6 @@ namespace Content.Server.GameObjects.EntitySystems.AI.Pathfinding.Accessible
*/
[Dependency] private readonly IMapManager _mapManager = default!;
[Dependency] private readonly IGameTiming _gameTiming = default!;
[Dependency] private readonly IEntityManager _entityManager = default!;
private PathfindingSystem _pathfindingSystem;
@@ -717,7 +716,7 @@ namespace Content.Server.GameObjects.EntitySystems.AI.Pathfinding.Accessible
foreach (var node in region.Nodes)
{
var nodeVector = grid.GridTileToLocal(node.TileRef.GridIndices).ToMapPos(_entityManager);
var nodeVector = grid.GridTileToLocal(node.TileRef.GridIndices).ToMapPos(EntityManager);
debugRegionNodes.Add(nodeVector);
}
@@ -746,7 +745,7 @@ namespace Content.Server.GameObjects.EntitySystems.AI.Pathfinding.Accessible
foreach (var node in region.Nodes)
{
var nodeVector = grid.GridTileToLocal(node.TileRef.GridIndices).ToMapPos(_entityManager);
var nodeVector = grid.GridTileToLocal(node.TileRef.GridIndices).ToMapPos(EntityManager);
debugResult[_runningCacheIdx].Add(nodeVector);
}

View File

@@ -11,7 +11,9 @@ namespace Content.Server.GameObjects.EntitySystems.AI.Pathfinding.Pathfinders
{
public class AStarPathfindingJob : Job<Queue<TileRef>>
{
#if DEBUG
public static event Action<SharedAiDebug.AStarRouteDebug> DebugRoute;
#endif
private PathfindingNode _startNode;
private PathfindingNode _endNode;

View File

@@ -15,7 +15,9 @@ namespace Content.Server.GameObjects.EntitySystems.AI.Pathfinding.Pathfinders
{
// Some of this is probably fugly due to other structural changes in pathfinding so it could do with optimisation
// Realistically it's probably not getting used given it doesn't support tile costs which can be very useful
#if DEBUG
public static event Action<SharedAiDebug.JpsRouteDebug> DebugRoute;
#endif
private PathfindingNode _startNode;
private PathfindingNode _endNode;

View File

@@ -17,7 +17,6 @@ namespace Content.Server.GameObjects.EntitySystems
{
[Dependency] private readonly IComponentManager _componentManager = default!;
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
[Dependency] private readonly IGameTiming _gameTiming = default!;
private int _nextUid = 0;
private readonly Dictionary<int, Seed> _seeds = new Dictionary<int,Seed>();

View File

@@ -23,7 +23,6 @@ namespace Content.Shared.GameObjects.EntitySystems
{
[Dependency] private readonly IEntityManager _entityManager = default!;
[Dependency] protected readonly IPhysicsManager PhysicsManager = default!;
[Dependency] private readonly IConfigurationManager _configurationManager = default!;
public override void Initialize()
{

View File

@@ -9,8 +9,6 @@ namespace Content.Shared.Physics
{
public class ThrowKnockbackController : VirtualController
{
[Dependency] private readonly IPhysicsManager _physicsManager = default!;
public ThrowKnockbackController()
{
IoCManager.InjectDependencies(this);