Fix namespaces and optimize imports (#1651)

* Fix namespaces and optimize imports

* Cleanup fixes

* Merge conflict fixes

* Merge conflict fixes

* Merge conflict fixes
This commit is contained in:
DrSmugleaf
2020-08-13 14:40:27 +02:00
committed by GitHub
parent 05a76d55f7
commit 4a8ed41e3a
500 changed files with 1044 additions and 1557 deletions

View File

@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using Content.Server.AI.Utility.AiLogic;
using Content.Server.GameObjects.Components.Movement;
using Content.Shared.GameObjects.Components.Movement;
using JetBrains.Annotations;
@@ -106,7 +105,7 @@ namespace Content.Server.GameObjects.EntitySystems.AI
var processorId = args[0];
var entId = new EntityUid(int.Parse(args[1]));
var ent = IoCManager.Resolve<IEntityManager>().GetEntity(entId);
var aiSystem = EntitySystem.Get<AiSystem>();
var aiSystem = Get<AiSystem>();
if (!aiSystem.ProcessorTypeExists(processorId))
{

View File

@@ -1,9 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Content.Server.GameObjects.Components.Access;
using Content.Server.GameObjects.EntitySystems.AI.Pathfinding.Pathfinders;
using Content.Server.GameObjects.EntitySystems.Pathfinding;
using Content.Shared.AI;
using JetBrains.Annotations;
using Robust.Server.GameObjects;
@@ -75,7 +73,7 @@ namespace Content.Server.GameObjects.EntitySystems.AI.Pathfinding.Accessible
// Plus this way we can check if everything is equal except for vision so an entity with a lower vision radius can use an entity with a higher vision radius' cached result
private Dictionary<ReachableArgs, Dictionary<PathfindingRegion, (TimeSpan CacheTime, HashSet<PathfindingRegion> Regions)>> _cachedAccessible =
new Dictionary<ReachableArgs, Dictionary<PathfindingRegion, (TimeSpan, HashSet<PathfindingRegion>)>>();
private readonly List<PathfindingRegion> _queuedCacheDeletions = new List<PathfindingRegion>();
#if DEBUG
@@ -91,7 +89,7 @@ namespace Content.Server.GameObjects.EntitySystems.AI.Pathfinding.Accessible
#endif
_mapmanager.OnGridRemoved += GridRemoved;
}
private void GridRemoved(GridId gridId)
{
_regions.Remove(gridId);
@@ -457,7 +455,7 @@ namespace Content.Server.GameObjects.EntitySystems.AI.Pathfinding.Accessible
/// <param name="y">This is already calculated in advance so may as well re-use it</param>
/// <returns></returns>
private PathfindingRegion CalculateNode(
PathfindingNode node,
PathfindingNode node,
Dictionary<PathfindingNode, PathfindingRegion> existingRegions,
HashSet<PathfindingRegion> chunkRegions,
int x, int y)
@@ -497,15 +495,15 @@ namespace Content.Server.GameObjects.EntitySystems.AI.Pathfinding.Accessible
!leftRegion.IsDoor)
{
// We'll try and connect the left node's region to the bottom region if they're separate (yay merge)
if (bottomNeighbor != null &&
if (bottomNeighbor != null &&
existingRegions.TryGetValue(bottomNeighbor, out bottomRegion) &&
bottomRegion != leftRegion &&
bottomRegion != leftRegion &&
!bottomRegion.IsDoor)
{
bottomRegion.Add(node);
existingRegions.Add(node, bottomRegion);
MergeInto(leftRegion, bottomRegion, existingRegions);
// Cleanup leftRegion
// MergeInto will remove it from the overall region chunk cache while we need to remove it from
// our short-term ones (chunkRegions and existingRegions)
@@ -515,7 +513,7 @@ namespace Content.Server.GameObjects.EntitySystems.AI.Pathfinding.Accessible
{
existingRegions[leftNode] = bottomRegion;
}
return bottomRegion;
}
@@ -549,7 +547,7 @@ namespace Content.Server.GameObjects.EntitySystems.AI.Pathfinding.Accessible
/// </summary>
/// <param name="source"></param>
/// <param name="target"></param>
private void MergeInto(PathfindingRegion source, PathfindingRegion target, Dictionary<PathfindingNode, PathfindingRegion> existingRegions = null)
private void MergeInto(PathfindingRegion source, PathfindingRegion target, Dictionary<PathfindingNode, PathfindingRegion> existingRegions = null)
{
DebugTools.AssertNotNull(source);
DebugTools.AssertNotNull(target);
@@ -586,7 +584,7 @@ namespace Content.Server.GameObjects.EntitySystems.AI.Pathfinding.Accessible
private void ClearCache(PathfindingRegion region)
{
DebugTools.Assert(region.Deleted);
// Need to forcibly clear cache for ourself and anything that includes us
foreach (var (_, cachedRegions) in _cachedAccessible)
{
@@ -599,7 +597,7 @@ namespace Content.Server.GameObjects.EntitySystems.AI.Pathfinding.Accessible
// We could just have GetVisionAccessible remove us if it can tell we're deleted but that
// seems like it could be unreliable
var regionsToClear = new List<PathfindingRegion>();
foreach (var (otherRegion, cache) in cachedRegions)
{
if (cache.Regions.Contains(region))
@@ -613,9 +611,9 @@ namespace Content.Server.GameObjects.EntitySystems.AI.Pathfinding.Accessible
cachedRegions.Remove(otherRegion);
}
}
#if DEBUG
if (_regions.TryGetValue(region.ParentChunk.GridId, out var chunks) &&
if (_regions.TryGetValue(region.ParentChunk.GridId, out var chunks) &&
chunks.TryGetValue(region.ParentChunk, out var regions))
{
DebugTools.Assert(!regions.Contains(region));
@@ -642,7 +640,7 @@ namespace Content.Server.GameObjects.EntitySystems.AI.Pathfinding.Accessible
_queuedCacheDeletions.Add(region);
region.Shutdown();
}
_regions[chunk.GridId].Remove(chunk);
}
@@ -673,7 +671,7 @@ namespace Content.Server.GameObjects.EntitySystems.AI.Pathfinding.Accessible
{
DebugTools.Assert(!region.Deleted);
}
DebugTools.Assert(chunkRegions.Count < Math.Pow(PathfindingChunk.ChunkSize, 2));
SendRegionsDebugMessage(chunk.GridId);
#endif

View File

@@ -1,6 +1,5 @@
using System.Collections.Generic;
using Content.Server.GameObjects.EntitySystems.AI.Pathfinding.Pathfinders;
using Content.Server.GameObjects.EntitySystems.Pathfinding;
using Robust.Shared.GameObjects.Systems;
using Robust.Shared.Map;
@@ -36,7 +35,7 @@ namespace Content.Server.GameObjects.EntitySystems.AI.Pathfinding.Accessible
{
startNode = pathfindingSystem.GetNode(pathfindingArgs.End);
}
PathfindingNode currentNode;
openTiles.Enqueue(startNode);
@@ -49,13 +48,13 @@ namespace Content.Server.GameObjects.EntitySystems.AI.Pathfinding.Accessible
// No distances stored so can just check closed tiles here
if (closedTiles.Contains(neighbor.TileRef)) continue;
closedTiles.Add(currentNode.TileRef);
// So currently tileCost gets the octile distance between the 2 so we'll also use that for our range check
var tileCost = PathfindingHelpers.GetTileCost(pathfindingArgs, startNode, neighbor);
var direction = PathfindingHelpers.RelativeDirection(neighbor, currentNode);
if (tileCost == null ||
tileCost > pathfindingArgs.Proximity ||
if (tileCost == null ||
tileCost > pathfindingArgs.Proximity ||
!PathfindingHelpers.DirectionTraversable(pathfindingArgs.CollisionMask, pathfindingArgs.Access, currentNode, direction))
{
continue;
@@ -67,4 +66,4 @@ namespace Content.Server.GameObjects.EntitySystems.AI.Pathfinding.Accessible
}
}
}
}
}

View File

@@ -1,8 +1,5 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using Content.Server.GameObjects.EntitySystems.Pathfinding;
using Robust.Shared.Utility;
namespace Content.Server.GameObjects.EntitySystems.AI.Pathfinding.Accessible
{
@@ -16,7 +13,7 @@ namespace Content.Server.GameObjects.EntitySystems.AI.Pathfinding.Accessible
/// Bottom-left reference node of the region
/// </summary>
public PathfindingNode OriginNode { get; }
// The shape may be anything within the bounds of a chunk, this is just a quick way to do a bounds-check
/// <summary>
@@ -49,13 +46,13 @@ namespace Content.Server.GameObjects.EntitySystems.AI.Pathfinding.Accessible
{
// Tell our neighbors we no longer exist ;-/
var neighbors = new List<PathfindingRegion>(Neighbors);
for (var i = 0; i < neighbors.Count; i++)
{
var neighbor = neighbors[i];
neighbor.Neighbors.Remove(this);
}
_nodes.Clear();
Neighbors.Clear();
@@ -81,7 +78,7 @@ namespace Content.Server.GameObjects.EntitySystems.AI.Pathfinding.Accessible
{
xDistance = Math.Abs(xDistance + otherRegion.Width);
}
if (yDistance > 0)
{
yDistance -= Height;
@@ -90,7 +87,7 @@ namespace Content.Server.GameObjects.EntitySystems.AI.Pathfinding.Accessible
{
yDistance = Math.Abs(yDistance + otherRegion.Height);
}
return PathfindingHelpers.OctileDistance(xDistance, yDistance);
}
@@ -121,10 +118,10 @@ namespace Content.Server.GameObjects.EntitySystems.AI.Pathfinding.Accessible
{
Height = yHeight;
}
_nodes.Add(node);
}
// HashSet wasn't working correctly so uhh we got this.
public bool Equals(PathfindingRegion other)
{
@@ -141,4 +138,4 @@ namespace Content.Server.GameObjects.EntitySystems.AI.Pathfinding.Accessible
return OriginNode.GetHashCode();
}
}
}
}

View File

@@ -1,10 +1,8 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Content.Server.GameObjects.EntitySystems.JobQueues;
using Content.Server.GameObjects.EntitySystems.Pathfinding;
using Content.Shared.AI;
using Robust.Shared.Map;
using Robust.Shared.Utility;
@@ -55,7 +53,7 @@ namespace Content.Server.GameObjects.EntitySystems.AI.Pathfinding.Pathfinders
costSoFar[_startNode] = 0.0f;
var routeFound = false;
var count = 0;
while (frontier.Count > 0)
{
// Handle whether we need to pause if we've taken too long
@@ -69,7 +67,7 @@ namespace Content.Server.GameObjects.EntitySystems.AI.Pathfinding.Pathfinders
return null;
}
}
// Actual pathfinding here
(_, currentNode) = frontier.Take();
if (currentNode.Equals(_endNode))

View File

@@ -1,10 +1,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Content.Server.GameObjects.EntitySystems.JobQueues;
using Content.Server.GameObjects.EntitySystems.Pathfinding;
using Content.Shared.AI;
using Robust.Shared.Log;
using Robust.Shared.Map;
@@ -284,7 +282,7 @@ namespace Content.Server.GameObjects.EntitySystems.AI.Pathfinding.Pathfinders
// If we're going diagonally need to check all cardinals.
// I tried just casting direction ints and offsets to make it smaller but brain no worky.
// From NorthEast we check (Closed / Open) S - SE, W - NW
PathfindingNode openNeighborOne = null;
PathfindingNode closedNeighborOne = null;
PathfindingNode openNeighborTwo = null;

View File

@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using Content.Server.GameObjects.EntitySystems.Pathfinding;
namespace Content.Server.GameObjects.EntitySystems.AI.Pathfinding.Pathfinders
{

View File

@@ -1,12 +1,9 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Content.Server.GameObjects.EntitySystems.Pathfinding;
using Robust.Shared.GameObjects;
using Robust.Shared.GameObjects.Systems;
using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.Map;
using Robust.Shared.Interfaces.Timing;
using Robust.Shared.IoC;
using Robust.Shared.Map;
@@ -23,7 +20,7 @@ namespace Content.Server.GameObjects.EntitySystems.AI.Pathfinding
Chunk = chunk;
}
}
public class PathfindingChunk
{
public TimeSpan LastUpdate { get; private set; }
@@ -53,7 +50,7 @@ namespace Content.Server.GameObjects.EntitySystems.AI.Pathfinding
CreateNode(tileRef);
}
}
Dirty();
}
@@ -71,7 +68,7 @@ namespace Content.Server.GameObjects.EntitySystems.AI.Pathfinding
{
var pathfindingSystem = EntitySystem.Get<PathfindingSystem>();
var chunkGrid = pathfindingSystem.Graph[GridId];
for (var x = -1; x <= 1; x++)
{
for (var y = -1; y <= 1; y++)
@@ -159,7 +156,7 @@ namespace Content.Server.GameObjects.EntitySystems.AI.Pathfinding
}
yield break;
}
// South edge
if (node.TileRef.Y == _indices.Y)

View File

@@ -1,9 +1,7 @@
using System;
using System.Collections.Generic;
using Content.Server.GameObjects.Components.Access;
using Content.Server.GameObjects.EntitySystems.AI.Pathfinding.Accessible;
using Content.Server.GameObjects.EntitySystems.AI.Pathfinding.Pathfinders;
using Content.Server.GameObjects.EntitySystems.Pathfinding;
using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.Map;
using Robust.Shared.IoC;
@@ -38,40 +36,40 @@ namespace Content.Server.GameObjects.EntitySystems.AI.Pathfinding
// If it's a diagonal we need to check NSEW to see if we can get to it and stop corner cutting, NE needs N and E etc.
// Given there's different collision layers stored for each node in the graph it's probably not worth it to cache this
// Also this will help with corner-cutting
PathfindingNode northNeighbor = null;
PathfindingNode southNeighbor = null;
PathfindingNode eastNeighbor = null;
PathfindingNode westNeighbor = null;
foreach (var neighbor in currentNode.GetNeighbors())
{
if (neighbor.TileRef.X == currentNode.TileRef.X &&
if (neighbor.TileRef.X == currentNode.TileRef.X &&
neighbor.TileRef.Y == currentNode.TileRef.Y + 1)
{
northNeighbor = neighbor;
continue;
}
if (neighbor.TileRef.X == currentNode.TileRef.X + 1 &&
}
if (neighbor.TileRef.X == currentNode.TileRef.X + 1 &&
neighbor.TileRef.Y == currentNode.TileRef.Y)
{
eastNeighbor = neighbor;
continue;
}
if (neighbor.TileRef.X == currentNode.TileRef.X &&
if (neighbor.TileRef.X == currentNode.TileRef.X &&
neighbor.TileRef.Y == currentNode.TileRef.Y - 1)
{
southNeighbor = neighbor;
continue;
}
if (neighbor.TileRef.X == currentNode.TileRef.X - 1 &&
}
if (neighbor.TileRef.X == currentNode.TileRef.X - 1 &&
neighbor.TileRef.Y == currentNode.TileRef.Y)
{
westNeighbor = neighbor;
continue;
}
}
}
switch (direction)
@@ -130,7 +128,7 @@ namespace Content.Server.GameObjects.EntitySystems.AI.Pathfinding
return true;
}
public static Queue<TileRef> ReconstructPath(Dictionary<PathfindingNode, PathfindingNode> cameFrom, PathfindingNode current)
{
var running = new Stack<TileRef>();
@@ -244,7 +242,7 @@ namespace Content.Server.GameObjects.EntitySystems.AI.Pathfinding
return 1.4f * dstX + (dstY - dstX);
}
public static float OctileDistance(TileRef endTile, TileRef startTile)
{
// "Fast Euclidean" / octile.

View File

@@ -3,16 +3,13 @@ using System.Collections.Generic;
using System.Linq;
using Content.Server.GameObjects.Components.Access;
using Content.Server.GameObjects.Components.Doors;
using Content.Server.GameObjects.EntitySystems.AI.Pathfinding;
using Robust.Server.GameObjects;
using Robust.Shared.GameObjects;
using Robust.Shared.GameObjects.Components;
using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Map;
using Robust.Shared.Maths;
using Robust.Shared.Utility;
namespace Content.Server.GameObjects.EntitySystems.Pathfinding
namespace Content.Server.GameObjects.EntitySystems.AI.Pathfinding
{
public class PathfindingNode
{
@@ -20,7 +17,7 @@ namespace Content.Server.GameObjects.EntitySystems.Pathfinding
private readonly PathfindingChunk _parentChunk;
public TileRef TileRef { get; private set; }
/// <summary>
/// Whenever there's a change in the collision layers we update the mask as the graph has more reads than writes
/// </summary>
@@ -46,7 +43,7 @@ namespace Content.Server.GameObjects.EntitySystems.Pathfinding
public static bool IsRelevant(IEntity entity, ICollidableComponent collidableComponent)
{
if (entity.Transform.GridID == GridId.Invalid ||
if (entity.Transform.GridID == GridId.Invalid ||
(PathfindingSystem.TrackedCollisionLayers & collidableComponent.CollisionLayer) == 0)
{
return false;
@@ -66,7 +63,7 @@ namespace Content.Server.GameObjects.EntitySystems.Pathfinding
{
neighborChunks = ParentChunk.RelevantChunks(this).ToList();
}
for (var x = -1; x <= 1; x++)
{
for (var y = -1; y <= 1; y++)
@@ -112,7 +109,7 @@ namespace Content.Server.GameObjects.EntitySystems.Pathfinding
{
return ParentChunk.Nodes[chunkXOffset + 1, chunkYOffset];
}
neighborMapIndices = new MapIndices(TileRef.X + 1, TileRef.Y);
foreach (var neighbor in ParentChunk.GetNeighbors())
{
@@ -129,7 +126,7 @@ namespace Content.Server.GameObjects.EntitySystems.Pathfinding
{
return ParentChunk.Nodes[chunkXOffset + 1, chunkYOffset + 1];
}
neighborMapIndices = new MapIndices(TileRef.X + 1, TileRef.Y + 1);
foreach (var neighbor in ParentChunk.GetNeighbors())
{
@@ -146,7 +143,7 @@ namespace Content.Server.GameObjects.EntitySystems.Pathfinding
{
return ParentChunk.Nodes[chunkXOffset, chunkYOffset + 1];
}
neighborMapIndices = new MapIndices(TileRef.X, TileRef.Y + 1);
foreach (var neighbor in ParentChunk.GetNeighbors())
{
@@ -163,7 +160,7 @@ namespace Content.Server.GameObjects.EntitySystems.Pathfinding
{
return ParentChunk.Nodes[chunkXOffset - 1, chunkYOffset + 1];
}
neighborMapIndices = new MapIndices(TileRef.X - 1, TileRef.Y + 1);
foreach (var neighbor in ParentChunk.GetNeighbors())
{
@@ -180,7 +177,7 @@ namespace Content.Server.GameObjects.EntitySystems.Pathfinding
{
return ParentChunk.Nodes[chunkXOffset - 1, chunkYOffset];
}
neighborMapIndices = new MapIndices(TileRef.X - 1, TileRef.Y);
foreach (var neighbor in ParentChunk.GetNeighbors())
{
@@ -197,7 +194,7 @@ namespace Content.Server.GameObjects.EntitySystems.Pathfinding
{
return ParentChunk.Nodes[chunkXOffset - 1, chunkYOffset - 1];
}
neighborMapIndices = new MapIndices(TileRef.X - 1, TileRef.Y - 1);
foreach (var neighbor in ParentChunk.GetNeighbors())
{
@@ -214,7 +211,7 @@ namespace Content.Server.GameObjects.EntitySystems.Pathfinding
{
return ParentChunk.Nodes[chunkXOffset, chunkYOffset - 1];
}
neighborMapIndices = new MapIndices(TileRef.X, TileRef.Y - 1);
foreach (var neighbor in ParentChunk.GetNeighbors())
{
@@ -231,7 +228,7 @@ namespace Content.Server.GameObjects.EntitySystems.Pathfinding
{
return ParentChunk.Nodes[chunkXOffset + 1, chunkYOffset - 1];
}
neighborMapIndices = new MapIndices(TileRef.X + 1, TileRef.Y - 1);
foreach (var neighbor in ParentChunk.GetNeighbors())
{
@@ -276,9 +273,9 @@ namespace Content.Server.GameObjects.EntitySystems.Pathfinding
}
return;
}
DebugTools.Assert((PathfindingSystem.TrackedCollisionLayers & collidableComponent.CollisionLayer) != 0);
if (!collidableComponent.Anchored)
{
_physicsLayers.Add(entity, collidableComponent.CollisionLayer);
@@ -304,12 +301,12 @@ namespace Content.Server.GameObjects.EntitySystems.Pathfinding
if (_physicsLayers.ContainsKey(entity))
{
_physicsLayers.Remove(entity);
}
}
else if (_accessReaders.ContainsKey(entity))
{
_accessReaders.Remove(entity);
ParentChunk.Dirty();
}
}
else if (_blockedCollidables.ContainsKey(entity))
{
_blockedCollidables.Remove(entity);

View File

@@ -1,15 +1,11 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Threading;
using Content.Server.GameObjects.Components.Access;
using Content.Server.GameObjects.Components.GUI;
using Content.Server.GameObjects.EntitySystems.AI.Pathfinding.Pathfinders;
using Content.Server.GameObjects.EntitySystems.JobQueues;
using Content.Server.GameObjects.EntitySystems.JobQueues.Queues;
using Content.Server.GameObjects.EntitySystems.Pathfinding;
using Content.Shared.Physics;
using Robust.Shared.GameObjects;
using Robust.Shared.GameObjects.Components;
using Robust.Shared.GameObjects.Components.Transform;
using Robust.Shared.GameObjects.Systems;
@@ -275,9 +271,9 @@ namespace Content.Server.GameObjects.EntitySystems.AI.Pathfinding
/// <param name="entity"></param>
private void HandleEntityAdd(IEntity entity)
{
if (entity.Deleted ||
if (entity.Deleted ||
_lastKnownPositions.ContainsKey(entity) ||
!entity.TryGetComponent(out ICollidableComponent collidableComponent) ||
!entity.TryGetComponent(out ICollidableComponent collidableComponent) ||
!PathfindingNode.IsRelevant(entity, collidableComponent))
{
return;
@@ -315,23 +311,23 @@ namespace Content.Server.GameObjects.EntitySystems.AI.Pathfinding
private void HandleEntityMove(MoveEvent moveEvent)
{
// If we've moved to space or the likes then remove us.
if (moveEvent.Sender.Deleted ||
if (moveEvent.Sender.Deleted ||
!moveEvent.Sender.TryGetComponent(out ICollidableComponent collidableComponent) ||
!PathfindingNode.IsRelevant(moveEvent.Sender, collidableComponent))
{
HandleEntityRemove(moveEvent.Sender);
return;
}
// Memory leak protection until grid parenting confirmed fix / you REALLY need the performance
var gridBounds = _mapManager.GetGrid(moveEvent.Sender.Transform.GridID).WorldBounds;
if (!gridBounds.Contains(moveEvent.Sender.Transform.WorldPosition))
{
HandleEntityRemove(moveEvent.Sender);
return;
}
// If we move from space to a grid we may need to start tracking it.
if (!_lastKnownPositions.TryGetValue(moveEvent.Sender, out var oldNode))
{
@@ -342,7 +338,7 @@ namespace Content.Server.GameObjects.EntitySystems.AI.Pathfinding
// The pathfinding graph is tile-based so first we'll check if they're on a different tile and if we need to update.
// If you get entities bigger than 1 tile wide you'll need some other system so god help you.
var newTile = _mapManager.GetGrid(moveEvent.NewPosition.GridID).GetTileRef(moveEvent.NewPosition);
if (oldNode == null || oldNode.TileRef == newTile)
{
return;

View File

@@ -8,14 +8,11 @@ using Content.Server.GameObjects.EntitySystems.AI.Pathfinding;
using Content.Server.GameObjects.EntitySystems.AI.Pathfinding.Pathfinders;
using Content.Server.GameObjects.EntitySystems.JobQueues;
using Content.Shared.GameObjects.EntitySystems;
using Robust.Server.GameObjects;
using Robust.Server.Interfaces.Timing;
using Robust.Shared.GameObjects;
using Robust.Shared.GameObjects.Components;
using Robust.Shared.GameObjects.Systems;
using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.Map;
using Robust.Shared.Interfaces.Timing;
using Robust.Shared.IoC;
using Robust.Shared.Map;
using Robust.Shared.Maths;

View File

@@ -5,7 +5,7 @@ using Robust.Shared.GameObjects.Systems;
using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Map;
namespace Content.Server.Interfaces.GameObjects.Components.Interaction
namespace Content.Server.GameObjects.EntitySystems
{
/// <summary>
/// This interface gives components behavior on getting destoyed.

View File

@@ -2,7 +2,6 @@
using System;
using System.Collections.Generic;
using Content.Server.Atmos;
using Content.Server.GameObjects.Components.Atmos;
using JetBrains.Annotations;
using Robust.Server.Interfaces.Timing;
using Robust.Shared.GameObjects;
@@ -10,6 +9,7 @@ using Robust.Shared.GameObjects.Components.Map;
using Robust.Shared.GameObjects.Systems;
using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.Map;
using Robust.Shared.IoC;
using Robust.Shared.Map;
namespace Content.Server.GameObjects.EntitySystems
@@ -18,9 +18,9 @@ namespace Content.Server.GameObjects.EntitySystems
public class AtmosphereSystem : EntitySystem
{
#pragma warning disable 649
[Robust.Shared.IoC.Dependency] private readonly IMapManager _mapManager = default!;
[Robust.Shared.IoC.Dependency] private readonly IEntityManager _entityManager = default!;
[Robust.Shared.IoC.Dependency] private readonly IPauseManager _pauseManager = default!;
[Dependency] private readonly IMapManager _mapManager = default!;
[Dependency] private readonly IEntityManager _entityManager = default!;
[Dependency] private readonly IPauseManager _pauseManager = default!;
#pragma warning restore 649
public override void Initialize()

View File

@@ -1,8 +1,8 @@
using Content.Server.GameObjects.Components.Power.Chargers;
using Content.Server.GameObjects.Components.Power.ApcNetComponents.PowerReceiverUsers;
using JetBrains.Annotations;
using Robust.Shared.GameObjects.Systems;
namespace Content.Server.Interfaces.GameObjects.Components.Interaction
namespace Content.Server.GameObjects.EntitySystems
{
[UsedImplicitly]
internal sealed class BaseChargerSystem : EntitySystem

View File

@@ -2,7 +2,7 @@
using JetBrains.Annotations;
using Robust.Shared.GameObjects.Systems;
namespace Content.Server.Interfaces.GameObjects.Components.Interaction
namespace Content.Server.GameObjects.EntitySystems
{
/// <summary>
/// Triggers metabolism updates for <see cref="BloodstreamComponent"/>

View File

@@ -4,7 +4,7 @@ using JetBrains.Annotations;
using Robust.Shared.GameObjects.Systems;
using Robust.Shared.Interfaces.GameObjects;
namespace Content.Server.Interfaces.GameObjects.Components.Interaction
namespace Content.Server.GameObjects.EntitySystems
{
/// <summary>
/// This interface gives components behavior on whether entities solution (implying SolutionComponent is in place) is changed

View File

@@ -4,7 +4,6 @@ using Robust.Server.Interfaces.Player;
using Robust.Shared.GameObjects;
using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Maths;
using Robust.Shared.Utility;
namespace Content.Server.GameObjects.EntitySystems.Click

View File

@@ -1,17 +1,7 @@
using Content.Server.GameObjects.Components.Mobs;
using Content.Shared.GameObjects.EntitySystems;
using Content.Shared.Input;
using Content.Shared.GameObjects.EntitySystems;
using JetBrains.Annotations;
using Robust.Server.GameObjects.EntitySystems;
using Robust.Server.Interfaces.Player;
using Robust.Shared.Input;
using Robust.Shared.Interfaces.Random;
using Robust.Shared.IoC;
using Robust.Shared.Log;
using Robust.Shared.Players;
using Robust.Shared.Random;
namespace Content.Server.Interfaces.GameObjects.Components.Interaction
namespace Content.Server.GameObjects.EntitySystems
{
[UsedImplicitly]
public sealed class CombatModeSystem : SharedCombatModeSystem

View File

@@ -1,15 +1,16 @@
using System;
using System.Collections.Generic;
using Content.Server.GameObjects.Components;
using Content.Server.GameObjects.Components.Construction;
using Content.Server.GameObjects.Components.GUI;
using Content.Server.GameObjects.Components.Interactable;
using Content.Server.GameObjects.Components.Items.Storage;
using Content.Server.GameObjects.Components.Stack;
using Content.Server.GameObjects.EntitySystems.Click;
using Content.Server.Utility;
using Content.Shared.Construction;
using Content.Shared.GameObjects.Components;
using Content.Shared.GameObjects.Components.Interactable;
using Content.Shared.GameObjects.EntitySystems;
using Content.Shared.Interfaces.GameObjects.Components;
using JetBrains.Annotations;
using Robust.Server.GameObjects;
@@ -32,7 +33,7 @@ namespace Content.Server.GameObjects.EntitySystems
/// The server-side implementation of the construction system, which is used for constructing entities in game.
/// </summary>
[UsedImplicitly]
internal class ConstructionSystem : Shared.GameObjects.EntitySystems.SharedConstructionSystem
internal class ConstructionSystem : SharedConstructionSystem
{
#pragma warning disable 649
[Dependency] private readonly IPrototypeManager _prototypeManager;
@@ -337,7 +338,7 @@ namespace Content.Server.GameObjects.EntitySystems
}
// OK WE'RE GOOD CONSTRUCTION STARTED.
EntitySystem.Get<AudioSystem>().PlayFromEntity("/Audio/Items/deconstruct.ogg", placingEnt);
Get<AudioSystem>().PlayFromEntity("/Audio/Items/deconstruct.ogg", placingEnt);
if (prototype.Stages.Count == 2)
{
// Exactly 2 stages, so don't make an intermediate frame.

View File

@@ -1,39 +1,40 @@
#nullable enable
using System;
using System.Threading.Tasks;
using Content.Server.GameObjects.Components;
using Content.Server.GameObjects.Components.Damage;
using Content.Server.GameObjects.Components.GUI;
using Content.Server.GameObjects.Components.Items.Storage;
using Content.Server.GameObjects.Components.Mobs;
using Robust.Shared.Interfaces.Timing;
using Robust.Shared.IoC;
using Robust.Shared.Map;
namespace Content.Server.GameObjects.EntitySystems
namespace Content.Server.GameObjects.EntitySystems.DoAfter
{
public sealed class DoAfter
{
public Task<DoAfterStatus> AsTask { get; }
private TaskCompletionSource<DoAfterStatus> Tcs { get;}
public DoAfterEventArgs EventArgs;
public TimeSpan StartTime { get; }
public float Elapsed { get; set; }
public GridCoordinates UserGrid { get; }
public GridCoordinates TargetGrid { get; }
private bool _tookDamage;
public DoAfterStatus Status => AsTask.IsCompletedSuccessfully ? AsTask.Result : DoAfterStatus.Running;
// NeedHand
private string? _activeHand;
private ItemComponent? _activeItem;
public DoAfter(DoAfterEventArgs eventArgs)
{
EventArgs = eventArgs;
@@ -57,7 +58,7 @@ namespace Content.Server.GameObjects.EntitySystems
_activeHand = handsComponent.ActiveHand;
_activeItem = handsComponent.GetActiveHand;
}
Tcs = new TaskCompletionSource<DoAfterStatus>();
AsTask = Tcs.Task;
}
@@ -79,15 +80,15 @@ namespace Content.Server.GameObjects.EntitySystems
default:
throw new ArgumentOutOfRangeException();
}
Elapsed += frameTime;
if (IsFinished())
{
Tcs.SetResult(DoAfterStatus.Finished);
return;
}
if (IsCancelled())
{
Tcs.SetResult(DoAfterStatus.Cancelled);
@@ -101,13 +102,13 @@ namespace Content.Server.GameObjects.EntitySystems
{
return true;
}
// TODO :Handle inertia in space.
if (EventArgs.BreakOnUserMove && EventArgs.User.Transform.GridPosition != UserGrid)
{
return true;
}
if (EventArgs.BreakOnTargetMove && EventArgs.Target!.Transform.GridPosition != TargetGrid)
{
return true;
@@ -129,7 +130,7 @@ namespace Content.Server.GameObjects.EntitySystems
{
return true;
}
if (EventArgs.NeedHand)
{
if (!EventArgs.User.TryGetComponent(out HandsComponent handsComponent))
@@ -169,4 +170,4 @@ namespace Content.Server.GameObjects.EntitySystems
return true;
}
}
}
}

View File

@@ -2,9 +2,10 @@
using System;
using System.Threading;
using Robust.Shared.Interfaces.GameObjects;
// ReSharper disable UnassignedReadonlyField
namespace Content.Server.GameObjects.EntitySystems
namespace Content.Server.GameObjects.EntitySystems.DoAfter
{
public sealed class DoAfterEventArgs
{

View File

@@ -3,13 +3,13 @@ using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Content.Server.GameObjects.Components;
using Content.Server.GameObjects.Components.Damage;
using JetBrains.Annotations;
using Robust.Server.Interfaces.Timing;
using Robust.Shared.GameObjects;
using Robust.Shared.GameObjects.Systems;
using Robust.Shared.IoC;
namespace Content.Server.GameObjects.EntitySystems
namespace Content.Server.GameObjects.EntitySystems.DoAfter
{
[UsedImplicitly]
public sealed class DoAfterSystem : EntitySystem
@@ -19,18 +19,18 @@ namespace Content.Server.GameObjects.EntitySystems
public override void Update(float frameTime)
{
base.Update(frameTime);
foreach (var comp in ComponentManager.EntityQuery<DoAfterComponent>())
{
if (_pauseManager.IsGridPaused(comp.Owner.Transform.GridID)) continue;
var cancelled = new List<DoAfter>(0);
var finished = new List<DoAfter>(0);
foreach (var doAfter in comp.DoAfters)
{
doAfter.Run(frameTime);
switch (doAfter.Status)
{
case DoAfterStatus.Running:
@@ -59,7 +59,7 @@ namespace Content.Server.GameObjects.EntitySystems
finished.Clear();
}
}
/// <summary>
/// Tasks that are delayed until the specified time has passed
/// These can be potentially cancelled by the user moving or when other things happen.
@@ -74,7 +74,7 @@ namespace Content.Server.GameObjects.EntitySystems
var doAfterComponent = eventArgs.User.GetComponent<DoAfterComponent>();
doAfterComponent.Add(doAfter);
DamageableComponent? damageableComponent = null;
// TODO: If the component's deleted this may not get unsubscribed?
if (eventArgs.BreakOnDamage && eventArgs.User.TryGetComponent(out damageableComponent))
{
@@ -82,12 +82,12 @@ namespace Content.Server.GameObjects.EntitySystems
}
await doAfter.AsTask;
if (damageableComponent != null)
{
damageableComponent.Damaged -= doAfter.HandleDamage;
}
return doAfter.Status;
}
}
@@ -98,4 +98,4 @@ namespace Content.Server.GameObjects.EntitySystems
Cancelled,
Finished,
}
}
}

View File

@@ -1,4 +1,5 @@
using Robust.Shared.GameObjects.Systems;
using Content.Server.GameObjects.Components.Doors;
using Robust.Shared.GameObjects.Systems;
namespace Content.Server.GameObjects.EntitySystems
{

View File

@@ -1,10 +1,5 @@
using Content.Server.GameObjects.Components.Atmos;
using Robust.Shared.GameObjects;
using Robust.Shared.GameObjects.Systems;
using Robust.Shared.Interfaces.GameObjects;
using System;
using System.Collections.Generic;
using System.Text;
namespace Content.Server.GameObjects.EntitySystems
{

View File

@@ -2,7 +2,6 @@
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using Content.Server.Atmos;
using Content.Server.GameObjects.Components.Atmos;
using Content.Shared.Atmos;
using Content.Shared.GameObjects.EntitySystems;
@@ -10,13 +9,10 @@ using JetBrains.Annotations;
using Robust.Server.Interfaces.Player;
using Robust.Server.Player;
using Robust.Shared.Enums;
using Robust.Shared.GameObjects.Systems;
using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.Map;
using Robust.Shared.Interfaces.Network;
using Robust.Shared.IoC;
using Robust.Shared.Map;
using Robust.Shared.Utility;
namespace Content.Server.GameObjects.EntitySystems
{

View File

@@ -13,7 +13,7 @@ using Robust.Shared.Map;
using Robust.Shared.Maths;
using Robust.Shared.Random;
namespace Content.Server.Interfaces.GameObjects.Components.Interaction
namespace Content.Server.GameObjects.EntitySystems
{
[UsedImplicitly]
internal sealed class GravitySystem : EntitySystem
@@ -82,7 +82,7 @@ namespace Content.Server.Interfaces.GameObjects.Components.Interaction
{
if (player.AttachedEntity == null
|| player.AttachedEntity.Transform.GridID != gridId) continue;
EntitySystem.Get<AudioSystem>().PlayFromEntity("/Audio/Effects/alert.ogg", player.AttachedEntity);
Get<AudioSystem>().PlayFromEntity("/Audio/Effects/alert.ogg", player.AttachedEntity);
}
}

View File

@@ -2,7 +2,7 @@ using Content.Server.GameObjects.Components.Interactable;
using JetBrains.Annotations;
using Robust.Shared.GameObjects.Systems;
namespace Content.Server.Interfaces.GameObjects.Components.Interaction
namespace Content.Server.GameObjects.EntitySystems
{
[UsedImplicitly]
internal sealed class HandHeldLightSystem : EntitySystem

View File

@@ -1,8 +1,14 @@
using System.Linq;
using System;
using System.Linq;
using Content.Server.GameObjects.Components.GUI;
using Content.Server.GameObjects.Components.Items.Storage;
using Content.Server.GameObjects.Components.Stack;
using Content.Server.GameObjects.EntitySystems.Click;
using Content.Server.Interfaces;
using Content.Server.Interfaces.GameObjects.Components.Items;
using Content.Server.Throw;
using Content.Shared.GameObjects.Components.Inventory;
using Content.Shared.GameObjects.EntitySystems;
using Content.Shared.Input;
using JetBrains.Annotations;
using Robust.Server.GameObjects.EntitySystemMessages;
@@ -15,18 +21,8 @@ using Robust.Shared.IoC;
using Robust.Shared.Localization;
using Robust.Shared.Map;
using Robust.Shared.Players;
using System;
using Content.Server.GameObjects.Components.GUI;
using Content.Server.Interfaces.GameObjects.Components.Items;
using Content.Shared.GameObjects.EntitySystems;
using Content.Server.GameObjects;
using Content.Server.GameObjects.Components;
using Content.Server.GameObjects.Components.Items.Storage;
using Content.Server.GameObjects.EntitySystems.Click;
using Content.Shared.Interfaces;
using Robust.Shared.Maths;
namespace Content.Server.Interfaces.GameObjects.Components.Interaction
namespace Content.Server.GameObjects.EntitySystems
{
[UsedImplicitly]
internal sealed class HandsSystem : EntitySystem

View File

@@ -2,7 +2,7 @@ using Content.Server.GameObjects.Components.Nutrition;
using JetBrains.Annotations;
using Robust.Shared.GameObjects.Systems;
namespace Content.Server.Interfaces.GameObjects.Components.Interaction
namespace Content.Server.GameObjects.EntitySystems
{
[UsedImplicitly]
internal sealed class HungerSystem : EntitySystem

View File

@@ -1,5 +1,3 @@
using System.Collections;
namespace Content.Server.GameObjects.EntitySystems.JobQueues
{
public interface IJob

View File

@@ -2,7 +2,7 @@ using Content.Server.GameObjects.Components.Research;
using JetBrains.Annotations;
using Robust.Shared.GameObjects.Systems;
namespace Content.Server.Interfaces.GameObjects.Components.Interaction
namespace Content.Server.GameObjects.EntitySystems
{
[UsedImplicitly]
internal sealed class LatheSystem : EntitySystem

View File

@@ -2,7 +2,7 @@ using Content.Server.GameObjects.Components.Medical;
using JetBrains.Annotations;
using Robust.Shared.GameObjects.Systems;
namespace Content.Server.Interfaces.GameObjects.Components.Interaction
namespace Content.Server.GameObjects.EntitySystems
{
[UsedImplicitly]
internal sealed class MedicalScannerSystem : EntitySystem

View File

@@ -5,7 +5,7 @@ using Robust.Shared.GameObjects.Systems;
using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Maths;
namespace Content.Server.Interfaces.GameObjects.Components.Interaction
namespace Content.Server.GameObjects.EntitySystems
{
public sealed class MeleeWeaponSystem : EntitySystem
{

View File

@@ -2,7 +2,7 @@ using Content.Server.GameObjects.Components.Kitchen;
using JetBrains.Annotations;
using Robust.Shared.GameObjects.Systems;
namespace Content.Server.Interfaces.GameObjects.Components.Interaction
namespace Content.Server.GameObjects.EntitySystems
{
[UsedImplicitly]
internal sealed class MicrowaveSystem : EntitySystem

View File

@@ -1,6 +1,6 @@
#nullable enable
using Content.Server.GameObjects;
using Content.Server.GameObjects.Components;
using Content.Server.GameObjects.Components.GUI;
using Content.Server.GameObjects.Components.Items.Storage;
using Content.Server.GameObjects.Components.Mobs;
using Content.Server.GameObjects.Components.Movement;

View File

@@ -2,7 +2,7 @@ using Content.Server.GameObjects.Components.Movement;
using JetBrains.Annotations;
using Robust.Shared.GameObjects.Systems;
namespace Content.Server.Interfaces.GameObjects.Components.Interaction
namespace Content.Server.GameObjects.EntitySystems
{
[UsedImplicitly]
internal sealed class PortalSystem : EntitySystem

View File

@@ -1,12 +1,12 @@
using Content.Server.GameObjects.Components.Power.ApcNetComponents;
using System.Collections.Generic;
using Content.Server.GameObjects.Components.NodeContainer.NodeGroups;
using Robust.Shared.GameObjects.Systems;
using System.Collections.Generic;
using Content.Server.GameObjects.Components.Power.ApcNetComponents;
using JetBrains.Annotations;
using Robust.Shared.IoC;
using Robust.Server.Interfaces.Timing;
using Robust.Shared.GameObjects.Systems;
using Robust.Shared.IoC;
namespace Content.Server.Interfaces.GameObjects.Components.Interaction
namespace Content.Server.GameObjects.EntitySystems
{
[UsedImplicitly]
internal sealed class PowerApcSystem : EntitySystem

View File

@@ -1,9 +1,8 @@
using Content.Server.GameObjects.Components.Power;
using Content.Server.GameObjects.Components.Power.PowerNetComponents;
using JetBrains.Annotations;
using Robust.Shared.GameObjects;
using Robust.Shared.GameObjects.Systems;
namespace Content.Server.Interfaces.GameObjects.Components.Interaction
namespace Content.Server.GameObjects.EntitySystems
{
[UsedImplicitly]
internal class PowerSmesSystem : EntitySystem

View File

@@ -1,4 +1,4 @@
using Content.Server.GameObjects.Components.Power;
using Content.Server.GameObjects.Components.Power.PowerNetComponents;
using JetBrains.Annotations;
using Robust.Shared.GameObjects.Systems;

View File

@@ -1,6 +1,8 @@
using Content.Server.GameObjects.Components.Power;
using JetBrains.Annotations;
using System;
using System.Linq;
using Content.Server.GameObjects.Components.Power.PowerNetComponents;
using Content.Shared.Physics;
using JetBrains.Annotations;
using Robust.Shared.GameObjects.Systems;
using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.Physics;
@@ -8,10 +10,8 @@ using Robust.Shared.Interfaces.Random;
using Robust.Shared.Interfaces.Timing;
using Robust.Shared.IoC;
using Robust.Shared.Maths;
using System;
using System.Linq;
namespace Content.Server.Interfaces.GameObjects.Components.Interaction
namespace Content.Server.GameObjects.EntitySystems
{
/// <summary>
/// Responsible for maintaining the solar-panel sun angle and updating <see cref='SolarPanelComponent'/> coverage.
@@ -90,7 +90,7 @@ namespace Content.Server.Interfaces.GameObjects.Components.Interaction
{
// There's supposed to be rotational logic here, but that implies putting it somewhere.
panel.Owner.Transform.WorldRotation = TargetPanelRotation;
if (panel.TimeOfNextCoverageUpdate < _gameTiming.CurTime)
{
// Setup the next coverage check.

View File

@@ -2,7 +2,7 @@ using Content.Server.GameObjects.Components.Projectiles;
using JetBrains.Annotations;
using Robust.Shared.GameObjects.Systems;
namespace Content.Server.Interfaces.GameObjects.Components.Interaction
namespace Content.Server.GameObjects.EntitySystems
{
[UsedImplicitly]
internal sealed class ProjectileSystem : EntitySystem

View File

@@ -1,13 +1,12 @@
using Content.Server.GameObjects.Components.Fluids;
using JetBrains.Annotations;
using Robust.Shared.GameObjects;
using Robust.Shared.GameObjects.Components.Transform;
using Robust.Shared.GameObjects.Systems;
using Robust.Shared.Interfaces.Map;
using Robust.Shared.IoC;
using Robust.Shared.Map;
namespace Content.Server.Interfaces.GameObjects.Components.Interaction
namespace Content.Server.GameObjects.EntitySystems
{
[UsedImplicitly]
internal sealed class PuddleSystem : EntitySystem

View File

@@ -1,7 +1,7 @@
using Content.Server.GameObjects.Components.Interactable;
using System.Collections.Generic;
using Content.Server.GameObjects.Components;
using Robust.Shared.GameObjects.Systems;
using Robust.Shared.Interfaces.GameObjects;
using System.Collections.Generic;
namespace Content.Server.GameObjects.EntitySystems
{

View File

@@ -4,7 +4,7 @@ using Robust.Shared.GameObjects;
using Robust.Shared.GameObjects.Systems;
using Robust.Shared.Interfaces.GameObjects;
namespace Content.Server.Interfaces.GameObjects.Components.Interaction
namespace Content.Server.GameObjects.EntitySystems
{
public class ResearchSystem : EntitySystem
{

View File

@@ -6,7 +6,7 @@ using Robust.Shared.Interfaces.Timing;
using Robust.Shared.IoC;
using Timer = Robust.Shared.Timers.Timer;
namespace Content.Server.Interfaces.GameObjects.Components.Interaction
namespace Content.Server.GameObjects.EntitySystems
{
public class RoundEndSystem : EntitySystem
{

View File

@@ -2,7 +2,7 @@
using JetBrains.Annotations;
using Robust.Shared.GameObjects.Systems;
namespace Content.Server.Interfaces.GameObjects.Components.Interaction
namespace Content.Server.GameObjects.EntitySystems
{
/// <summary>
/// Triggers digestion updates on <see cref="StomachComponent"/>

View File

@@ -6,7 +6,7 @@ using Robust.Server.GameObjects.EntitySystemMessages;
using Robust.Server.Interfaces.Player;
using Robust.Shared.GameObjects.Systems;
namespace Content.Server.Interfaces.GameObjects.Components.Interaction
namespace Content.Server.GameObjects.EntitySystems
{
[UsedImplicitly]
internal sealed class StorageSystem : EntitySystem

View File

@@ -2,7 +2,7 @@ using Content.Server.GameObjects.Components.Mobs;
using JetBrains.Annotations;
using Robust.Shared.GameObjects.Systems;
namespace Content.Server.Interfaces.GameObjects.Components.Interaction
namespace Content.Server.GameObjects.EntitySystems
{
[UsedImplicitly]
internal sealed class StunSystem : EntitySystem

View File

@@ -1,8 +1,8 @@
using Content.Server.GameObjects;
using Content.Server.GameObjects.Components.Temperature;
using JetBrains.Annotations;
using Robust.Shared.GameObjects.Systems;
namespace Content.Server.Interfaces.GameObjects.Components.Interaction
namespace Content.Server.GameObjects.EntitySystems
{
[UsedImplicitly]
internal sealed class TemperatureSystem : EntitySystem

View File

@@ -2,7 +2,7 @@ using Content.Server.GameObjects.Components.Nutrition;
using JetBrains.Annotations;
using Robust.Shared.GameObjects.Systems;
namespace Content.Server.Interfaces.GameObjects.Components.Interaction
namespace Content.Server.GameObjects.EntitySystems
{
[UsedImplicitly]
internal sealed class ThirstSystem : EntitySystem

View File

@@ -5,7 +5,7 @@ using Robust.Shared.GameObjects.Systems;
using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Timers;
namespace Content.Server.Interfaces.GameObjects.Components.Interaction
namespace Content.Server.GameObjects.EntitySystems
{
/// <summary>
/// This interface gives components behavior when being "triggered" by timer or other conditions

View File

@@ -1,5 +1,4 @@
using Content.Server.GameObjects.Components.Chemistry;
using Robust.Shared.GameObjects;
using Robust.Shared.GameObjects.Systems;
namespace Content.Server.GameObjects.EntitySystems

View File

@@ -1,15 +1,15 @@
using System.Collections.Generic;
using System.Reflection;
using Content.Shared.GameObjects;
using Content.Shared.GameObjects.Verbs;
using Robust.Server.Interfaces.Player;
using Robust.Shared.GameObjects;
using Robust.Shared.GameObjects.Systems;
using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Log;
using static Content.Shared.GameObjects.EntitySystemMessages.VerbSystemMessages;
using Logger = Robust.Shared.Log.Logger;
namespace Content.Server.Interfaces.GameObjects.Components.Interaction
namespace Content.Server.GameObjects.EntitySystems
{
public class VerbSystem : EntitySystem
{

View File

@@ -3,7 +3,7 @@ using System.Linq;
using Content.Server.GameObjects.Components.Interactable;
using Robust.Shared.GameObjects.Systems;
namespace Content.Server.Interfaces.GameObjects.Components.Interaction
namespace Content.Server.GameObjects.EntitySystems
{
/// <summary>
/// Despite the name, it's only really used for the welder logic in tools. Go figure.

View File

@@ -3,7 +3,7 @@ using Robust.Shared.GameObjects.Systems;
using Robust.Shared.ViewVariables;
using static Content.Shared.GameObjects.Components.SharedWiresComponent;
namespace Content.Server.Interfaces.GameObjects.Components.Interaction
namespace Content.Server.GameObjects.EntitySystems
{
public class WireHackingSystem : EntitySystem
{