Remove duplicate loc getstring calls (#42648)

guh
This commit is contained in:
Pieter-Jan Briers
2026-01-26 00:02:57 +01:00
committed by GitHub
parent 65b8aafed8
commit 7b1ed2bd29
8 changed files with 10 additions and 10 deletions

View File

@@ -21,7 +21,7 @@ public sealed class AddActionCommand : LocalizedEntityCommands
{
if (args.Length != 2)
{
shell.WriteError(Loc.GetString(Loc.GetString("cmd-addaction-invalid-args")));
shell.WriteError(Loc.GetString("cmd-addaction-invalid-args"));
return;
}

View File

@@ -17,7 +17,7 @@ public sealed class RemoveActionCommand : LocalizedEntityCommands
{
if (args.Length != 2)
{
shell.WriteError(Loc.GetString(Loc.GetString("cmd-rmaction-invalid-args")));
shell.WriteError(Loc.GetString("cmd-rmaction-invalid-args"));
return;
}

View File

@@ -197,8 +197,8 @@ namespace Content.Server.Forensics
{
Act = () => TryStartCleaning(entity, user, target),
Icon = new SpriteSpecifier.Texture(new("/Textures/Interface/VerbIcons/bubbles.svg.192dpi.png")),
Text = Loc.GetString(Loc.GetString("forensics-verb-text")),
Message = Loc.GetString(Loc.GetString("forensics-verb-message")),
Text = Loc.GetString("forensics-verb-text"),
Message = Loc.GetString("forensics-verb-message"),
// This is important because if its true using the cleaning device will count as touching the object.
DoContactInteraction = false
};

View File

@@ -23,7 +23,7 @@ namespace Content.Server.GameTicking.Commands
{
if (args.Length != 1)
{
shell.WriteLine(Loc.GetString(Loc.GetString($"shell-need-exactly-one-argument")));
shell.WriteLine(Loc.GetString("shell-need-exactly-one-argument"));
return;
}

View File

@@ -64,7 +64,7 @@ public sealed class ToggleNukeCommand : LocalizedCommands
{
if (args.Length == 1)
{
return CompletionResult.FromHint(Loc.GetString(Loc.GetString("cmd-nukearm-1-help")));
return CompletionResult.FromHint(Loc.GetString("cmd-nukearm-1-help"));
}
if (args.Length == 2)

View File

@@ -24,7 +24,7 @@ public sealed class AddObjectiveCommand : LocalizedEntityCommands
{
if (args.Length != 2)
{
shell.WriteError(Loc.GetString(Loc.GetString("cmd-addobjective-invalid-args")));
shell.WriteError(Loc.GetString("cmd-addobjective-invalid-args"));
return;
}
@@ -68,6 +68,6 @@ public sealed class AddObjectiveCommand : LocalizedEntityCommands
return CompletionResult.FromHintOptions(
_objectives.Objectives(),
Loc.GetString(Loc.GetString("cmd-add-objective-obj-completion")));
Loc.GetString("cmd-add-objective-obj-completion"));
}
}

View File

@@ -19,7 +19,7 @@ namespace Content.Server.Objectives.Commands
{
if (args.Length != 2)
{
shell.WriteError(Loc.GetString(Loc.GetString("cmd-rmobjective-invalid-args")));
shell.WriteError(Loc.GetString("cmd-rmobjective-invalid-args"));
return;
}

View File

@@ -17,7 +17,7 @@ public sealed class BreakerFlipRule : StationEventSystem<BreakerFlipRuleComponen
if (!TryComp<StationEventComponent>(uid, out var stationEvent))
return;
var str = Loc.GetString("station-event-breaker-flip-announcement", ("data", Loc.GetString(Loc.GetString($"random-sentience-event-data-{RobustRandom.Next(1, 6)}"))));
var str = Loc.GetString("station-event-breaker-flip-announcement", ("data", Loc.GetString($"random-sentience-event-data-{RobustRandom.Next(1, 6)}")));
stationEvent.StartAnnouncement = str;
base.Added(uid, component, gameRule, args);