Fix some build warnings (#2226)
Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
This commit is contained in:
@@ -23,10 +23,7 @@ namespace Content.Client.GameObjects.Components.Suspicion
|
|||||||
[Dependency] private readonly IGameHud _gameHud = default!;
|
[Dependency] private readonly IGameHud _gameHud = default!;
|
||||||
[Dependency] private readonly IEntityManager _entityManager = default!;
|
[Dependency] private readonly IEntityManager _entityManager = default!;
|
||||||
[Dependency] private readonly IOverlayManager _overlayManager = default!;
|
[Dependency] private readonly IOverlayManager _overlayManager = default!;
|
||||||
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
|
|
||||||
[Dependency] private readonly IResourceCache _resourceCache = default!;
|
[Dependency] private readonly IResourceCache _resourceCache = default!;
|
||||||
[Dependency] private readonly IComponentManager _componentManager = default!;
|
|
||||||
[Dependency] private readonly IInputManager _inputManager = default!;
|
|
||||||
[Dependency] private readonly IEyeManager _eyeManager = default!;
|
[Dependency] private readonly IEyeManager _eyeManager = default!;
|
||||||
|
|
||||||
private SuspicionGui? _gui;
|
private SuspicionGui? _gui;
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ namespace Content.Client.GameObjects.EntitySystems
|
|||||||
internal sealed class AtmosDebugOverlaySystem : SharedAtmosDebugOverlaySystem
|
internal sealed class AtmosDebugOverlaySystem : SharedAtmosDebugOverlaySystem
|
||||||
{
|
{
|
||||||
[Dependency] private readonly IMapManager _mapManager = default!;
|
[Dependency] private readonly IMapManager _mapManager = default!;
|
||||||
[Dependency] private readonly IResourceCache _resourceCache = default!;
|
|
||||||
|
|
||||||
private Dictionary<GridId, AtmosDebugOverlayMessage> _tileData =
|
private Dictionary<GridId, AtmosDebugOverlayMessage> _tileData =
|
||||||
new Dictionary<GridId, AtmosDebugOverlayMessage>();
|
new Dictionary<GridId, AtmosDebugOverlayMessage>();
|
||||||
|
|||||||
@@ -78,7 +78,10 @@ namespace Content.Client.UserInterface
|
|||||||
grid.MapToGrid(mousePosWorld), args.PointerLocation, item.Uid);
|
grid.MapToGrid(mousePosWorld), args.PointerLocation, item.Uid);
|
||||||
|
|
||||||
// client side command handlers will always be sent the local player session.
|
// client side command handlers will always be sent the local player session.
|
||||||
var session = _playerManager.LocalPlayer.Session;
|
var session = _playerManager.LocalPlayer?.Session;
|
||||||
|
if (session == null)
|
||||||
|
return false;
|
||||||
|
|
||||||
inputSys.HandleInputCommand(session, func, message);
|
inputSys.HandleInputCommand(session, func, message);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -845,7 +845,7 @@ namespace Content.Server.GameObjects.Components.Atmos
|
|||||||
{
|
{
|
||||||
Tiles.Add(indices, new TileAtmosphere(this, gridId, indices, (GasMixture)uniqueMixes![mix].Clone()));
|
Tiles.Add(indices, new TileAtmosphere(this, gridId, indices, (GasMixture)uniqueMixes![mix].Clone()));
|
||||||
}
|
}
|
||||||
catch (ArgumentOutOfRangeException e)
|
catch (ArgumentOutOfRangeException)
|
||||||
{
|
{
|
||||||
Logger.Error($"Error during atmos serialization! Tile at {indices} points to an unique mix ({mix}) out of range!");
|
Logger.Error($"Error during atmos serialization! Tile at {indices} points to an unique mix ({mix}) out of range!");
|
||||||
throw;
|
throw;
|
||||||
|
|||||||
@@ -64,7 +64,8 @@ namespace Content.Server.GameObjects.Components
|
|||||||
"This plaque commemorates the fall of the Atmos LINDA division. For all the charred, dizzy, and brittle men who have died in its hands.",
|
"This plaque commemorates the fall of the Atmos LINDA division. For all the charred, dizzy, and brittle men who have died in its hands.",
|
||||||
PlaqueType.Zas =>
|
PlaqueType.Zas =>
|
||||||
"This plaque commemorates the fall of the Atmos ZAS division. For all the charred, dizzy, and brittle men who have died in its hands.",
|
"This plaque commemorates the fall of the Atmos ZAS division. For all the charred, dizzy, and brittle men who have died in its hands.",
|
||||||
PlaqueType.Unset => "Uhm"
|
PlaqueType.Unset => "Uhm",
|
||||||
|
_ => "Uhm",
|
||||||
};
|
};
|
||||||
|
|
||||||
Owner.Name = _type switch
|
Owner.Name = _type switch
|
||||||
@@ -77,7 +78,8 @@ namespace Content.Server.GameObjects.Components
|
|||||||
"LINDA Atmospherics Division plaque",
|
"LINDA Atmospherics Division plaque",
|
||||||
PlaqueType.Zas =>
|
PlaqueType.Zas =>
|
||||||
"ZAS Atmospherics Division plaque",
|
"ZAS Atmospherics Division plaque",
|
||||||
PlaqueType.Unset => "Uhm"
|
PlaqueType.Unset => "Uhm",
|
||||||
|
_ => "Uhm",
|
||||||
};
|
};
|
||||||
|
|
||||||
if (Owner.TryGetComponent(out SpriteComponent sprite))
|
if (Owner.TryGetComponent(out SpriteComponent sprite))
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ namespace Content.Server.GameObjects.Components.Construction
|
|||||||
{
|
{
|
||||||
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
|
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
|
||||||
[Dependency] private readonly IEntityManager _entityManager = default!;
|
[Dependency] private readonly IEntityManager _entityManager = default!;
|
||||||
[Dependency] private readonly IComponentFactory _componentFactory = default!;
|
|
||||||
|
|
||||||
public override string Name => "Construction";
|
public override string Name => "Construction";
|
||||||
|
|
||||||
|
|||||||
@@ -15,8 +15,6 @@ namespace Content.Server.GameObjects.Components.Items.Storage
|
|||||||
[RegisterComponent]
|
[RegisterComponent]
|
||||||
internal sealed class StorageFillComponent : Component, IMapInit
|
internal sealed class StorageFillComponent : Component, IMapInit
|
||||||
{
|
{
|
||||||
[Dependency] private readonly IEntityManager _entityManager;
|
|
||||||
|
|
||||||
public override string Name => "StorageFill";
|
public override string Name => "StorageFill";
|
||||||
|
|
||||||
private List<PrototypeItemData> _contents;
|
private List<PrototypeItemData> _contents;
|
||||||
@@ -56,7 +54,7 @@ namespace Content.Server.GameObjects.Components.Items.Storage
|
|||||||
|
|
||||||
for (var i = 0; i < storageItem.Amount; i++)
|
for (var i = 0; i < storageItem.Amount; i++)
|
||||||
{
|
{
|
||||||
storage.Insert(_entityManager.SpawnEntity(storageItem.PrototypeName, Owner.Transform.Coordinates));
|
storage.Insert(Owner.EntityManager.SpawnEntity(storageItem.PrototypeName, Owner.Transform.Coordinates));
|
||||||
}
|
}
|
||||||
if (!string.IsNullOrEmpty(storageItem.GroupId)) alreadySpawnedGroups.Add(storageItem.GroupId);
|
if (!string.IsNullOrEmpty(storageItem.GroupId)) alreadySpawnedGroups.Add(storageItem.GroupId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ namespace Content.Server.GameObjects.Components.Mobs.Speech
|
|||||||
[RegisterComponent]
|
[RegisterComponent]
|
||||||
public class OwOAccentComponent : Component, IAccentComponent
|
public class OwOAccentComponent : Component, IAccentComponent
|
||||||
{
|
{
|
||||||
[Dependency] private readonly IRobustRandom _random;
|
[Dependency] private readonly IRobustRandom _random = default!;
|
||||||
|
|
||||||
public override string Name => "OwOAccent";
|
public override string Name => "OwOAccent";
|
||||||
|
|
||||||
|
|||||||
@@ -24,8 +24,6 @@ namespace Content.Server.GameObjects.Components.Power.ApcNetComponents
|
|||||||
[RegisterComponent]
|
[RegisterComponent]
|
||||||
public class PowerProviderComponent : BaseApcNetComponent, IPowerProvider
|
public class PowerProviderComponent : BaseApcNetComponent, IPowerProvider
|
||||||
{
|
{
|
||||||
[Dependency] private readonly IServerEntityManager _serverEntityManager;
|
|
||||||
|
|
||||||
public override string Name => "PowerProvider";
|
public override string Name => "PowerProvider";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -93,13 +91,13 @@ namespace Content.Server.GameObjects.Components.Power.ApcNetComponents
|
|||||||
|
|
||||||
private List<PowerReceiverComponent> FindAvailableReceivers()
|
private List<PowerReceiverComponent> FindAvailableReceivers()
|
||||||
{
|
{
|
||||||
var nearbyEntities = _serverEntityManager
|
var nearbyEntities = Owner.EntityManager
|
||||||
.GetEntitiesInRange(Owner, PowerTransferRange);
|
.GetEntitiesInRange(Owner, PowerTransferRange);
|
||||||
return nearbyEntities.Select(entity => entity.TryGetComponent<PowerReceiverComponent>(out var receiver) ? receiver : null)
|
return nearbyEntities.Select(entity => entity.TryGetComponent<PowerReceiverComponent>(out var receiver) ? receiver : null)
|
||||||
.Where(receiver => receiver != null)
|
.Where(receiver => receiver != null)
|
||||||
.Where(receiver => receiver.Connectable)
|
.Where(receiver => receiver.Connectable)
|
||||||
.Where(receiver => receiver.NeedsProvider)
|
.Where(receiver => receiver.NeedsProvider)
|
||||||
.Where(receiver => receiver.Owner.Transform.Coordinates.TryDistance(_serverEntityManager, Owner.Transform.Coordinates, out var distance) && distance < Math.Min(PowerTransferRange, receiver.PowerReceptionRange))
|
.Where(receiver => receiver.Owner.Transform.Coordinates.TryDistance(Owner.EntityManager, Owner.Transform.Coordinates, out var distance) && distance < Math.Min(PowerTransferRange, receiver.PowerReceptionRange))
|
||||||
.ToList();
|
.ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -29,8 +29,8 @@ namespace Content.Server.GameObjects.Components.Weapon.Melee
|
|||||||
private TimeSpan _lastAttackTime;
|
private TimeSpan _lastAttackTime;
|
||||||
private TimeSpan _cooldownEnd;
|
private TimeSpan _cooldownEnd;
|
||||||
|
|
||||||
private readonly string _hitSound;
|
private readonly string _hitSound = default!;
|
||||||
private readonly string _missSound;
|
private readonly string _missSound = default!;
|
||||||
public float ArcCooldownTime { get; private set; } = 1f;
|
public float ArcCooldownTime { get; private set; } = 1f;
|
||||||
public float CooldownTime { get; private set; } = 0.5f;
|
public float CooldownTime { get; private set; } = 0.5f;
|
||||||
|
|
||||||
@@ -93,7 +93,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Melee
|
|||||||
var entities = ArcRayCast(eventArgs.User.Transform.WorldPosition, angle, eventArgs.User);
|
var entities = ArcRayCast(eventArgs.User.Transform.WorldPosition, angle, eventArgs.User);
|
||||||
|
|
||||||
var audioSystem = EntitySystem.Get<AudioSystem>();
|
var audioSystem = EntitySystem.Get<AudioSystem>();
|
||||||
if (entities.Count() != 0)
|
if (entities.Count != 0)
|
||||||
{
|
{
|
||||||
audioSystem.PlayFromEntity( _hitSound, entities.First());
|
audioSystem.PlayFromEntity( _hitSound, entities.First());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ namespace Content.Server.StationEvents
|
|||||||
// Based on Goonstation style radiation storm with some TG elements (announcer, etc.)
|
// Based on Goonstation style radiation storm with some TG elements (announcer, etc.)
|
||||||
|
|
||||||
[Dependency] private IEntityManager _entityManager = default!;
|
[Dependency] private IEntityManager _entityManager = default!;
|
||||||
[Dependency] private IMapManager _mapManager = default!;
|
|
||||||
[Dependency] private IRobustRandom _robustRandom = default!;
|
[Dependency] private IRobustRandom _robustRandom = default!;
|
||||||
|
|
||||||
public override string Name => "RadiationStorm";
|
public override string Name => "RadiationStorm";
|
||||||
@@ -72,7 +71,6 @@ namespace Content.Server.StationEvents
|
|||||||
|
|
||||||
// IOC uninject?
|
// IOC uninject?
|
||||||
_entityManager = null;
|
_entityManager = null;
|
||||||
_mapManager = null;
|
|
||||||
_robustRandom = null;
|
_robustRandom = null;
|
||||||
|
|
||||||
var componentManager = IoCManager.Resolve<IComponentManager>();
|
var componentManager = IoCManager.Resolve<IComponentManager>();
|
||||||
|
|||||||
Reference in New Issue
Block a user