From 7b1ed2bd29eb797c594e9354747f5564d0138cfd Mon Sep 17 00:00:00 2001 From: Pieter-Jan Briers Date: Mon, 26 Jan 2026 00:02:57 +0100 Subject: [PATCH] Remove duplicate loc getstring calls (#42648) guh --- Content.Server/Actions/Commands/AddActionCommand.cs | 2 +- Content.Server/Actions/Commands/RemoveActionCommand.cs | 2 +- Content.Server/Forensics/Systems/ForensicsSystem.cs | 4 ++-- Content.Server/GameTicking/Commands/ForceMapCommand.cs | 2 +- Content.Server/Nuke/Commands/ToggleNukeCommand.cs | 2 +- Content.Server/Objectives/Commands/AddObjectiveCommand.cs | 4 ++-- Content.Server/Objectives/Commands/RemoveObjectiveCommand.cs | 2 +- Content.Server/StationEvents/Events/BreakerFlipRule.cs | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Content.Server/Actions/Commands/AddActionCommand.cs b/Content.Server/Actions/Commands/AddActionCommand.cs index 5b80c92aa91..10b53ad0230 100644 --- a/Content.Server/Actions/Commands/AddActionCommand.cs +++ b/Content.Server/Actions/Commands/AddActionCommand.cs @@ -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; } diff --git a/Content.Server/Actions/Commands/RemoveActionCommand.cs b/Content.Server/Actions/Commands/RemoveActionCommand.cs index 541f8f88f98..084a4b5de6c 100644 --- a/Content.Server/Actions/Commands/RemoveActionCommand.cs +++ b/Content.Server/Actions/Commands/RemoveActionCommand.cs @@ -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; } diff --git a/Content.Server/Forensics/Systems/ForensicsSystem.cs b/Content.Server/Forensics/Systems/ForensicsSystem.cs index 078ce44e2b7..7d700df02d2 100644 --- a/Content.Server/Forensics/Systems/ForensicsSystem.cs +++ b/Content.Server/Forensics/Systems/ForensicsSystem.cs @@ -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 }; diff --git a/Content.Server/GameTicking/Commands/ForceMapCommand.cs b/Content.Server/GameTicking/Commands/ForceMapCommand.cs index f8553a9244f..ec42d971796 100644 --- a/Content.Server/GameTicking/Commands/ForceMapCommand.cs +++ b/Content.Server/GameTicking/Commands/ForceMapCommand.cs @@ -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; } diff --git a/Content.Server/Nuke/Commands/ToggleNukeCommand.cs b/Content.Server/Nuke/Commands/ToggleNukeCommand.cs index e499afb225e..53bdbd646d6 100644 --- a/Content.Server/Nuke/Commands/ToggleNukeCommand.cs +++ b/Content.Server/Nuke/Commands/ToggleNukeCommand.cs @@ -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) diff --git a/Content.Server/Objectives/Commands/AddObjectiveCommand.cs b/Content.Server/Objectives/Commands/AddObjectiveCommand.cs index 3eddd45208b..e2f7229fcad 100644 --- a/Content.Server/Objectives/Commands/AddObjectiveCommand.cs +++ b/Content.Server/Objectives/Commands/AddObjectiveCommand.cs @@ -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")); } } diff --git a/Content.Server/Objectives/Commands/RemoveObjectiveCommand.cs b/Content.Server/Objectives/Commands/RemoveObjectiveCommand.cs index 4b300cd1951..0624b79f3d2 100644 --- a/Content.Server/Objectives/Commands/RemoveObjectiveCommand.cs +++ b/Content.Server/Objectives/Commands/RemoveObjectiveCommand.cs @@ -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; } diff --git a/Content.Server/StationEvents/Events/BreakerFlipRule.cs b/Content.Server/StationEvents/Events/BreakerFlipRule.cs index 8a25d40abbc..3ab9fbd2092 100644 --- a/Content.Server/StationEvents/Events/BreakerFlipRule.cs +++ b/Content.Server/StationEvents/Events/BreakerFlipRule.cs @@ -17,7 +17,7 @@ public sealed class BreakerFlipRule : StationEventSystem(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);