Removed old Loc.GetString() use instances (#4155)
Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Localization;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Serialization;
|
||||
using Robust.Shared.Serialization.Manager.Attributes;
|
||||
using Robust.Shared.Utility;
|
||||
@@ -26,7 +27,7 @@ namespace Content.Shared.CharacterAppearance
|
||||
|
||||
void ISerializationHooks.AfterDeserialization()
|
||||
{
|
||||
Name = Robust.Shared.Localization.Loc.GetString($"accessory-{ID}");
|
||||
Name = Loc.GetString($"accessory-{ID}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ using Content.Shared.Examine;
|
||||
using Content.Shared.NetIDs;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Localization;
|
||||
using Robust.Shared.Log;
|
||||
using Robust.Shared.Maths;
|
||||
using Robust.Shared.Players;
|
||||
@@ -195,7 +196,7 @@ namespace Content.Shared.Chemistry.Solution.Components
|
||||
|
||||
if (ReagentList.Count == 0)
|
||||
{
|
||||
message.AddText(Robust.Shared.Localization.Loc.GetString("Contains no chemicals."));
|
||||
message.AddText(Loc.GetString("shared-solution-container-component-on-examine-empty-container"));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -207,9 +208,13 @@ namespace Content.Shared.Chemistry.Solution.Components
|
||||
}
|
||||
|
||||
var colorHex = Color.ToHexNoAlpha(); //TODO: If the chem has a dark color, the examine text becomes black on a black background, which is unreadable.
|
||||
var messageString = "It contains a [color={0}]{1}[/color] " + (ReagentList.Count == 1 ? "chemical." : "mixture of chemicals.");
|
||||
var messageString = "shared-solution-container-component-on-examine-main-text";
|
||||
|
||||
message.AddMarkup(Robust.Shared.Localization.Loc.GetString(messageString, colorHex, Robust.Shared.Localization.Loc.GetString(proto.PhysicalDescription)));
|
||||
message.AddMarkup(Loc.GetString(messageString,
|
||||
("color", colorHex),
|
||||
("wordedAmount", Loc.GetString(ReagentList.Count == 1 ? "shared-solution-container-component-on-examine-worded-amount-one-reagent" :
|
||||
"shared-solution-container-component-on-examine-worded-amount-multiple-reagents")),
|
||||
("desc", Loc.GetString(proto.PhysicalDescription))));
|
||||
}
|
||||
|
||||
ReagentUnit ISolutionInteractionsComponent.RefillSpaceAvailable => EmptyVolume;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#nullable enable
|
||||
using Robust.Shared.Localization;
|
||||
using Robust.Shared.Serialization.Manager.Attributes;
|
||||
using Robust.Shared.Utility;
|
||||
|
||||
@@ -13,7 +14,7 @@ namespace Content.Shared.Construction.Steps
|
||||
public override void DoExamine(FormattedMessage message, bool inDetailsRange)
|
||||
{
|
||||
if (string.IsNullOrEmpty(Name)) return;
|
||||
message.AddMarkup(Robust.Shared.Localization.Loc.GetString("construction-insert-arbitrary-entity", ("stepName", Name)));
|
||||
message.AddMarkup(Loc.GetString("construction-insert-arbitrary-entity", ("stepName", Name)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#nullable enable
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Localization;
|
||||
using Robust.Shared.Serialization.Manager.Attributes;
|
||||
using Robust.Shared.Utility;
|
||||
|
||||
@@ -24,10 +25,10 @@ namespace Content.Shared.Construction.Steps
|
||||
public override void DoExamine(FormattedMessage message, bool inDetailsRange)
|
||||
{
|
||||
message.AddMarkup(string.IsNullOrEmpty(Name)
|
||||
? Robust.Shared.Localization.Loc.GetString(
|
||||
? Loc.GetString(
|
||||
"construction-insert-entity-with-component",
|
||||
("componentName", Component))// Terrible.
|
||||
: Robust.Shared.Localization.Loc.GetString(
|
||||
: Loc.GetString(
|
||||
"construction-insert-exact-entity",
|
||||
("entityName", Name)));
|
||||
}
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
#nullable enable
|
||||
#nullable enable
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Content.Shared.Stacks;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Localization;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Serialization.Manager.Attributes;
|
||||
using Robust.Shared.Utility;
|
||||
@@ -23,7 +24,7 @@ namespace Content.Shared.Construction.Steps
|
||||
|
||||
public override void DoExamine(FormattedMessage message, bool inDetailsRange)
|
||||
{
|
||||
message.AddMarkup(Robust.Shared.Localization.Loc.GetString("Next, add [color=yellow]{0}x[/color] [color=cyan]{1}[/color].", Amount, MaterialPrototype.Name));
|
||||
message.AddMarkup(Loc.GetString("construction-insert-material-entity",("amount", Amount),("materialName", MaterialPrototype.Name)));
|
||||
}
|
||||
|
||||
public override bool EntityValid(IEntity entity)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#nullable enable
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Localization;
|
||||
using Robust.Shared.Serialization.Manager.Attributes;
|
||||
using Robust.Shared.Utility;
|
||||
|
||||
@@ -18,11 +19,11 @@ namespace Content.Shared.Construction.Steps
|
||||
public override void DoExamine(FormattedMessage message, bool inDetailsRange)
|
||||
{
|
||||
message.AddMarkup(string.IsNullOrEmpty(Name)
|
||||
? Robust.Shared.Localization.Loc.GetString(
|
||||
? Loc.GetString(
|
||||
"construction-insert-prototype-no-name",
|
||||
("prototypeName", Prototype) // Terrible.
|
||||
)
|
||||
: Robust.Shared.Localization.Loc.GetString(
|
||||
: Loc.GetString(
|
||||
"construction-insert-prototype",
|
||||
("entityName", Name)
|
||||
));
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#nullable enable
|
||||
#nullable enable
|
||||
using Content.Shared.Tool;
|
||||
using Robust.Shared.Localization;
|
||||
using Robust.Shared.Serialization.Manager.Attributes;
|
||||
using Robust.Shared.Utility;
|
||||
|
||||
@@ -18,11 +19,11 @@ namespace Content.Shared.Construction.Steps
|
||||
{
|
||||
if (!string.IsNullOrEmpty(ExamineOverride))
|
||||
{
|
||||
message.AddMarkup(Robust.Shared.Localization.Loc.GetString(ExamineOverride));
|
||||
message.AddMarkup(Loc.GetString(ExamineOverride));
|
||||
return;
|
||||
}
|
||||
|
||||
message.AddMarkup(Robust.Shared.Localization.Loc.GetString($"Next, use a [color=cyan]{Tool.GetToolName()}[/color]."));
|
||||
message.AddMarkup(Loc.GetString("construction-use-tool-entity", ("toolName", Tool.GetToolName())));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ using Content.Shared.Notification.Managers;
|
||||
using Content.Shared.Physics;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Localization;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Physics;
|
||||
using Robust.Shared.Physics.Broadphase;
|
||||
@@ -327,7 +328,7 @@ namespace Content.Shared.Interaction
|
||||
|
||||
if (!inRange && popup)
|
||||
{
|
||||
var message = Robust.Shared.Localization.Loc.GetString("You can't reach there!");
|
||||
var message = Loc.GetString("shared-interaction-system-in-range-unobstructed-cannot-reach");
|
||||
origin.PopupMessage(message);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#nullable enable
|
||||
using System.Collections.Generic;
|
||||
using Robust.Shared.Localization;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Serialization.Manager.Attributes;
|
||||
using Robust.Shared.ViewVariables;
|
||||
@@ -31,7 +32,7 @@ namespace Content.Shared.Kitchen
|
||||
[DataField("time")]
|
||||
public int CookTime { get; } = 5;
|
||||
|
||||
public string Name => Robust.Shared.Localization.Loc.GetString(_name);
|
||||
public string Name => Loc.GetString(_name);
|
||||
|
||||
public IReadOnlyDictionary<string, int> IngredientsReagents => _ingsReagents;
|
||||
public IReadOnlyDictionary<string, int> IngredientsSolids => _ingsSolids;
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace Content.Shared.Localizations
|
||||
places += 1;
|
||||
}
|
||||
|
||||
return new LocValueString(Robust.Shared.Localization.Loc.GetString("zzzz-fmt-pressure", ("divided", pressure), ("places", places)));
|
||||
return new LocValueString(Loc.GetString("zzzz-fmt-pressure", ("divided", pressure), ("places", places)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using Content.Shared.Examine;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Localization;
|
||||
|
||||
namespace Content.Shared.Stacks
|
||||
{
|
||||
@@ -66,7 +67,7 @@ namespace Content.Shared.Stacks
|
||||
|
||||
args.Message.AddText("\n");
|
||||
args.Message.AddMarkup(
|
||||
Robust.Shared.Localization.Loc.GetString("comp-stack-examine-detail-count",
|
||||
Loc.GetString("comp-stack-examine-detail-count",
|
||||
("count", component.Count),
|
||||
("markupCountColor", "lightgray")
|
||||
)
|
||||
|
||||
@@ -3,6 +3,7 @@ using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Localization;
|
||||
using Robust.Shared.Maths;
|
||||
using Robust.Shared.Serialization;
|
||||
using static Content.Shared.Wires.SharedWiresComponent;
|
||||
@@ -184,7 +185,7 @@ namespace Content.Shared.Wires
|
||||
{
|
||||
public static string Name(this WireColor color)
|
||||
{
|
||||
return Robust.Shared.Localization.Loc.GetString(color switch
|
||||
return Loc.GetString(color switch
|
||||
{
|
||||
WireColor.Red => "Red",
|
||||
WireColor.Blue => "Blue",
|
||||
@@ -224,7 +225,7 @@ namespace Content.Shared.Wires
|
||||
|
||||
public static string Name(this WireLetter letter)
|
||||
{
|
||||
return Robust.Shared.Localization.Loc.GetString(letter switch
|
||||
return Loc.GetString(letter switch
|
||||
{
|
||||
WireLetter.α => "Alpha",
|
||||
WireLetter.β => "Beta",
|
||||
|
||||
Reference in New Issue
Block a user