Dewarns access (#16666)
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
@@ -2,6 +2,7 @@ using Content.Server.Administration.UI;
|
||||
using Content.Server.EUI;
|
||||
using Content.Server.Hands.Systems;
|
||||
using Content.Server.Preferences.Managers;
|
||||
using Content.Shared.Access.Components;
|
||||
using Content.Shared.Administration;
|
||||
using Content.Shared.Hands.Components;
|
||||
using Content.Shared.Inventory;
|
||||
@@ -16,7 +17,7 @@ using Robust.Shared.Prototypes;
|
||||
namespace Content.Server.Administration.Commands
|
||||
{
|
||||
[AdminCommand(AdminFlags.Admin)]
|
||||
sealed class SetOutfitCommand : IConsoleCommand
|
||||
public sealed class SetOutfitCommand : IConsoleCommand
|
||||
{
|
||||
[Dependency] private readonly IEntityManager _entities = default!;
|
||||
[Dependency] private readonly IPrototypeManager _prototypes = default!;
|
||||
@@ -25,7 +26,7 @@ namespace Content.Server.Administration.Commands
|
||||
|
||||
public string Description => Loc.GetString("set-outfit-command-description", ("requiredComponent", nameof(InventoryComponent)));
|
||||
|
||||
public string Help => Loc.GetString("set-outfit-command-help-text", ("command",Command));
|
||||
public string Help => Loc.GetString("set-outfit-command-help-text", ("command", Command));
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
@@ -51,7 +52,7 @@ namespace Content.Server.Administration.Commands
|
||||
|
||||
if (!_entities.HasComponent<InventoryComponent?>(target))
|
||||
{
|
||||
shell.WriteLine(Loc.GetString("shell-target-entity-does-not-have-message",("missing", "inventory")));
|
||||
shell.WriteLine(Loc.GetString("shell-target-entity-does-not-have-message", ("missing", "inventory")));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -106,9 +107,9 @@ namespace Content.Server.Administration.Commands
|
||||
var equipmentEntity = entityManager.SpawnEntity(gearStr, entityManager.GetComponent<TransformComponent>(target).Coordinates);
|
||||
if (slot.Name == "id" &&
|
||||
entityManager.TryGetComponent<PdaComponent?>(equipmentEntity, out var pdaComponent) &&
|
||||
pdaComponent.ContainedId != null)
|
||||
entityManager.TryGetComponent<IdCardComponent>(pdaComponent.ContainedId, out var id))
|
||||
{
|
||||
pdaComponent.ContainedId.FullName = entityManager.GetComponent<MetaDataComponent>(target).EntityName;
|
||||
id.FullName = entityManager.GetComponent<MetaDataComponent>(target).EntityName;
|
||||
}
|
||||
|
||||
invSystem.TryEquip(target, equipmentEntity, slot.Name, silent: true, force: true, inventory: inventoryComponent);
|
||||
|
||||
Reference in New Issue
Block a user