Reduced Warning Count By 130 For Full Rebuilds (#26518)
* remove deprecated entity coordinate extension functions. Reduces warning count by approximately 50 * final toCoords Removed * Remove all unused variables and dead code paths * remove always true variable, should be a cvar or something instead * remove superfluous variables from tests
This commit is contained in:
@@ -34,7 +34,6 @@ public sealed partial class ClimbSystem : VirtualController
|
||||
[Dependency] private readonly DamageableSystem _damageableSystem = default!;
|
||||
[Dependency] private readonly FixtureSystem _fixtureSystem = default!;
|
||||
[Dependency] private readonly SharedAudioSystem _audio = default!;
|
||||
[Dependency] private readonly SharedBodySystem _bodySystem = default!;
|
||||
[Dependency] private readonly SharedDoAfterSystem _doAfterSystem = default!;
|
||||
[Dependency] private readonly SharedInteractionSystem _interactionSystem = default!;
|
||||
[Dependency] private readonly SharedPopupSystem _popupSystem = default!;
|
||||
|
||||
@@ -114,8 +114,7 @@ public abstract class SharedFlatpackSystem : EntitySystem
|
||||
if (!Resolve(ent, ref ent.Comp))
|
||||
return;
|
||||
|
||||
EntProtoId machinePrototypeId;
|
||||
string? entityPrototype;
|
||||
var machinePrototypeId = new EntProtoId();
|
||||
if (TryComp<MachineBoardComponent>(board, out var machineBoard) && machineBoard.Prototype is not null)
|
||||
machinePrototypeId = machineBoard.Prototype;
|
||||
else if (TryComp<ComputerBoardComponent>(board, out var computerBoard) && computerBoard.Prototype is not null)
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using System.Numerics;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Map.Components;
|
||||
|
||||
namespace Content.Shared.Coordinates
|
||||
{
|
||||
@@ -20,17 +19,5 @@ namespace Content.Shared.Coordinates
|
||||
{
|
||||
return new EntityCoordinates(id, x, y);
|
||||
}
|
||||
|
||||
[Obsolete]
|
||||
public static EntityCoordinates ToCoordinates(this MapGridComponent grid, float x, float y)
|
||||
{
|
||||
return ToCoordinates(grid.Owner, x, y);
|
||||
}
|
||||
|
||||
[Obsolete]
|
||||
public static EntityCoordinates ToCoordinates(this MapGridComponent grid)
|
||||
{
|
||||
return ToCoordinates(grid.Owner, Vector2.Zero);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,6 @@ public sealed class TurfSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly EntityLookupSystem _entityLookup = default!;
|
||||
[Dependency] private readonly SharedTransformSystem _transform = default!;
|
||||
[Dependency] private readonly IMapManager _mapMan = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if a given tile is blocked by physics-enabled entities.
|
||||
|
||||
@@ -25,7 +25,6 @@ namespace Content.Shared.RCD.Systems;
|
||||
public sealed class RCDSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly IGameTiming _timing = default!;
|
||||
[Dependency] private readonly IMapManager _mapMan = default!;
|
||||
[Dependency] private readonly INetManager _net = default!;
|
||||
[Dependency] private readonly ISharedAdminLogManager _adminLogger = default!;
|
||||
[Dependency] private readonly ITileDefinitionManager _tileDefMan = default!;
|
||||
@@ -39,7 +38,7 @@ public sealed class RCDSystem : EntitySystem
|
||||
[Dependency] private readonly TurfSystem _turf = default!;
|
||||
[Dependency] private readonly IGameTiming _gameTiming = default!;
|
||||
|
||||
private readonly int RcdModeCount = Enum.GetValues(typeof(RcdMode)).Length;
|
||||
private readonly int _rcdModeCount = Enum.GetValues(typeof(RcdMode)).Length;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
@@ -310,7 +309,7 @@ public sealed class RCDSystem : EntitySystem
|
||||
_audio.PlayPredicted(comp.SwapModeSound, uid, user);
|
||||
|
||||
var mode = (int) comp.Mode;
|
||||
mode = ++mode % RcdModeCount;
|
||||
mode = ++mode % _rcdModeCount;
|
||||
comp.Mode = (RcdMode) mode;
|
||||
Dirty(uid, comp);
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
using Content.Shared.Interaction;
|
||||
using Content.Shared.Popups;
|
||||
using Content.Shared.Interaction.Events;
|
||||
using Content.Shared.Remotes.Components;
|
||||
@@ -8,8 +7,6 @@ namespace Content.Shared.Remotes.EntitySystems;
|
||||
public abstract class SharedDoorRemoteSystem : EntitySystem
|
||||
{
|
||||
[Dependency] protected readonly SharedPopupSystem Popup = default!;
|
||||
[Dependency] private readonly SharedInteractionSystem _interactionSystem = default!;
|
||||
// I'm so sorry [Dependency] private readonly SharedAirlockSystem _sharedAirlockSystem = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
|
||||
@@ -10,11 +10,6 @@ namespace Content.Shared.Shuttles.Components;
|
||||
[Access(typeof(SharedShuttleSystem))]
|
||||
public sealed partial class IFFComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// Should we show IFF by default?
|
||||
/// </summary>
|
||||
public const bool ShowIFFDefault = true;
|
||||
|
||||
public static readonly Color SelfColor = Color.MediumSpringGreen;
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -28,11 +28,6 @@ public abstract partial class SharedShuttleSystem
|
||||
|
||||
public string? GetIFFLabel(EntityUid gridUid, bool self = false, IFFComponent? component = null)
|
||||
{
|
||||
if (!IFFComponent.ShowIFFDefault)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
var entName = MetaData(gridUid).EntityName;
|
||||
|
||||
if (self)
|
||||
|
||||
@@ -146,7 +146,6 @@ public abstract partial class SharedShuttleSystem : EntitySystem
|
||||
|
||||
// Just checks if any grids inside of a buffer range at the target position.
|
||||
_grids.Clear();
|
||||
var ftlRange = FTLRange;
|
||||
var mapCoordinates = coordinates.ToMap(EntityManager, XformSystem);
|
||||
|
||||
var ourPos = Maps.GetGridPosition((shuttleUid, shuttlePhysics, shuttleXform));
|
||||
|
||||
@@ -102,7 +102,7 @@ public abstract partial class SharedGunSystem
|
||||
// TODO: Actions need doing for guns anyway.
|
||||
private sealed partial class CycleModeEvent : InstantActionEvent
|
||||
{
|
||||
public SelectiveFire Mode;
|
||||
public SelectiveFire Mode = default;
|
||||
}
|
||||
|
||||
private void OnCycleMode(EntityUid uid, GunComponent component, CycleModeEvent args)
|
||||
|
||||
Reference in New Issue
Block a user