A bunch of AttachedEntity bullshit

This commit is contained in:
metalgearsloth
2021-12-06 15:39:46 +11:00
parent 215cae5655
commit 525297c5fe
58 changed files with 135 additions and 133 deletions

View File

@@ -43,8 +43,8 @@ namespace Content.Server.Administration.Commands
}
var canReturn = mind.CurrentEntity != default;
var coordinates = player.AttachedEntity.HasValue
? _entities.GetComponent<TransformComponent>(player.AttachedEntity.Value).Coordinates
var coordinates = player.AttachedEntity != default
? _entities.GetComponent<TransformComponent>(player.AttachedEntity).Coordinates
: EntitySystem.Get<GameTicker>().GetObserverSpawnPoint();
var ghost = _entities.SpawnEntity("AdminObserver", coordinates);

View File

@@ -35,7 +35,7 @@ namespace Content.Server.Administration.Commands
shell.WriteLine(Loc.GetString("rejuvenate-command-no-entity-attached-message"));
return;
}
PerformRejuvenate(player.AttachedEntity.Value);
PerformRejuvenate(player.AttachedEntity);
}
var entityManager = IoCManager.Resolve<IEntityManager>();