Refactor UpdateKinematics() and fix a lot of Content warnings (#1709)

Most warnings were related to EntityQuery and IPhysicsComponent.
Partially fixes #1650 and fixes #1682
This commit is contained in:
Vince
2020-08-16 05:38:35 +02:00
committed by GitHub
parent 8503ab157a
commit b647ad0f42
29 changed files with 65 additions and 151 deletions

View File

@@ -14,7 +14,6 @@ using Robust.Shared.GameObjects;
using Robust.Shared.GameObjects.Components;
using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.Map;
using Robust.Shared.Interfaces.Random;
using Robust.Shared.IoC;
using Robust.Shared.Serialization;
@@ -29,7 +28,6 @@ namespace Content.Server.GameObjects.Components.Items.Storage
public override uint? NetID => ContentNetIDs.ITEM;
#pragma warning disable 649
[Dependency] private readonly IRobustRandom _robustRandom;
[Dependency] private readonly IMapManager _mapManager;
#pragma warning restore 649
@@ -93,7 +91,7 @@ namespace Content.Server.GameObjects.Components.Items.Storage
return false;
}
if (Owner.TryGetComponent(out PhysicsComponent physics) &&
if (Owner.TryGetComponent(out CollidableComponent physics) &&
physics.Anchored)
{
return false;