Revert "fixes a bunch of warnings"

This reverts commit d4d85b663f.
This commit is contained in:
Paul
2021-12-20 15:20:27 +01:00
parent 7757b94333
commit 97e47178d7
68 changed files with 168 additions and 113 deletions

View File

@@ -134,9 +134,12 @@ namespace Content.Server.PowerCell.Components
if (cell == null || !CanRemoveCell) return null;
if (!_cellContainer.Remove(cell.Owner)) return null;
//Dirty();
if (!_entities.TryGetComponent(user, out HandsComponent? hands) || !hands.PutInHand(_entities.GetComponent<ItemComponent>(cell.Owner)))
if (user != null)
{
_entities.GetComponent<TransformComponent>(cell.Owner).Coordinates = _entities.GetComponent<TransformComponent>(user).Coordinates;
if (!_entities.TryGetComponent(user, out HandsComponent? hands) || !hands.PutInHand(_entities.GetComponent<ItemComponent>(cell.Owner)))
{
_entities.GetComponent<TransformComponent>(cell.Owner).Coordinates = _entities.GetComponent<TransformComponent>(user).Coordinates;
}
}
else
{