diff --git a/Content.Server/Corvax/ArtifactDebug/ArtifactActivatingDebugSystem.cs b/Content.Server/Corvax/ArtifactDebug/ArtifactActivatingDebugSystem.cs new file mode 100644 index 00000000000..4462cf24806 --- /dev/null +++ b/Content.Server/Corvax/ArtifactDebug/ArtifactActivatingDebugSystem.cs @@ -0,0 +1,18 @@ +using Content.Server.Xenoarchaeology.XenoArtifacts.Effects.Components; +using Content.Server.Xenoarchaeology.XenoArtifacts.Events; +using Content.Shared.Interaction.Events; + +namespace Content.Server.Corvax.Debug; + +public sealed class ArtifactActivatingDebugSystem : EntitySystem +{ + public override void Initialize() + { + SubscribeLocalEvent(OnUseInHand); + } + + private void OnUseInHand(EntityUid entity, ThrowArtifactComponent component, UseInHandEvent e) + { + RaiseLocalEvent(entity, new()); + } +} diff --git a/Content.Server/Corvax/ArtifactDebug/SpawnThrowArtifactItemCommand.cs b/Content.Server/Corvax/ArtifactDebug/SpawnThrowArtifactItemCommand.cs new file mode 100644 index 00000000000..3b18a475a18 --- /dev/null +++ b/Content.Server/Corvax/ArtifactDebug/SpawnThrowArtifactItemCommand.cs @@ -0,0 +1,31 @@ +using Content.Server.Administration; +using Content.Server.Xenoarchaeology.XenoArtifacts.Effects.Components; +using Content.Shared.Administration; +using Content.Shared.Mind; +using Content.Shared.Players; +using Robust.Shared.Console; +using Robust.Shared.Map; + +namespace Content.Server.Corvax.Debug; + +[AdminCommand(AdminFlags.Debug)] +public sealed class SpawnThrowArtifactItemCommand : IConsoleCommand +{ + [Dependency] private readonly EntityManager _manager = default!; + + public string Command => "spawnthrowartifactitem"; + + public string Description => "Spawns item that can emit ThrowArtifact."; + + public string Help => $"Usage: {Command}"; + + public void Execute(IConsoleShell console, string arg, string[] args) + { + if (console.Player is null || !_manager.TryGetComponent(console.Player.GetMind(), out var mind) || mind.CurrentEntity is null) + return; + + var entity = _manager.SpawnEntity("ToyNuke", new EntityCoordinates(mind.CurrentEntity.Value, new())); + + _manager.AddComponent(entity); + } +}