Goes in-game now

This commit is contained in:
Vera Aguilera Puerto
2021-12-06 15:34:46 +01:00
parent af4eb3c7cd
commit c57b07a4d0
43 changed files with 129 additions and 130 deletions

View File

@@ -25,7 +25,7 @@ namespace Content.Server.Interaction
public void Execute(IConsoleShell shell, string argStr, string[] args)
{
var player = shell.Player as IPlayerSession;
if (player?.AttachedEntity == null)
if (player?.AttachedEntity is not {} attached)
{
return;
}
@@ -49,9 +49,9 @@ namespace Content.Server.Interaction
}
var mapManager = IoCManager.Resolve<IMapManager>();
var playerGrid = _entities.GetComponent<TransformComponent>(player.AttachedEntity).GridID;
var playerGrid = _entities.GetComponent<TransformComponent>(attached).GridID;
var mapGrid = mapManager.GetGrid(playerGrid);
var playerPosition = _entities.GetComponent<TransformComponent>(player.AttachedEntity).Coordinates;
var playerPosition = _entities.GetComponent<TransformComponent>(attached).Coordinates;
var tileDefinitionManager = IoCManager.Resolve<ITileDefinitionManager>();
for (var i = -radius; i <= radius; i++)