Command resolve mega pr batch 5 (#38389)

* commit progress

* requested changes
This commit is contained in:
Kyle Tyo
2025-06-17 16:49:58 -04:00
committed by GitHub
parent aa15371049
commit 3485450ffa
19 changed files with 146 additions and 148 deletions

View File

@@ -6,29 +6,28 @@ using Robust.Shared.Console;
namespace Content.Server.Administration.Commands namespace Content.Server.Administration.Commands
{ {
[UsedImplicitly] [UsedImplicitly]
public sealed class PromoteHostCommand : IConsoleCommand public sealed class PromoteHostCommand : LocalizedCommands
{ {
public string Command => "promotehost"; [Dependency] private readonly IAdminManager _adminManager = default!;
public string Description => "Grants client temporary full host admin privileges. Use this to bootstrap admins."; [Dependency] private readonly IPlayerManager _playerManager = default!;
public string Help => "Usage promotehost <player>";
public void Execute(IConsoleShell shell, string argStr, string[] args) public override string Command => "promotehost";
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{ {
if (args.Length != 1) if (args.Length != 1)
{ {
shell.WriteLine("Expected exactly one argument."); shell.WriteLine(Loc.GetString($"shell-need-exactly-one-argument"));
return; return;
} }
var plyMgr = IoCManager.Resolve<IPlayerManager>(); if (!_playerManager.TryGetSessionByUsername(args[0], out var targetPlayer))
if (!plyMgr.TryGetSessionByUsername(args[0], out var targetPlayer))
{ {
shell.WriteLine("Unable to find a player by that name."); shell.WriteLine(Loc.GetString($"shell-target-player-does-not-exist"));
return; return;
} }
var adminMgr = IoCManager.Resolve<IAdminManager>(); _adminManager.PromoteHost(targetPlayer);
adminMgr.PromoteHost(targetPlayer);
} }
} }
} }

View File

@@ -5,30 +5,28 @@ using Robust.Shared.Console;
namespace Content.Server.Administration.Commands namespace Content.Server.Administration.Commands
{ {
[AnyCommand] [AnyCommand]
public sealed class ReAdminCommand : IConsoleCommand public sealed class ReAdminCommand : LocalizedCommands
{ {
public string Command => "readmin"; [Dependency] private readonly IAdminManager _adminManager = default!;
public string Description => "Re-admins you if you previously de-adminned.";
public string Help => "Usage: readmin";
public void Execute(IConsoleShell shell, string argStr, string[] args) public override string Command => "readmin";
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{ {
var player = shell.Player; var player = shell.Player;
if (player == null) if (player == null)
{ {
shell.WriteLine("You cannot use this command from the server console."); shell.WriteLine(Loc.GetString($"shell-cannot-run-command-from-server"));
return; return;
} }
var mgr = IoCManager.Resolve<IAdminManager>(); if (_adminManager.GetAdminData(player, includeDeAdmin: true) == null)
if (mgr.GetAdminData(player, includeDeAdmin: true) == null)
{ {
shell.WriteLine("You're not an admin."); shell.WriteLine(Loc.GetString($"cmd-readmin-not-an-admin"));
return; return;
} }
mgr.ReAdmin(player); _adminManager.ReAdmin(player);
} }
} }
} }

View File

@@ -5,46 +5,43 @@ using Robust.Shared.Prototypes;
namespace Content.Server.Administration.Commands namespace Content.Server.Administration.Commands
{ {
[AdminCommand(AdminFlags.Mapping)] [AdminCommand(AdminFlags.Mapping)]
public sealed class RemoveExtraComponents : IConsoleCommand public sealed class RemoveExtraComponents : LocalizedEntityCommands
{ {
public string Command => "removeextracomponents"; [Dependency] private readonly IComponentFactory _compFactory = default!;
public string Description => "Removes all components from all entities of the specified id if that component is not in its prototype.\nIf no id is specified, it matches all entities."; [Dependency] private readonly IPrototypeManager _prototypeManager = default!;
public string Help => $"{Command} <entityId> / {Command}";
public void Execute(IConsoleShell shell, string argStr, string[] args) public override string Command => "removeextracomponents";
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{ {
var id = args.Length == 0 ? null : string.Join(" ", args); var id = args.Length == 0 ? null : string.Join(" ", args);
var entityManager = IoCManager.Resolve<IEntityManager>();
var prototypeManager = IoCManager.Resolve<IPrototypeManager>();
var fac = IoCManager.Resolve<IComponentFactory>();
EntityPrototype? prototype = null; EntityPrototype? prototype = null;
var checkPrototype = !string.IsNullOrEmpty(id); var checkPrototype = !string.IsNullOrEmpty(id);
if (checkPrototype && !prototypeManager.TryIndex(id!, out prototype)) if (checkPrototype && !_prototypeManager.TryIndex(id!, out prototype))
{ {
shell.WriteError($"Can't find entity prototype with id \"{id}\"!"); shell.WriteError(Loc.GetString($"cmd-removeextracomponents-invalid-prototype-id", ("id", $"{id}")));
return; return;
} }
var entities = 0; var entities = 0;
var components = 0; var components = 0;
foreach (var entity in entityManager.GetEntities()) foreach (var entity in EntityManager.GetEntities())
{ {
var metaData = entityManager.GetComponent<MetaDataComponent>(entity); var metaData = EntityManager.GetComponent<MetaDataComponent>(entity);
if (checkPrototype && metaData.EntityPrototype != prototype || metaData.EntityPrototype == null) if (checkPrototype && metaData.EntityPrototype != prototype || metaData.EntityPrototype == null)
{
continue; continue;
}
var modified = false; var modified = false;
foreach (var component in entityManager.GetComponents(entity)) foreach (var component in EntityManager.GetComponents(entity))
{ {
if (metaData.EntityPrototype.Components.ContainsKey(fac.GetComponentName(component.GetType()))) if (metaData.EntityPrototype.Components.ContainsKey(_compFactory.GetComponentName(component.GetType())))
continue; continue;
entityManager.RemoveComponent(entity, component); EntityManager.RemoveComponent(entity, component);
components++; components++;
modified = true; modified = true;
@@ -54,7 +51,18 @@ namespace Content.Server.Administration.Commands
entities++; entities++;
} }
shell.WriteLine($"Removed {components} components from {entities} entities{(id == null ? "." : $" with id {id}")}"); if (id != null)
{
shell.WriteLine(Loc.GetString($"cmd-removeextracomponents-success-with-id",
("count", components),
("entities", entities),
("id", id)));
return;
}
shell.WriteLine(Loc.GetString($"cmd-removeextracomponents-success",
("count", components),
("entities", entities)));
} }
} }
} }

View File

@@ -5,13 +5,13 @@ using Robust.Shared.Console;
namespace Content.Server.Administration.Commands; namespace Content.Server.Administration.Commands;
[AdminCommand(AdminFlags.Ban)] [AdminCommand(AdminFlags.Ban)]
public sealed class RoleUnbanCommand : IConsoleCommand public sealed class RoleUnbanCommand : LocalizedCommands
{ {
public string Command => "roleunban"; [Dependency] private readonly IBanManager _banManager = default!;
public string Description => Loc.GetString("cmd-roleunban-desc");
public string Help => Loc.GetString("cmd-roleunban-help");
public async void Execute(IConsoleShell shell, string argStr, string[] args) public override string Command => "roleunban";
public override async void Execute(IConsoleShell shell, string argStr, string[] args)
{ {
if (args.Length != 1) if (args.Length != 1)
{ {
@@ -21,16 +21,15 @@ public sealed class RoleUnbanCommand : IConsoleCommand
if (!int.TryParse(args[0], out var banId)) if (!int.TryParse(args[0], out var banId))
{ {
shell.WriteLine($"Unable to parse {args[0]} as a ban id integer.\n{Help}"); shell.WriteLine(Loc.GetString($"cmd-roleunban-unable-to-parse-id", ("id", args[0]), ("help", Help)));
return; return;
} }
var banManager = IoCManager.Resolve<IBanManager>(); var response = await _banManager.PardonRoleBan(banId, shell.Player?.UserId, DateTimeOffset.Now);
var response = await banManager.PardonRoleBan(banId, shell.Player?.UserId, DateTimeOffset.Now);
shell.WriteLine(response); shell.WriteLine(response);
} }
public CompletionResult GetCompletion(IConsoleShell shell, string[] args) public override CompletionResult GetCompletion(IConsoleShell shell, string[] args)
{ {
// Can't think of good way to do hint options for this // Can't think of good way to do hint options for this
return args.Length switch return args.Length switch

View File

@@ -6,13 +6,14 @@ using Robust.Shared.Console;
namespace Content.Server.Administration.Commands namespace Content.Server.Administration.Commands
{ {
[AdminCommand(AdminFlags.NameColor)] [AdminCommand(AdminFlags.NameColor)]
internal sealed class SetAdminOOC : IConsoleCommand internal sealed class SetAdminOOC : LocalizedCommands
{ {
public string Command => "setadminooc"; [Dependency] private readonly IServerDbManager _dbManager = default!;
public string Description => Loc.GetString("set-admin-ooc-command-description", ("command", Command)); [Dependency] private readonly IServerPreferencesManager _preferenceManager = default!;
public string Help => Loc.GetString("set-admin-ooc-command-help-text", ("command", Command));
public void Execute(IConsoleShell shell, string argStr, string[] args) public override string Command => "setadminooc";
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{ {
if (shell.Player == null) if (shell.Player == null)
{ {
@@ -36,11 +37,9 @@ namespace Content.Server.Administration.Commands
var userId = shell.Player.UserId; var userId = shell.Player.UserId;
// Save the DB // Save the DB
var dbMan = IoCManager.Resolve<IServerDbManager>(); _dbManager.SaveAdminOOCColorAsync(userId, color.Value);
dbMan.SaveAdminOOCColorAsync(userId, color.Value);
// Update the cached preference // Update the cached preference
var prefManager = IoCManager.Resolve<IServerPreferencesManager>(); var prefs = _preferenceManager.GetPreferences(userId);
var prefs = prefManager.GetPreferences(userId);
prefs.AdminOOCColor = color.Value; prefs.AdminOOCColor = color.Value;
} }
} }

View File

@@ -1,4 +1,3 @@
using Content.Server.Players;
using Content.Shared.Administration; using Content.Shared.Administration;
using Content.Shared.Mind; using Content.Shared.Mind;
using Content.Shared.Mind.Components; using Content.Shared.Mind.Components;
@@ -9,17 +8,16 @@ using Robust.Shared.Console;
namespace Content.Server.Administration.Commands namespace Content.Server.Administration.Commands
{ {
[AdminCommand(AdminFlags.Admin)] [AdminCommand(AdminFlags.Admin)]
sealed class SetMindCommand : IConsoleCommand public sealed class SetMindCommand : LocalizedEntityCommands
{ {
[Dependency] private readonly IEntityManager _entManager = default!; [Dependency] private readonly IPlayerManager _playerManager = default!;
[Dependency] private readonly SharedMindSystem _mindSystem = default!;
public string Command => "setmind"; public override string Command => "setmind";
public string Description => Loc.GetString("set-mind-command-description", ("requiredComponent", nameof(MindContainerComponent))); public override string Description => Loc.GetString("cmd-setmind-desc", ("requiredComponent", nameof(MindContainerComponent)));
public string Help => Loc.GetString("set-mind-command-help-text", ("command", Command)); public override void Execute(IConsoleShell shell, string argStr, string[] args)
public void Execute(IConsoleShell shell, string argStr, string[] args)
{ {
if (args.Length < 2) if (args.Length < 2)
{ {
@@ -33,7 +31,7 @@ namespace Content.Server.Administration.Commands
return; return;
} }
bool ghostOverride = true; var ghostOverride = true;
if (args.Length > 2) if (args.Length > 2)
{ {
ghostOverride = bool.Parse(args[2]); ghostOverride = bool.Parse(args[2]);
@@ -41,19 +39,19 @@ namespace Content.Server.Administration.Commands
var nent = new NetEntity(entInt); var nent = new NetEntity(entInt);
if (!_entManager.TryGetEntity(nent, out var eUid)) if (!EntityManager.TryGetEntity(nent, out var eUid))
{ {
shell.WriteLine(Loc.GetString("shell-invalid-entity-id")); shell.WriteLine(Loc.GetString("shell-invalid-entity-id"));
return; return;
} }
if (!_entManager.HasComponent<MindContainerComponent>(eUid)) if (!EntityManager.HasComponent<MindContainerComponent>(eUid))
{ {
shell.WriteLine(Loc.GetString("set-mind-command-target-has-no-mind-message")); shell.WriteLine(Loc.GetString("cmd-setmind-target-has-no-mind-message"));
return; return;
} }
if (!IoCManager.Resolve<IPlayerManager>().TryGetSessionByUsername(args[1], out var session)) if (!_playerManager.TryGetSessionByUsername(args[1], out var session))
{ {
shell.WriteLine(Loc.GetString("shell-target-player-does-not-exist")); shell.WriteLine(Loc.GetString("shell-target-player-does-not-exist"));
return; return;
@@ -63,24 +61,21 @@ namespace Content.Server.Administration.Commands
var playerCData = session.ContentData(); var playerCData = session.ContentData();
if (playerCData == null) if (playerCData == null)
{ {
shell.WriteLine(Loc.GetString("set-mind-command-target-has-no-content-data-message")); shell.WriteLine(Loc.GetString("cmd-setmind-target-has-no-content-data-message"));
return; return;
} }
var mindSystem = _entManager.System<SharedMindSystem>(); var metadata = EntityManager.GetComponent<MetaDataComponent>(eUid.Value);
var metadata = _entManager.GetComponent<MetaDataComponent>(eUid.Value);
var mind = playerCData.Mind ?? mindSystem.CreateMind(session.UserId, metadata.EntityName); var mind = playerCData.Mind ?? _mindSystem.CreateMind(session.UserId, metadata.EntityName);
mindSystem.TransferTo(mind, eUid, ghostOverride); _mindSystem.TransferTo(mind, eUid, ghostOverride);
} }
public CompletionResult GetCompletion(IConsoleShell shell, string[] args) public override CompletionResult GetCompletion(IConsoleShell shell, string[] args)
{ {
if (args.Length == 2) if (args.Length == 2)
{ return CompletionResult.FromHintOptions(CompletionHelper.SessionNames(), Help);
return CompletionResult.FromHintOptions(CompletionHelper.SessionNames(), Loc.GetString("cmd-mind-command-hint"));
}
return CompletionResult.Empty; return CompletionResult.Empty;
} }

View File

@@ -6,46 +6,36 @@ using Robust.Shared.Console;
namespace Content.Server.Administration.Commands namespace Content.Server.Administration.Commands
{ {
[AdminCommand(AdminFlags.Round)] [AdminCommand(AdminFlags.Round)]
public sealed class CallShuttleCommand : IConsoleCommand public sealed class CallShuttleCommand : LocalizedEntityCommands
{ {
[Dependency] private readonly IEntityManager _e = default!; [Dependency] private readonly RoundEndSystem _roundEndSystem = default!;
public string Command => "callshuttle"; public override string Command => "callshuttle";
public string Description => Loc.GetString("call-shuttle-command-description");
public string Help => Loc.GetString("call-shuttle-command-help-text", ("command",Command));
public void Execute(IConsoleShell shell, string argStr, string[] args) public override void Execute(IConsoleShell shell, string argStr, string[] args)
{ {
var loc = IoCManager.Resolve<ILocalizationManager>();
// ReSharper disable once ConvertIfStatementToSwitchStatement // ReSharper disable once ConvertIfStatementToSwitchStatement
if (args.Length == 1 && TimeSpan.TryParseExact(args[0], ContentLocalizationManager.TimeSpanMinutesFormats, loc.DefaultCulture, out var timeSpan)) if (args.Length == 1 && TimeSpan.TryParseExact(args[0], ContentLocalizationManager.TimeSpanMinutesFormats, LocalizationManager.DefaultCulture, out var timeSpan))
{ _roundEndSystem.RequestRoundEnd(timeSpan, shell.Player?.AttachedEntity, false);
_e.System<RoundEndSystem>().RequestRoundEnd(timeSpan, shell.Player?.AttachedEntity, false);
}
else if (args.Length == 1) else if (args.Length == 1)
{
shell.WriteLine(Loc.GetString("shell-timespan-minutes-must-be-correct")); shell.WriteLine(Loc.GetString("shell-timespan-minutes-must-be-correct"));
}
else else
{ _roundEndSystem.RequestRoundEnd(shell.Player?.AttachedEntity, false);
_e.System<RoundEndSystem>().RequestRoundEnd(shell.Player?.AttachedEntity, false);
}
} }
} }
[AdminCommand(AdminFlags.Round)] [AdminCommand(AdminFlags.Round)]
public sealed class RecallShuttleCommand : IConsoleCommand public sealed class RecallShuttleCommand : LocalizedEntityCommands
{ {
[Dependency] private readonly IEntityManager _e = default!; [Dependency] private readonly RoundEndSystem _roundEndSystem = default!;
public string Command => "recallshuttle"; public override string Command => "recallshuttle";
public string Description => Loc.GetString("recall-shuttle-command-description");
public string Help => Loc.GetString("recall-shuttle-command-help-text", ("command",Command));
public void Execute(IConsoleShell shell, string argStr, string[] args) public override void Execute(IConsoleShell shell, string argStr, string[] args)
{ {
_e.System<RoundEndSystem>().CancelRoundEndCountdown(shell.Player?.AttachedEntity, false); _roundEndSystem.CancelRoundEndCountdown(shell.Player?.AttachedEntity, false);
} }
} }
} }

View File

@@ -6,34 +6,31 @@ using Robust.Shared.Console;
namespace Content.Server.Afk namespace Content.Server.Afk
{ {
[AdminCommand(AdminFlags.Admin)] [AdminCommand(AdminFlags.Admin)]
public sealed class IsAfkCommand : IConsoleCommand public sealed class IsAfkCommand : LocalizedCommands
{ {
[Dependency] private readonly IAfkManager _afkManager = default!;
[Dependency] private readonly IPlayerManager _players = default!; [Dependency] private readonly IPlayerManager _players = default!;
public string Command => "isafk"; public override string Command => "isafk";
public string Description => "Checks if a specified player is AFK";
public string Help => "Usage: isafk <playerName>";
public void Execute(IConsoleShell shell, string argStr, string[] args) public override void Execute(IConsoleShell shell, string argStr, string[] args)
{ {
var afkManager = IoCManager.Resolve<IAfkManager>();
if (args.Length == 0) if (args.Length == 0)
{ {
shell.WriteError("Need one argument"); shell.WriteError(Loc.GetString($"shell-need-exactly-one-argument"));
return; return;
} }
if (!_players.TryGetSessionByUsername(args[0], out var player)) if (!_players.TryGetSessionByUsername(args[0], out var player))
{ {
shell.WriteError("Unable to find that player"); shell.WriteError(Loc.GetString($"shell-target-player-does-not-exist"));
return; return;
} }
shell.WriteLine(afkManager.IsAfk(player) ? "They are indeed AFK" : "They are not AFK"); shell.WriteLine(Loc.GetString(_afkManager.IsAfk(player) ? "cmd-isafk-true" : "cmd-isafk-false"));
} }
public CompletionResult GetCompletion(IConsoleShell shell, string[] args) public override CompletionResult GetCompletion(IConsoleShell shell, string[] args)
{ {
if (args.Length == 1) if (args.Length == 1)
{ {

View File

@@ -3,23 +3,23 @@ using Content.Server.Body.Systems;
using Content.Shared.Administration; using Content.Shared.Administration;
using Content.Shared.Body.Components; using Content.Shared.Body.Components;
using Robust.Shared.Console; using Robust.Shared.Console;
using Robust.Shared.Random;
namespace Content.Server.Body.Commands namespace Content.Server.Body.Commands
{ {
[AdminCommand(AdminFlags.Fun)] [AdminCommand(AdminFlags.Fun)]
sealed class DestroyMechanismCommand : IConsoleCommand internal sealed class DestroyMechanismCommand : LocalizedEntityCommands
{ {
public string Command => "destroymechanism"; [Dependency] private readonly IComponentFactory _compFactory = default!;
public string Description => "Destroys a mechanism from your entity"; [Dependency] private readonly BodySystem _bodySystem = default!;
public string Help => $"Usage: {Command} <mechanism>";
public void Execute(IConsoleShell shell, string argStr, string[] args) public override string Command => "destroymechanism";
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{ {
var player = shell.Player; var player = shell.Player;
if (player == null) if (player == null)
{ {
shell.WriteLine("Only a player can run this command."); shell.WriteLine(Loc.GetString($"shell-only-players-can-run-this-command"));
return; return;
} }
@@ -31,36 +31,29 @@ namespace Content.Server.Body.Commands
if (player.AttachedEntity is not {} attached) if (player.AttachedEntity is not {} attached)
{ {
shell.WriteLine("You have no entity."); shell.WriteLine(Loc.GetString($"shell-must-be-attached-to-entity"));
return; return;
} }
var entityManager = IoCManager.Resolve<IEntityManager>(); if (!EntityManager.TryGetComponent(attached, out BodyComponent? body))
var fac = IoCManager.Resolve<IComponentFactory>();
if (!entityManager.TryGetComponent(attached, out BodyComponent? body))
{ {
var random = IoCManager.Resolve<IRobustRandom>(); shell.WriteLine(Loc.GetString($"shell-must-have-body"));
var text = $"You have no body{(random.Prob(0.2f) ? " and you must scream." : ".")}";
shell.WriteLine(text);
return; return;
} }
var mechanismName = string.Join(" ", args).ToLowerInvariant(); var mechanismName = string.Join(" ", args).ToLowerInvariant();
var bodySystem = entityManager.System<BodySystem>();
foreach (var organ in bodySystem.GetBodyOrgans(attached, body)) foreach (var organ in _bodySystem.GetBodyOrgans(attached, body))
{ {
if (fac.GetComponentName(organ.Component.GetType()).ToLowerInvariant() == mechanismName) if (_compFactory.GetComponentName(organ.Component.GetType()).ToLowerInvariant() == mechanismName)
{ {
entityManager.QueueDeleteEntity(organ.Id); EntityManager.QueueDeleteEntity(organ.Id);
shell.WriteLine($"Mechanism with name {mechanismName} has been destroyed."); shell.WriteLine(Loc.GetString($"cmd-destroymechanism-success", ("name", mechanismName)));
return; return;
} }
} }
shell.WriteLine($"No mechanism was found with name {mechanismName}."); shell.WriteLine(Loc.GetString($"cmd-destroymechanism-no-mechanism-found", ("name", mechanismName)));
} }
} }
} }

View File

@@ -1,4 +1,4 @@
call-shuttle-command-description = Calls the emergency shuttle with an optionally provided arrival time. cmd-callshuttle-desc = Calls the emergency shuttle with an optionally provided arrival time.
call-shuttle-command-help-text = Usage: {$command} [m:ss] cmd-callshuttle-help = Usage: callshuttle [m:ss]
recall-shuttle-command-description = Recalls the emergency shuttle. cmd-recallshuttle-desc = Recalls the emergency shuttle.
recall-shuttle-command-help-text = Usage: {$command} cmd-recallshuttle-help = Usage: recallshuttle

View File

@@ -1,2 +1,2 @@
set-admin-ooc-command-description = Sets the color of your OOC messages. Color must be in hex format, example: {$command} #c43b23 cmd-setadminooc-desc = Sets the color of your OOC messages. Color must be in hex format, example: setadminooc #c43b23
set-admin-ooc-command-help-text = Usage: {$command} <color> cmd-setadminooc-help = Usage: setadminooc <color>

View File

@@ -1,5 +1,4 @@
set-mind-command-description = Transfers a mind to the specified entity. The entity must have a {$requiredComponent}. By default this will force minds that are currently visiting other entities to return (i.e., return a ghost to their main body). cmd-setmind-desc = Transfers a mind to the specified entity. The entity must have a {$requiredComponent}. By default this will force minds that are currently visiting other entities to return (i.e., return a ghost to their main body).
set-mind-command-help-text = Usage: {$command} <entityUid> <username> [unvisit] cmd-setmind-help = Usage: {$command} <entityUid> <username> [unvisit]
set-mind-command-target-has-no-content-data-message = Target player does not have content data (wtf?) cmd-setmind-command-target-has-no-content-data-message = Target player does not have content data (wtf?)
set-mind-command-target-has-no-mind-message = Target entity does not have a mind (did you forget to make sentient?) cmd-setmind-command-target-has-no-mind-message = Target entity does not have a mind (did you forget to make sentient?)
cmd-mind-command-hint = username

View File

@@ -0,0 +1,4 @@
cmd-destroymechanism-desc = Destroys a mechanism from your entity.
cmd-destroymechanism-help = Usage: destroymechanism <mechanism>
cmd-destroymechanism-success = Mechanism with name {$name} has been destroyed.
cmd-destroymechanism-no-mechanism-found = No mechanism was found with name {$name}.

View File

@@ -0,0 +1,4 @@
cmd-isafk-desc = Checks if a specified player is AFK.
cmd-isafk-help = Usage: isafk <playerName>
cmd-isafk-true = They are indeed AFK.
cmd-isafk-false = They are not AFK.

View File

@@ -0,0 +1,2 @@
cmd-promotehost-desc = Grants client temporary full host admin privileges. Use this to bootstrap admins.
cmd-promotehost-help = Usage promotehost <player>

View File

@@ -0,0 +1,3 @@
cmd-readmin-desc = Re-admins you if you previously de-adminned.
cmd-readmin-help = Usage: readmin
cmd-readmin-not-an-admin = You're not an admin.

View File

@@ -0,0 +1,5 @@
cmd-removeextracomponents-desc = Removes all components from all entities of the specified id if that component is not in its prototype.\nIf no id is specified, it matches all entities.
cmd-removeextracomponents-help = removeextracomponents / removeextracomponents <entityId>
cmd-removeextracomponents-invalid-prototype-id = Can't find entity prototype with id {$id}.
cmd-removeextracomponents-success = Removed {$count} components from {$entities},
cmd-removeextracomponents-success-with-id = Removed {$count} components from {$entities} with id {$id}.

View File

@@ -22,6 +22,8 @@ cmd-roleban-hint-duration-6 = 1 month
cmd-roleunban-desc = Pardons a player's role ban cmd-roleunban-desc = Pardons a player's role ban
cmd-roleunban-help = Usage: roleunban <role ban id> cmd-roleunban-help = Usage: roleunban <role ban id>
cmd-roleunban-unable-to-parse-id = Unable to parse {$id} as a ban id integer.
{$help}
## Completion result hints ## Completion result hints
cmd-roleunban-hint-1 = <role ban id> cmd-roleunban-hint-1 = <role ban id>

View File

@@ -8,6 +8,7 @@ shell-invalid-command-specific = Invalid {$commandName} command.
shell-cannot-run-command-from-server = You cannot run this command from the server. shell-cannot-run-command-from-server = You cannot run this command from the server.
shell-only-players-can-run-this-command = Only players can run this command. shell-only-players-can-run-this-command = Only players can run this command.
shell-must-be-attached-to-entity = You must be attached to an entity to run this command. shell-must-be-attached-to-entity = You must be attached to an entity to run this command.
shell-must-have-body = You must have a body to run this command.
## Arguments ## Arguments