* owo

* URGENT FIXES

* typo moment
This commit is contained in:
Moony
2021-11-27 00:43:33 -06:00
committed by GitHub
parent ce6fe6af32
commit 469d57f34e
2 changed files with 47 additions and 3 deletions

View File

@@ -0,0 +1,46 @@
using Content.Server.Speech.EntitySystems;
using Content.Shared.Administration;
using Robust.Shared.Console;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Localization;
using Robust.Shared.Random;
namespace Content.Server.Administration.Commands;
[AdminCommand(AdminFlags.Fun)]
public class OwoifyCommand : IConsoleCommand
{
public string Command => "owoify";
public string Description => "For when you need everything to be cat. Uses OwOAccent's formatting on the name and description of an entity.";
public string Help => "owoify <id>";
public void Execute(IConsoleShell shell, string argStr, string[] args)
{
if (args.Length != 1)
{
shell.WriteLine(Loc.GetString("shell-wrong-arguments-number"));
return;
}
var entityManager = IoCManager.Resolve<IEntityManager>();
if (!int.TryParse(args[0], out var targetId))
{
shell.WriteLine(Loc.GetString("shell-argument-must-be-number"));
return;
}
var eUid = new EntityUid(targetId);
var meta = entityManager.GetComponent<MetaDataComponent>(eUid);
var random = IoCManager.Resolve<IRobustRandom>();
var owoSys = EntitySystem.Get<OwOAccentSystem>();
meta.EntityName = owoSys.Accentuate(meta.EntityName);
meta.EntityDescription = owoSys.Accentuate(meta.EntityDescription);
}
}