Removed old Loc.GetString() use instances (#4155)
Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com>
This commit is contained in:
@@ -355,7 +355,7 @@ namespace Content.Server.Chemistry.Components
|
||||
|
||||
if (!args.User.TryGetComponent(out IHandsComponent? hands))
|
||||
{
|
||||
Owner.PopupMessage(args.User, Loc.GetString("You have no hands."));
|
||||
Owner.PopupMessage(args.User, Loc.GetString("chem-master-component-activate-no-hands"));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -377,13 +377,13 @@ namespace Content.Server.Chemistry.Components
|
||||
{
|
||||
if (!args.User.TryGetComponent(out IHandsComponent? hands))
|
||||
{
|
||||
Owner.PopupMessage(args.User, Loc.GetString("You have no hands!"));
|
||||
Owner.PopupMessage(args.User, Loc.GetString("chem-master-component-interact-using-no-hands"));
|
||||
return true;
|
||||
}
|
||||
|
||||
if (hands.GetActiveHand == null)
|
||||
{
|
||||
Owner.PopupMessage(args.User, Loc.GetString("You have nothing in your hand!"));
|
||||
Owner.PopupMessage(args.User, Loc.GetString("chem-master-component-interact-using-nothing-in-hands"));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -392,12 +392,12 @@ namespace Content.Server.Chemistry.Components
|
||||
{
|
||||
if (HasBeaker)
|
||||
{
|
||||
Owner.PopupMessage(args.User, Loc.GetString("This ChemMaster already has a container in it."));
|
||||
Owner.PopupMessage(args.User, Loc.GetString("chem-master-component-has-beaker-already-message"));
|
||||
}
|
||||
else if (!solution.CanUseWithChemDispenser)
|
||||
{
|
||||
//If it can't fit in the chem master, don't put it in. For example, buckets and mop buckets can't fit.
|
||||
Owner.PopupMessage(args.User, Loc.GetString("The {0:theName} is too large for the ChemMaster!", activeHandEntity));
|
||||
Owner.PopupMessage(args.User, Loc.GetString("chem-master-component-container-too-large-message",("container", activeHandEntity)));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -407,7 +407,7 @@ namespace Content.Server.Chemistry.Components
|
||||
}
|
||||
else
|
||||
{
|
||||
Owner.PopupMessage(args.User, Loc.GetString("You can't put {0:theName} in the ChemMaster!", activeHandEntity));
|
||||
Owner.PopupMessage(args.User, Loc.GetString("chem-master-component-cannot-put-entity-message", ("entity", activeHandEntity)));
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -431,7 +431,7 @@ namespace Content.Server.Chemistry.Components
|
||||
return;
|
||||
}
|
||||
|
||||
data.Text = Loc.GetString("Eject Beaker");
|
||||
data.Text = Loc.GetString("eject-beaker-verb-get-data-text");
|
||||
data.Visibility = component.HasBeaker ? VerbVisibility.Visible : VerbVisibility.Invisible;
|
||||
}
|
||||
|
||||
|
||||
@@ -41,28 +41,28 @@ namespace Content.Server.Chemistry.Components
|
||||
if (target == null || !EligibleEntity(target))
|
||||
return false;
|
||||
|
||||
var msgFormat = "You inject {0:TheName}.";
|
||||
string? msgFormat = null;
|
||||
|
||||
if (target == user)
|
||||
{
|
||||
msgFormat = "You inject yourself.";
|
||||
msgFormat = "hypospray-component-inject-self-message";
|
||||
}
|
||||
else if (EligibleEntity(user) && ClumsyComponent.TryRollClumsy(user, ClumsyFailChance))
|
||||
{
|
||||
msgFormat = "Oops! You injected yourself!";
|
||||
msgFormat = "hypospray-component-inject-self-clumsy-message";
|
||||
target = user;
|
||||
}
|
||||
|
||||
if (_solution == null || _solution.CurrentVolume == 0)
|
||||
{
|
||||
user.PopupMessageCursor(Loc.GetString("It's empty!"));
|
||||
user.PopupMessageCursor(Loc.GetString("hypospray-component-empty-message"));
|
||||
return true;
|
||||
}
|
||||
|
||||
user.PopupMessage(Loc.GetString(msgFormat, target));
|
||||
user.PopupMessage(Loc.GetString(msgFormat ?? "hypospray-component-inject-other-message",("other", target)));
|
||||
if (target != user)
|
||||
{
|
||||
target.PopupMessage(Loc.GetString("You feel a tiny prick!"));
|
||||
target.PopupMessage(Loc.GetString("hypospray-component-feel-prick-message"));
|
||||
var meleeSys = EntitySystem.Get<MeleeWeaponSystem>();
|
||||
var angle = Angle.FromWorldVec(target.Transform.WorldPosition - user.Transform.WorldPosition);
|
||||
meleeSys.SendLunge(angle, user);
|
||||
@@ -77,7 +77,7 @@ namespace Content.Server.Chemistry.Components
|
||||
|
||||
if (realTransferAmount <= 0)
|
||||
{
|
||||
user.PopupMessage(user, Loc.GetString("{0:TheName} is already full!", targetSolution.Owner));
|
||||
user.PopupMessage(user, Loc.GetString("hypospray-component-transfer-already-full-message ",("owner", targetSolution.Owner)));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#nullable enable
|
||||
#nullable enable
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using Content.Server.Body.Circulatory;
|
||||
@@ -88,11 +88,11 @@ namespace Content.Server.Chemistry.Components
|
||||
{
|
||||
case InjectorToggleMode.Inject:
|
||||
ToggleState = InjectorToggleMode.Draw;
|
||||
msg = "Now drawing";
|
||||
msg = "injector-component-drawing-text";
|
||||
break;
|
||||
case InjectorToggleMode.Draw:
|
||||
ToggleState = InjectorToggleMode.Inject;
|
||||
msg = "Now injecting";
|
||||
msg = "injector-component-injecting-text";
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
@@ -130,7 +130,7 @@ namespace Content.Server.Chemistry.Components
|
||||
else
|
||||
{
|
||||
eventArgs.User.PopupMessage(eventArgs.User,
|
||||
Loc.GetString("You aren't able to transfer to {0:theName}!", targetSolution.Owner));
|
||||
Loc.GetString("injector-component-cannot-transfer-message", ("owner", targetSolution.Owner)));
|
||||
}
|
||||
}
|
||||
else if (ToggleState == InjectorToggleMode.Draw)
|
||||
@@ -142,7 +142,7 @@ namespace Content.Server.Chemistry.Components
|
||||
else
|
||||
{
|
||||
eventArgs.User.PopupMessage(eventArgs.User,
|
||||
Loc.GetString("You aren't able to draw from {0:theName}!", targetSolution.Owner));
|
||||
Loc.GetString("injector-component-cannot-draw-message", ("owner", targetSolution.Owner)));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -180,7 +180,7 @@ namespace Content.Server.Chemistry.Components
|
||||
if (realTransferAmount <= 0)
|
||||
{
|
||||
Owner.PopupMessage(user,
|
||||
Loc.GetString("You aren't able to inject {0:theName}!", targetBloodstream.Owner));
|
||||
Loc.GetString("injector-component-cannot-inject-message",("owner", targetBloodstream.Owner)));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -201,8 +201,9 @@ namespace Content.Server.Chemistry.Components
|
||||
removedSolution.DoEntityReaction(targetBloodstream.Owner, ReactionMethod.Injection);
|
||||
|
||||
Owner.PopupMessage(user,
|
||||
Loc.GetString("You inject {0}u into {1:theName}!", removedSolution.TotalVolume,
|
||||
targetBloodstream.Owner));
|
||||
Loc.GetString("injector-component-inject-success-message",
|
||||
("amount", removedSolution.TotalVolume),
|
||||
("target", targetBloodstream.Owner)));
|
||||
Dirty();
|
||||
AfterInject();
|
||||
}
|
||||
@@ -219,7 +220,7 @@ namespace Content.Server.Chemistry.Components
|
||||
|
||||
if (realTransferAmount <= 0)
|
||||
{
|
||||
Owner.PopupMessage(user, Loc.GetString("{0:theName} is already full!", targetSolution.Owner));
|
||||
Owner.PopupMessage(user, Loc.GetString("injector-component-target-already-full-message", ("target", targetSolution.Owner)));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -231,7 +232,9 @@ namespace Content.Server.Chemistry.Components
|
||||
targetSolution.Inject(removedSolution);
|
||||
|
||||
Owner.PopupMessage(user,
|
||||
Loc.GetString("You transfer {0}u to {1:theName}", removedSolution.TotalVolume, targetSolution.Owner));
|
||||
Loc.GetString("injector-component-transfer-success-message",
|
||||
("amount", removedSolution.TotalVolume),
|
||||
("target", targetSolution.Owner)));
|
||||
Dirty();
|
||||
AfterInject();
|
||||
}
|
||||
@@ -257,7 +260,7 @@ namespace Content.Server.Chemistry.Components
|
||||
|
||||
if (realTransferAmount <= 0)
|
||||
{
|
||||
Owner.PopupMessage(user, Loc.GetString("{0:theName} is empty!", targetSolution.Owner));
|
||||
Owner.PopupMessage(user, Loc.GetString("injector-component-target-is-empty-message",("target", targetSolution.Owner)));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -270,7 +273,9 @@ namespace Content.Server.Chemistry.Components
|
||||
}
|
||||
|
||||
Owner.PopupMessage(user,
|
||||
Loc.GetString("Drew {0}u from {1:theName}", removedSolution.TotalVolume, targetSolution.Owner));
|
||||
Loc.GetString("injector-component-draw-success-message",
|
||||
("amount", removedSolution.TotalVolume),
|
||||
("target", targetSolution.Owner)));
|
||||
Dirty();
|
||||
AfterDraw();
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ namespace Content.Server.Chemistry.Components
|
||||
if (firstStomach == null)
|
||||
{
|
||||
_contents.TryAddSolution(split);
|
||||
trueTarget.PopupMessage(user, Loc.GetString("You can't eat any more!"));
|
||||
trueTarget.PopupMessage(user, Loc.GetString("pill-component-cannot-eat-more-message"));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ namespace Content.Server.Chemistry.Components
|
||||
SoundSystem.Play(Filter.Pvs(trueTarget), UseSound, trueTarget, AudioParams.Default.WithVolume(-1f));
|
||||
}
|
||||
|
||||
trueTarget.PopupMessage(user, Loc.GetString("You swallow the pill."));
|
||||
trueTarget.PopupMessage(user, Loc.GetString("pill-component-swallow-success-message"));
|
||||
|
||||
Owner.QueueDelete();
|
||||
return true;
|
||||
|
||||
@@ -297,7 +297,7 @@ namespace Content.Server.Chemistry.Components
|
||||
|
||||
if (!args.User.TryGetComponent(out IHandsComponent? hands))
|
||||
{
|
||||
Owner.PopupMessage(args.User, Loc.GetString("You have no hands."));
|
||||
Owner.PopupMessage(args.User, Loc.GetString("reagent-dispenser-component-activate-no-hands"));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -319,13 +319,13 @@ namespace Content.Server.Chemistry.Components
|
||||
{
|
||||
if (!args.User.TryGetComponent(out IHandsComponent? hands))
|
||||
{
|
||||
Owner.PopupMessage(args.User, Loc.GetString("You have no hands."));
|
||||
Owner.PopupMessage(args.User, Loc.GetString("reagent-dispenser-component-interact-using-no-hands"));
|
||||
return true;
|
||||
}
|
||||
|
||||
if (hands.GetActiveHand == null)
|
||||
{
|
||||
Owner.PopupMessage(args.User, Loc.GetString("You have nothing on your hand."));
|
||||
Owner.PopupMessage(args.User, Loc.GetString("reagent-dispenser-component-interact-using-nothing-in-hands"));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -334,12 +334,12 @@ namespace Content.Server.Chemistry.Components
|
||||
{
|
||||
if (HasBeaker)
|
||||
{
|
||||
Owner.PopupMessage(args.User, Loc.GetString("This dispenser already has a container in it."));
|
||||
Owner.PopupMessage(args.User, Loc.GetString("reagent-dispenser-component-has-container-already-message"));
|
||||
}
|
||||
else if ((solution.Capabilities & SolutionContainerCaps.FitsInDispenser) == 0)
|
||||
{
|
||||
//If it can't fit in the dispenser, don't put it in. For example, buckets and mop buckets can't fit.
|
||||
Owner.PopupMessage(args.User, Loc.GetString("That can't fit in the dispenser."));
|
||||
Owner.PopupMessage(args.User, Loc.GetString("reagent-dispenser-component-cannot-fit-message"));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -349,7 +349,7 @@ namespace Content.Server.Chemistry.Components
|
||||
}
|
||||
else
|
||||
{
|
||||
Owner.PopupMessage(args.User, Loc.GetString("You can't put this in the dispenser."));
|
||||
Owner.PopupMessage(args.User, Loc.GetString("reagent-dispenser-component-cannot-put-entity-message", ("entity", activeHandEntity)));
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -373,7 +373,7 @@ namespace Content.Server.Chemistry.Components
|
||||
return;
|
||||
}
|
||||
|
||||
data.Text = Loc.GetString("Eject Beaker");
|
||||
data.Text = Loc.GetString("eject-beaker-verb-get-data-text");
|
||||
data.Visibility = component.HasBeaker ? VerbVisibility.Visible : VerbVisibility.Invisible;
|
||||
}
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace Content.Server.Chemistry.Components
|
||||
return;
|
||||
}
|
||||
_expanding = true;
|
||||
Owner.PopupMessageEveryone(Loc.GetString("{0:TheName} expands!", Owner));
|
||||
Owner.PopupMessageEveryone(Loc.GetString("rehydratable-component-expands-message",("owner", Owner)));
|
||||
if (!string.IsNullOrEmpty(_targetPrototype))
|
||||
{
|
||||
var ent = Owner.EntityManager.SpawnEntity(_targetPrototype, Owner.Transform.Coordinates);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#nullable enable
|
||||
#nullable enable
|
||||
using System.Threading.Tasks;
|
||||
using Content.Shared.Chemistry.Reagent;
|
||||
using Content.Shared.Chemistry.Solution.Components;
|
||||
@@ -68,10 +68,10 @@ namespace Content.Server.Chemistry.Components
|
||||
{
|
||||
var toTheBrim = ownerSolution.RefillSpaceAvailable == 0;
|
||||
var msg = toTheBrim
|
||||
? "You fill {0:TheName} to the brim with {1}u from {2:theName}"
|
||||
: "You fill {0:TheName} with {1}u from {2:theName}";
|
||||
? "solution-transfer-component-fill-to-brim-message"
|
||||
: "solution-transfer-component-fill--message";
|
||||
|
||||
target.PopupMessage(eventArgs.User, Loc.GetString(msg, Owner, transferred, target));
|
||||
target.PopupMessage(eventArgs.User, Loc.GetString(msg,("owner", Owner),("amount", transferred),("target", target)));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -82,8 +82,10 @@ namespace Content.Server.Chemistry.Components
|
||||
|
||||
if (transferred > 0)
|
||||
{
|
||||
Owner.PopupMessage(eventArgs.User, Loc.GetString("You transfer {0}u to {1:theName}.",
|
||||
transferred, target));
|
||||
Owner.PopupMessage(eventArgs.User,
|
||||
Loc.GetString("solution-transfer-component-transfer-success-message",
|
||||
("amount",transferred),
|
||||
("target",target)));
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -101,13 +103,13 @@ namespace Content.Server.Chemistry.Components
|
||||
{
|
||||
if (source.DrainAvailable == 0)
|
||||
{
|
||||
source.Owner.PopupMessage(user, Loc.GetString("{0:TheName} is empty!", source.Owner));
|
||||
source.Owner.PopupMessage(user, Loc.GetString("solution-transfer-component-do-transfer-component-is-empty", ("entity",source.Owner)));
|
||||
return ReagentUnit.Zero;
|
||||
}
|
||||
|
||||
if (target.RefillSpaceAvailable == 0)
|
||||
{
|
||||
target.Owner.PopupMessage(user, Loc.GetString("{0:TheName} is full!", target.Owner));
|
||||
target.Owner.PopupMessage(user, Loc.GetString("solution-transfer-component-do-transfer-component-is-full", ("entity", target.Owner)));
|
||||
return ReagentUnit.Zero;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user