Removed LocalizationManager dependencies (#2059)
* Removed LocalizationManager dependencies * Fixed error Co-authored-by: David Tan <>
This commit is contained in:
@@ -16,22 +16,19 @@ namespace Content.Server.Administration
|
||||
{
|
||||
get
|
||||
{
|
||||
var localizationManager = IoCManager.Resolve<ILocalizationManager>();
|
||||
return localizationManager.GetString("Deletes entities with the specified components.");
|
||||
return Loc.GetString("Deletes entities with the specified components.");
|
||||
}
|
||||
}
|
||||
public string Help
|
||||
{
|
||||
get
|
||||
{
|
||||
var localizationManager = IoCManager.Resolve<ILocalizationManager>();
|
||||
return localizationManager.GetString("Usage: deleteewc <componentName_1> <componentName_2> ... <componentName_n>\nDeletes any entities with the components specified.");
|
||||
return Loc.GetString("Usage: deleteewc <componentName_1> <componentName_2> ... <componentName_n>\nDeletes any entities with the components specified.");
|
||||
}
|
||||
}
|
||||
|
||||
public void Execute(IConsoleShell shell, IPlayerSession player, string[] args)
|
||||
{
|
||||
var localizationManager = IoCManager.Resolve<ILocalizationManager>();
|
||||
if (args.Length < 1)
|
||||
{
|
||||
shell.SendText(player, Help);
|
||||
@@ -55,7 +52,7 @@ namespace Content.Server.Administration
|
||||
count += 1;
|
||||
}
|
||||
|
||||
shell.SendText(player, localizationManager.GetString("Deleted {0} entities", count));
|
||||
shell.SendText(player, Loc.GetString("Deleted {0} entities", count));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,28 +15,25 @@ namespace Content.Server.Administration
|
||||
{
|
||||
get
|
||||
{
|
||||
var localizationManager = IoCManager.Resolve<ILocalizationManager>();
|
||||
return localizationManager.GetString("Fully heals a mob.");
|
||||
return Loc.GetString("Fully heals a mob.");
|
||||
}
|
||||
}
|
||||
public string Help
|
||||
{
|
||||
get
|
||||
{
|
||||
var localizationManager = IoCManager.Resolve<ILocalizationManager>();
|
||||
return localizationManager.GetString("Usage: rejuvenate <mobUid_1> <mobUid_2> ... <mobUid_n>\nAttempts to heal the user's mob if no arguments are provided.");
|
||||
return Loc.GetString("Usage: rejuvenate <mobUid_1> <mobUid_2> ... <mobUid_n>\nAttempts to heal the user's mob if no arguments are provided.");
|
||||
}
|
||||
}
|
||||
|
||||
public void Execute(IConsoleShell shell, IPlayerSession player, string[] args)
|
||||
{
|
||||
var localizationManager = IoCManager.Resolve<ILocalizationManager>();
|
||||
if (args.Length < 1 && player != null) //Try to heal the users mob if applicable
|
||||
{
|
||||
shell.SendText(player, localizationManager.GetString("Healing the user's mob since no arguments were provided."));
|
||||
shell.SendText(player, Loc.GetString("Healing the user's mob since no arguments were provided."));
|
||||
if (player.AttachedEntity == null)
|
||||
{
|
||||
shell.SendText(player, localizationManager.GetString("There's no entity attached to the user."));
|
||||
shell.SendText(player, Loc.GetString("There's no entity attached to the user."));
|
||||
return;
|
||||
}
|
||||
RejuvenateVerb.PerformRejuvenate(player.AttachedEntity);
|
||||
@@ -47,7 +44,7 @@ namespace Content.Server.Administration
|
||||
{
|
||||
if(!EntityUid.TryParse(arg, out var uid) || !entityManager.TryGetEntity(uid, out var entity))
|
||||
{
|
||||
shell.SendText(player, localizationManager.GetString("Could not find entity {0}", arg));
|
||||
shell.SendText(player, Loc.GetString("Could not find entity {0}", arg));
|
||||
continue;
|
||||
}
|
||||
RejuvenateVerb.PerformRejuvenate(entity);
|
||||
|
||||
Reference in New Issue
Block a user