diff --git a/Content.Server/AI/WanderProcessor.cs b/Content.Server/AI/WanderProcessor.cs index ad0fd34beb..1b1117235c 100644 --- a/Content.Server/AI/WanderProcessor.cs +++ b/Content.Server/AI/WanderProcessor.cs @@ -5,7 +5,7 @@ using Content.Server.GameObjects.EntitySystems; using Content.Server.Interfaces.Chat; using Content.Shared.Physics; using Robust.Server.AI; -using Robust.Server.GameObjects; +using Robust.Shared.GameObjects.Components; using Robust.Shared.Interfaces.Physics; using Robust.Shared.Interfaces.Timing; using Robust.Shared.IoC; diff --git a/Content.Server/GameObjects/Components/Doors/ServerDoorComponent.cs b/Content.Server/GameObjects/Components/Doors/ServerDoorComponent.cs index aae3e98355..6a0ab1c569 100644 --- a/Content.Server/GameObjects/Components/Doors/ServerDoorComponent.cs +++ b/Content.Server/GameObjects/Components/Doors/ServerDoorComponent.cs @@ -4,6 +4,7 @@ using Content.Server.GameObjects.EntitySystems; using Content.Shared.GameObjects.Components.Doors; using Robust.Server.GameObjects; using Robust.Shared.GameObjects; +using Robust.Shared.GameObjects.Components; using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.Network; using Robust.Shared.Maths; diff --git a/Content.Server/GameObjects/Components/Items/Storage/EntityStorageComponent.cs b/Content.Server/GameObjects/Components/Items/Storage/EntityStorageComponent.cs index fb1d29b551..e8057c2af5 100644 --- a/Content.Server/GameObjects/Components/Items/Storage/EntityStorageComponent.cs +++ b/Content.Server/GameObjects/Components/Items/Storage/EntityStorageComponent.cs @@ -8,8 +8,8 @@ using Robust.Server.GameObjects; using Robust.Server.GameObjects.Components.Container; using Robust.Server.Interfaces.GameObjects; using Robust.Shared.GameObjects; +using Robust.Shared.GameObjects.Components; using Robust.Shared.Interfaces.GameObjects; -using Robust.Shared.Interfaces.GameObjects.Components; using Robust.Shared.Interfaces.Network; using Robust.Shared.Maths; using Robust.Shared.Serialization; diff --git a/Content.Server/GameObjects/Components/Medical/MedicalScannerComponent.cs b/Content.Server/GameObjects/Components/Medical/MedicalScannerComponent.cs index 656530b974..6330d3b550 100644 --- a/Content.Server/GameObjects/Components/Medical/MedicalScannerComponent.cs +++ b/Content.Server/GameObjects/Components/Medical/MedicalScannerComponent.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using Content.Server.GameObjects.EntitySystems; using Content.Shared.GameObjects; @@ -81,7 +81,7 @@ namespace Content.Server.GameObjects.Components.Medical _userInterface.SetState(newState); } - private MedicalScannerStatus GetStatusFromDamageState(DamageState damageState) + private MedicalScannerStatus GetStatusFromDamageState(IDamageState damageState) { switch (damageState) { diff --git a/Content.Server/GameObjects/Components/Mobs/DamageStates.cs b/Content.Server/GameObjects/Components/Mobs/DamageStates.cs index dbf27240f5..9ecb7d4525 100644 --- a/Content.Server/GameObjects/Components/Mobs/DamageStates.cs +++ b/Content.Server/GameObjects/Components/Mobs/DamageStates.cs @@ -1,6 +1,7 @@ using Content.Server.GameObjects.EntitySystems; using Content.Shared.GameObjects.Components.Mobs; using Robust.Server.GameObjects; +using Robust.Shared.GameObjects.Components; using Robust.Shared.Interfaces.GameObjects; namespace Content.Server.GameObjects @@ -8,7 +9,7 @@ namespace Content.Server.GameObjects /// /// Defines the blocking effect of each damage state, and what effects to apply upon entering or exiting the state /// - public interface DamageState : IActionBlocker + public interface IDamageState : IActionBlocker { void EnterState(IEntity entity); @@ -20,7 +21,7 @@ namespace Content.Server.GameObjects /// /// Standard state that a species is at with no damage or negative effect /// - public struct NormalState : DamageState + public struct NormalState : IDamageState { public void EnterState(IEntity entity) { @@ -71,7 +72,7 @@ namespace Content.Server.GameObjects /// /// A state in which you are disabled from acting due to damage /// - public struct CriticalState : DamageState + public struct CriticalState : IDamageState { public void EnterState(IEntity entity) { @@ -122,7 +123,7 @@ namespace Content.Server.GameObjects /// /// A damage state which will allow ghosting out of mobs /// - public struct DeadState : DamageState + public struct DeadState : IDamageState { public void EnterState(IEntity entity) { diff --git a/Content.Server/GameObjects/Components/Mobs/DamageThresholdTemplates/DamageThresholdTemplates.cs b/Content.Server/GameObjects/Components/Mobs/DamageThresholdTemplates/DamageThresholdTemplates.cs index 8aa024c13b..ce50ed1eef 100644 --- a/Content.Server/GameObjects/Components/Mobs/DamageThresholdTemplates/DamageThresholdTemplates.cs +++ b/Content.Server/GameObjects/Components/Mobs/DamageThresholdTemplates/DamageThresholdTemplates.cs @@ -27,7 +27,7 @@ namespace Content.Server.GameObjects /// /// Map of ALL POSSIBLE damage states to the threshold enum value that will trigger them, normal state wont be triggered by this value but is a default that is fell back onto /// - public static Dictionary StateThresholdMap = new Dictionary() + public static Dictionary StateThresholdMap = new Dictionary() { { ThresholdType.None, new NormalState() }, { ThresholdType.Critical, new CriticalState() }, diff --git a/Content.Server/GameObjects/Components/Mobs/SpeciesComponent.cs b/Content.Server/GameObjects/Components/Mobs/SpeciesComponent.cs index e5e8b97fa9..9ebe0888c9 100644 --- a/Content.Server/GameObjects/Components/Mobs/SpeciesComponent.cs +++ b/Content.Server/GameObjects/Components/Mobs/SpeciesComponent.cs @@ -20,7 +20,7 @@ namespace Content.Server.GameObjects /// /// Damagestates are reached by reaching a certain damage threshold, they will block actions after being reached /// - public DamageState CurrentDamageState { get; private set; } = new NormalState(); + public IDamageState CurrentDamageState { get; private set; } = new NormalState(); /// /// Damage state enum for current health, set only via change damage state //TODO: SETTER diff --git a/Content.Server/GameObjects/Components/Movement/ServerPortalComponent.cs b/Content.Server/GameObjects/Components/Movement/ServerPortalComponent.cs index f76a8aea58..6538363143 100644 --- a/Content.Server/GameObjects/Components/Movement/ServerPortalComponent.cs +++ b/Content.Server/GameObjects/Components/Movement/ServerPortalComponent.cs @@ -1,10 +1,11 @@ -using System; +using System; using System.Collections.Generic; using Content.Shared.GameObjects.Components.Movement; using Robust.Server.GameObjects; using Robust.Server.GameObjects.EntitySystems; using Robust.Server.Interfaces.GameObjects; using Robust.Shared.GameObjects; +using Robust.Shared.GameObjects.Components; using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.IoC; using Robust.Shared.Serialization; diff --git a/Content.Server/GameObjects/Components/Movement/ServerTeleporterComponent.cs b/Content.Server/GameObjects/Components/Movement/ServerTeleporterComponent.cs index 7771bdf05c..bc03418d4b 100644 --- a/Content.Server/GameObjects/Components/Movement/ServerTeleporterComponent.cs +++ b/Content.Server/GameObjects/Components/Movement/ServerTeleporterComponent.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Linq; using Content.Server.GameObjects.EntitySystems; using Content.Shared.GameObjects.Components.Movement; @@ -6,6 +6,7 @@ using Robust.Server.GameObjects; using Robust.Server.GameObjects.EntitySystems; using Robust.Server.Interfaces.GameObjects; using Robust.Shared.GameObjects; +using Robust.Shared.GameObjects.Components; using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.Map; using Robust.Shared.Interfaces.Random; diff --git a/Content.Server/GameObjects/Components/Movement/ShuttleControllerComponent.cs b/Content.Server/GameObjects/Components/Movement/ShuttleControllerComponent.cs index 46a74c034a..088af80ecb 100644 --- a/Content.Server/GameObjects/Components/Movement/ShuttleControllerComponent.cs +++ b/Content.Server/GameObjects/Components/Movement/ShuttleControllerComponent.cs @@ -2,14 +2,11 @@ using Content.Server.Interfaces.GameObjects.Components.Movement; using Robust.Server.GameObjects; using Robust.Server.GameObjects.Components.Container; -using Robust.Server.Interfaces.GameObjects; -using Robust.Server.Interfaces.Player; using Robust.Shared.GameObjects; +using Robust.Shared.GameObjects.Components; using Robust.Shared.Interfaces.GameObjects; -using Robust.Shared.Interfaces.GameObjects.Components; using Robust.Shared.Interfaces.Map; using Robust.Shared.Interfaces.Network; -using Robust.Shared.Interfaces.Timing; using Robust.Shared.IoC; using Robust.Shared.Log; using Robust.Shared.Map; @@ -20,11 +17,12 @@ namespace Content.Server.GameObjects.Components.Movement { [RegisterComponent] [ComponentReference(typeof(IMoverComponent))] - class ShuttleControllerComponent : Component, IMoverComponent + internal class ShuttleControllerComponent : Component, IMoverComponent { - [Dependency] IMapManager mapManager; - [Dependency] IEntityManager entityManager; - [Dependency] IGameTiming gameTiming; +#pragma warning disable 649 + [Dependency] private readonly IMapManager _mapManager; + [Dependency] private readonly IEntityManager _entityManager; +#pragma warning restore 649 private bool _movingUp; private bool _movingDown; @@ -37,7 +35,7 @@ namespace Content.Server.GameObjects.Components.Movement public float WalkMoveSpeed { get; set; } = 8; public float SprintMoveSpeed { get; set; } public bool Sprinting { get; set; } - public Vector2 VelocityDir { get; } + public Vector2 VelocityDir { get; } = Vector2.Zero; public GridCoordinates LastPosition { get; set; } public float StepSoundDistance { get; set; } @@ -45,7 +43,7 @@ namespace Content.Server.GameObjects.Components.Movement { var gridId = Owner.Transform.GridID; - if (mapManager.TryGetGrid(gridId, out var grid) && entityManager.TryGetEntity(grid.GridEntityId, out var gridEntity)) + if (_mapManager.TryGetGrid(gridId, out var grid) && _entityManager.TryGetEntity(grid.GridEntityId, out var gridEntity)) { //TODO: Switch to shuttle component if (!gridEntity.TryGetComponent(out PhysicsComponent physComp)) diff --git a/Content.Server/GameObjects/Components/Projectiles/ProjectileComponent.cs b/Content.Server/GameObjects/Components/Projectiles/ProjectileComponent.cs index 589b7c2efc..519e0f8892 100644 --- a/Content.Server/GameObjects/Components/Projectiles/ProjectileComponent.cs +++ b/Content.Server/GameObjects/Components/Projectiles/ProjectileComponent.cs @@ -3,8 +3,8 @@ using Content.Server.GameObjects.Components.Mobs; using Content.Shared.GameObjects; using Robust.Server.GameObjects; using Robust.Shared.GameObjects; +using Robust.Shared.GameObjects.Components; using Robust.Shared.Interfaces.GameObjects; -using Robust.Shared.Interfaces.GameObjects.Components; using Robust.Shared.Physics; using Robust.Shared.Serialization; using Robust.Shared.ViewVariables; diff --git a/Content.Server/GameObjects/Components/Projectiles/ThrownItemComponent.cs b/Content.Server/GameObjects/Components/Projectiles/ThrownItemComponent.cs index 5b83078959..d07e91b9e9 100644 --- a/Content.Server/GameObjects/Components/Projectiles/ThrownItemComponent.cs +++ b/Content.Server/GameObjects/Components/Projectiles/ThrownItemComponent.cs @@ -5,14 +5,14 @@ using Content.Shared.GameObjects; using Content.Shared.Physics; using Robust.Server.GameObjects; using Robust.Shared.GameObjects; +using Robust.Shared.GameObjects.Components; using Robust.Shared.Interfaces.GameObjects; -using Robust.Shared.Interfaces.GameObjects.Components; using Robust.Shared.IoC; namespace Content.Server.GameObjects.Components { [RegisterComponent] - class ThrownItemComponent : ProjectileComponent, ICollideBehavior + internal class ThrownItemComponent : ProjectileComponent, ICollideBehavior { #pragma warning disable 649 [Dependency] private readonly IEntitySystemManager _entitySystemManager; diff --git a/Content.Server/GameObjects/EntitySystems/Click/InteractionSystem.cs b/Content.Server/GameObjects/EntitySystems/Click/InteractionSystem.cs index bb27fbe24e..0b76d6f7de 100644 --- a/Content.Server/GameObjects/EntitySystems/Click/InteractionSystem.cs +++ b/Content.Server/GameObjects/EntitySystems/Click/InteractionSystem.cs @@ -7,6 +7,7 @@ using JetBrains.Annotations; using Robust.Server.GameObjects.EntitySystems; using Robust.Server.Interfaces.Player; using Robust.Shared.GameObjects; +using Robust.Shared.GameObjects.Components; using Robust.Shared.GameObjects.Systems; using Robust.Shared.Input; using Robust.Shared.Interfaces.GameObjects; @@ -322,7 +323,7 @@ namespace Content.Server.GameObjects.EntitySystems if (userEntity.TryGetComponent(out CombatModeComponent combatMode) && combatMode.IsInCombatMode) { - DoAttack(userEntity, coords, uid); + DoAttack(userEntity, coords); } else { @@ -747,7 +748,7 @@ namespace Content.Server.GameObjects.EntitySystems } } - private void DoAttack(IEntity player, GridCoordinates coordinates, EntityUid uid) + private void DoAttack(IEntity player, GridCoordinates coordinates) { // Verify player is on the same map as the entity he clicked on if (_mapManager.GetGrid(coordinates.GridID).ParentMapId != player.Transform.MapID) diff --git a/Content.Server/GameObjects/EntitySystems/HandsSystem.cs b/Content.Server/GameObjects/EntitySystems/HandsSystem.cs index 9c9255b44f..fd654de435 100644 --- a/Content.Server/GameObjects/EntitySystems/HandsSystem.cs +++ b/Content.Server/GameObjects/EntitySystems/HandsSystem.cs @@ -10,6 +10,7 @@ using Robust.Server.GameObjects.EntitySystemMessages; using Robust.Server.GameObjects.EntitySystems; using Robust.Server.Interfaces.Player; using Robust.Shared.GameObjects; +using Robust.Shared.GameObjects.Components; using Robust.Shared.GameObjects.Systems; using Robust.Shared.Input; using Robust.Shared.Interfaces.GameObjects; diff --git a/RobustToolbox b/RobustToolbox index 22bf1516cf..78a33076f9 160000 --- a/RobustToolbox +++ b/RobustToolbox @@ -1 +1 @@ -Subproject commit 22bf1516cf6662e34144a88b3c9d89e476a18ecb +Subproject commit 78a33076f9f0f77b165dcfdea22f5cda4633dc2b