mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-09-16 15:22:27 +02:00
* Removed the Interfaces folder. * All objects inside the GameObjects subfolders are now in the GameObjects namespace. * Added a Resharper DotSettings file to mark the GameObjects subfolders as not providing namespaces. * Simplified Robust.client.Graphics namespace. * Automated remove redundant using statements.
25 lines
792 B
C#
25 lines
792 B
C#
using Robust.Server.GameObjects;
|
|
using Robust.Server.Player;
|
|
using Robust.Shared.Console;
|
|
using Robust.Shared.IoC;
|
|
|
|
namespace Robust.Server.Console.Commands
|
|
{
|
|
public class SpawnCommand : IConsoleCommand
|
|
{
|
|
public string Command => "spawn";
|
|
public string Description => "Spawns an entity with specific type at your feet.";
|
|
public string Help => "spawn <entity type>";
|
|
|
|
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
|
{
|
|
var player = shell.Player as IPlayerSession;
|
|
var ent = IoCManager.Resolve<IServerEntityManager>();
|
|
if (player?.AttachedEntity != null)
|
|
{
|
|
ent.SpawnEntity(args[0], player.AttachedEntity.Transform.Coordinates);
|
|
}
|
|
}
|
|
}
|
|
}
|