Revert "Physics (#3452)"

This reverts commit 3e64fd56a1.
This commit is contained in:
Pieter-Jan Briers
2021-02-28 18:49:48 +01:00
parent eddec5fcce
commit 1eb0fbd8d0
211 changed files with 2560 additions and 2600 deletions

View File

@@ -2,7 +2,6 @@
using Content.Shared.Construction;
using JetBrains.Annotations;
using Robust.Shared.GameObjects;
using Robust.Shared.Physics;
using Robust.Shared.Serialization;
using Robust.Shared.Utility;
@@ -20,21 +19,21 @@ namespace Content.Server.Construction.Conditions
public async Task<bool> Condition(IEntity entity)
{
if (!entity.TryGetComponent(out IPhysBody physics)) return false;
if (!entity.TryGetComponent(out IPhysicsComponent physics)) return false;
return (physics.BodyType == BodyType.Static && Anchored) || (physics.BodyType != BodyType.Static && !Anchored);
return physics.Anchored == Anchored;
}
public bool DoExamine(IEntity entity, FormattedMessage message, bool inDetailsRange)
{
if (!entity.TryGetComponent(out IPhysBody physics)) return false;
if (!entity.TryGetComponent(out IPhysicsComponent physics)) return false;
switch (Anchored)
{
case true when physics.BodyType == BodyType.Static:
case true when !physics.Anchored:
message.AddMarkup("First, anchor it.\n");
return true;
case false when physics.BodyType == BodyType.Static:
case false when physics.Anchored:
message.AddMarkup("First, unanchor it.\n");
return true;
}