diff --git a/Content.Client/GameObjects/EntitySystems/MoverSystem.cs b/Content.Client/GameObjects/EntitySystems/MoverSystem.cs index daceb2e44f..0197ed1b97 100644 --- a/Content.Client/GameObjects/EntitySystems/MoverSystem.cs +++ b/Content.Client/GameObjects/EntitySystems/MoverSystem.cs @@ -1,13 +1,11 @@ -using Content.Shared.GameObjects.Components.Movement; +using Content.Shared.GameObjects.Components.Movement; using Content.Shared.GameObjects.EntitySystems; using Content.Shared.Physics; using JetBrains.Annotations; -using Robust.Client.GameObjects; using Robust.Client.Physics; using Robust.Client.Player; using Robust.Shared.GameObjects.Components; using Robust.Shared.IoC; -using Robust.Shared.Physics; #nullable enable @@ -46,7 +44,7 @@ namespace Content.Client.GameObjects.EntitySystems FrameUpdate(frameTime); } - protected override void SetController(SharedPhysicsComponent physics) + protected override void SetController(PhysicsComponent physics) { ((PhysicsComponent)physics).SetController(); } diff --git a/Content.Server/GameObjects/Components/AnchorableComponent.cs b/Content.Server/GameObjects/Components/AnchorableComponent.cs index 00a2bca713..ef98de532a 100644 --- a/Content.Server/GameObjects/Components/AnchorableComponent.cs +++ b/Content.Server/GameObjects/Components/AnchorableComponent.cs @@ -1,13 +1,8 @@ -using Content.Server.GameObjects.Components.Interactable; +using Content.Server.GameObjects.Components.Interactable; using Content.Server.GameObjects.EntitySystems; using Content.Shared.GameObjects.Components.Interactable; -using Robust.Server.GameObjects; -using Robust.Server.GameObjects.EntitySystems; using Robust.Shared.GameObjects; -using Robust.Shared.GameObjects.Systems; -using Robust.Shared.Interfaces.GameObjects; -using Robust.Shared.IoC; -using Robust.Shared.Utility; +using Robust.Shared.GameObjects.Components; namespace Content.Server.GameObjects.Components { diff --git a/Content.Server/GameObjects/Components/GUI/ServerHandsComponent.cs b/Content.Server/GameObjects/Components/GUI/ServerHandsComponent.cs index 32ffcd0e82..0b8a492592 100644 --- a/Content.Server/GameObjects/Components/GUI/ServerHandsComponent.cs +++ b/Content.Server/GameObjects/Components/GUI/ServerHandsComponent.cs @@ -10,8 +10,8 @@ using Content.Shared.GameObjects; using Robust.Server.GameObjects; using Robust.Server.GameObjects.Components.Container; using Robust.Server.GameObjects.EntitySystemMessages; -using Robust.Server.Interfaces.Player; using Robust.Shared.GameObjects; +using Robust.Shared.GameObjects.Components; using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.Network; using Robust.Shared.IoC; diff --git a/Content.Server/GameObjects/Components/Items/Storage/ItemComponent.cs b/Content.Server/GameObjects/Components/Items/Storage/ItemComponent.cs index e352f9b42e..054a557938 100644 --- a/Content.Server/GameObjects/Components/Items/Storage/ItemComponent.cs +++ b/Content.Server/GameObjects/Components/Items/Storage/ItemComponent.cs @@ -1,32 +1,21 @@ -using System; -using Content.Server.GameObjects.Components; -using Content.Server.GameObjects.Components.Destructible; -using Content.Server.GameObjects.EntitySystems; +using Content.Server.GameObjects.EntitySystems; using Content.Server.Interfaces.GameObjects; using Content.Server.Throw; using Content.Server.Utility; using Content.Shared.GameObjects; using Content.Shared.GameObjects.Components.Items; using Content.Shared.GameObjects.EntitySystems; -using Content.Shared.Physics; -using Robust.Server.GameObjects; using Robust.Server.Interfaces.GameObjects; using Robust.Shared.Containers; using Robust.Shared.GameObjects; using Robust.Shared.GameObjects.Components; -using Robust.Shared.GameObjects.Systems; using Robust.Shared.Interfaces.GameObjects; -using Robust.Shared.Interfaces.GameObjects.Components; using Robust.Shared.Interfaces.Map; -using Robust.Shared.Interfaces.Physics; using Robust.Shared.Interfaces.Random; -using Robust.Shared.Interfaces.Timing; using Robust.Shared.IoC; using Robust.Shared.Maths; -using Robust.Shared.Physics; using Robust.Shared.Random; using Robust.Shared.Serialization; -using Robust.Shared.Utility; namespace Content.Server.GameObjects { diff --git a/Content.Server/GameObjects/Components/Movement/AiControllerComponent.cs b/Content.Server/GameObjects/Components/Movement/AiControllerComponent.cs index 61739f4029..1e48a30f04 100644 --- a/Content.Server/GameObjects/Components/Movement/AiControllerComponent.cs +++ b/Content.Server/GameObjects/Components/Movement/AiControllerComponent.cs @@ -1,7 +1,7 @@ using Content.Shared.GameObjects.Components.Movement; using Robust.Server.AI; -using Robust.Server.GameObjects; using Robust.Shared.GameObjects; +using Robust.Shared.GameObjects.Components; using Robust.Shared.Map; using Robust.Shared.Maths; using Robust.Shared.Serialization; diff --git a/Content.Server/GameObjects/Components/Projectiles/ProjectileComponent.cs b/Content.Server/GameObjects/Components/Projectiles/ProjectileComponent.cs index f3598eddb5..c571a352a4 100644 --- a/Content.Server/GameObjects/Components/Projectiles/ProjectileComponent.cs +++ b/Content.Server/GameObjects/Components/Projectiles/ProjectileComponent.cs @@ -1,14 +1,11 @@ using System.Collections.Generic; using Content.Server.GameObjects.Components.Mobs; using Content.Shared.GameObjects; -using Robust.Server.GameObjects; using Robust.Server.GameObjects.EntitySystems; using Robust.Shared.GameObjects; using Robust.Shared.GameObjects.Components; using Robust.Shared.GameObjects.Systems; using Robust.Shared.Interfaces.GameObjects; -using Robust.Shared.IoC; -using Robust.Shared.Map; using Robust.Shared.Physics; using Robust.Shared.Serialization; using Robust.Shared.ViewVariables; diff --git a/Content.Server/GameObjects/Components/RotatableComponent.cs b/Content.Server/GameObjects/Components/RotatableComponent.cs index 8ef6d6484b..2cdacd5f10 100644 --- a/Content.Server/GameObjects/Components/RotatableComponent.cs +++ b/Content.Server/GameObjects/Components/RotatableComponent.cs @@ -1,9 +1,8 @@ -using Content.Server.GameObjects.EntitySystems; -using Content.Server.Interfaces; +using Content.Server.Interfaces; using Content.Shared.GameObjects; using Content.Shared.GameObjects.EntitySystems; -using Robust.Server.GameObjects; using Robust.Shared.GameObjects; +using Robust.Shared.GameObjects.Components; using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.IoC; using Robust.Shared.Localization; diff --git a/Content.Server/GameObjects/Components/Weapon/Ranged/Barrels/ServerRangedBarrelComponent.cs b/Content.Server/GameObjects/Components/Weapon/Ranged/Barrels/ServerRangedBarrelComponent.cs index 21ed16b7b7..d074bb2ee9 100644 --- a/Content.Server/GameObjects/Components/Weapon/Ranged/Barrels/ServerRangedBarrelComponent.cs +++ b/Content.Server/GameObjects/Components/Weapon/Ranged/Barrels/ServerRangedBarrelComponent.cs @@ -1,19 +1,15 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using Content.Server.GameObjects.Components.Mobs; using Content.Server.GameObjects.Components.Projectiles; -using Content.Server.GameObjects.Components.Sound; using Content.Server.GameObjects.Components.Weapon.Ranged.Ammunition; using Content.Server.GameObjects.EntitySystems; using Content.Shared.Audio; using Content.Shared.GameObjects.Components.Weapons.Ranged; -using Content.Shared.Physics; -using Robust.Server.GameObjects; using Robust.Server.GameObjects.EntitySystems; using Robust.Shared.Audio; -using Robust.Shared.GameObjects; -using Robust.Shared.GameObjects.EntitySystemMessages; +using Robust.Shared.GameObjects.Components; using Robust.Shared.GameObjects.Systems; using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.Map; @@ -24,7 +20,6 @@ using Robust.Shared.IoC; using Robust.Shared.Log; using Robust.Shared.Map; using Robust.Shared.Maths; -using Robust.Shared.Physics; using Robust.Shared.Prototypes; using Robust.Shared.Random; using Robust.Shared.Serialization; diff --git a/Content.Server/GameObjects/EntitySystems/MoverSystem.cs b/Content.Server/GameObjects/EntitySystems/MoverSystem.cs index e9c34ee2d9..e1cdd9348f 100644 --- a/Content.Server/GameObjects/EntitySystems/MoverSystem.cs +++ b/Content.Server/GameObjects/EntitySystems/MoverSystem.cs @@ -19,7 +19,6 @@ using Robust.Shared.Interfaces.Random; using Robust.Shared.IoC; using Robust.Shared.Log; using Robust.Shared.Map; -using Robust.Shared.Physics; using Robust.Shared.Prototypes; using Robust.Shared.Random; @@ -66,7 +65,7 @@ namespace Content.Server.GameObjects.EntitySystems } var mover = entity.GetComponent(); - var physics = entity.GetComponent(); + var physics = entity.GetComponent(); if (entity.TryGetComponent(out var collider)) { UpdateKinematics(entity.Transform, mover, physics, collider); @@ -78,7 +77,7 @@ namespace Content.Server.GameObjects.EntitySystems } } - protected override void SetController(SharedPhysicsComponent physics) + protected override void SetController(PhysicsComponent physics) { ((PhysicsComponent) physics).SetController(); } diff --git a/Content.Server/Throw/ThrowHelper.cs b/Content.Server/Throw/ThrowHelper.cs index cc04d18ef6..4723f9ee8c 100644 --- a/Content.Server/Throw/ThrowHelper.cs +++ b/Content.Server/Throw/ThrowHelper.cs @@ -1,6 +1,5 @@ using Content.Server.GameObjects.Components; using Content.Shared.Physics; -using Robust.Server.GameObjects; using Robust.Shared.GameObjects.Components; using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.Map; @@ -11,10 +10,7 @@ using Robust.Shared.Map; using Robust.Shared.Maths; using Robust.Shared.Physics; using Robust.Shared.Random; -using System; using Robust.Shared.Interfaces.Physics; -using CannyFastMath; -using Math = CannyFastMath.Math; using MathF = CannyFastMath.MathF; namespace Content.Server.Throw diff --git a/Content.Shared/GameObjects/Components/Movement/SharedPlayerInputMoverComponent.cs b/Content.Shared/GameObjects/Components/Movement/SharedPlayerInputMoverComponent.cs index c8d389e973..dee6b09b08 100644 --- a/Content.Shared/GameObjects/Components/Movement/SharedPlayerInputMoverComponent.cs +++ b/Content.Shared/GameObjects/Components/Movement/SharedPlayerInputMoverComponent.cs @@ -144,10 +144,10 @@ namespace Content.Shared.GameObjects.Components.Movement public override void OnAdd() { // This component requires that the entity has a PhysicsComponent. - if (!Owner.HasComponent()) + if (!Owner.HasComponent()) Logger.Error( $"[ECS] {Owner.Prototype?.Name} - {nameof(SharedPlayerInputMoverComponent)} requires" + - $" {nameof(SharedPhysicsComponent)}. "); + $" {nameof(PhysicsComponent)}. "); base.OnAdd(); } diff --git a/Content.Shared/GameObjects/EntitySystems/SharedMoverSystem.cs b/Content.Shared/GameObjects/EntitySystems/SharedMoverSystem.cs index 740dddf9ea..6df3b87d19 100644 --- a/Content.Shared/GameObjects/EntitySystems/SharedMoverSystem.cs +++ b/Content.Shared/GameObjects/EntitySystems/SharedMoverSystem.cs @@ -1,4 +1,4 @@ -using System.Diagnostics.CodeAnalysis; +using System.Diagnostics.CodeAnalysis; using Content.Shared.GameObjects.Components.Movement; using Content.Shared.Physics; using Robust.Shared.Configuration; @@ -13,7 +13,6 @@ using Robust.Shared.Interfaces.GameObjects.Components; using Robust.Shared.Interfaces.Physics; using Robust.Shared.IoC; using Robust.Shared.Maths; -using Robust.Shared.Physics; using Robust.Shared.Players; #nullable enable @@ -56,7 +55,7 @@ namespace Content.Shared.GameObjects.EntitySystems } - protected void UpdateKinematics(ITransformComponent transform, IMoverComponent mover, SharedPhysicsComponent physics, + protected void UpdateKinematics(ITransformComponent transform, IMoverComponent mover, PhysicsComponent physics, CollidableComponent? collider = null) { if (physics.Controller == null) @@ -112,7 +111,7 @@ namespace Content.Shared.GameObjects.EntitySystems } - protected abstract void SetController(SharedPhysicsComponent physics); + protected abstract void SetController(PhysicsComponent physics); private bool IsAroundCollider(ITransformComponent transform, IMoverComponent mover, CollidableComponent collider) diff --git a/Content.Shared/Physics/MoverController.cs b/Content.Shared/Physics/MoverController.cs index 60284842bc..2c09154cac 100644 --- a/Content.Shared/Physics/MoverController.cs +++ b/Content.Shared/Physics/MoverController.cs @@ -1,4 +1,5 @@ -using Content.Shared.GameObjects.Components.Movement; +using Content.Shared.GameObjects.Components.Movement; +using Robust.Shared.GameObjects.Components; using Robust.Shared.Interfaces.Physics; using Robust.Shared.IoC; using Robust.Shared.Maths; @@ -9,7 +10,7 @@ namespace Content.Shared.Physics public class MoverController : VirtualController { private Vector2 _velocity; - private SharedPhysicsComponent _component = null; + private PhysicsComponent _component = null; public Vector2 Velocity { @@ -17,7 +18,7 @@ namespace Content.Shared.Physics set => _velocity = value; } - public override SharedPhysicsComponent ControlledComponent + public override PhysicsComponent ControlledComponent { set => _component = value; } diff --git a/Content.Shared/Physics/ThrowController.cs b/Content.Shared/Physics/ThrowController.cs index 5b71fe3394..476fa0f6b7 100644 --- a/Content.Shared/Physics/ThrowController.cs +++ b/Content.Shared/Physics/ThrowController.cs @@ -1,3 +1,4 @@ +using Robust.Shared.GameObjects.Components; using Robust.Shared.Interfaces.Physics; using Robust.Shared.IoC; using Robust.Shared.Maths; @@ -9,7 +10,7 @@ namespace Content.Shared.Physics public class ThrowController: VirtualController { private float _throwTime; - private SharedPhysicsComponent _component; + private PhysicsComponent _component; public const float DefaultThrowTime = 0.25f; @@ -19,7 +20,7 @@ namespace Content.Shared.Physics set => _throwTime = value; } - public override SharedPhysicsComponent ControlledComponent + public override PhysicsComponent ControlledComponent { set => _component = value; }