Improve ExaminedEvent to handle newlines for you with helper methods.

This commit is contained in:
Pieter-Jan Briers
2021-09-15 16:58:15 +02:00
parent 9c7b061d13
commit cd6c2bb373
13 changed files with 76 additions and 38 deletions

View File

@@ -69,7 +69,7 @@ namespace Content.Shared.Chemistry.EntitySystems
if (solutionHolder.Contents.Count == 0)
{
args.Message.AddText(Loc.GetString("shared-solution-container-component-on-examine-empty-container"));
args.PushText(Loc.GetString("shared-solution-container-component-on-examine-empty-container"));
return;
}
@@ -86,7 +86,7 @@ namespace Content.Shared.Chemistry.EntitySystems
.ToHexNoAlpha(); //TODO: If the chem has a dark color, the examine text becomes black on a black background, which is unreadable.
var messageString = "shared-solution-container-component-on-examine-main-text";
args.Message.AddMarkup(Loc.GetString(messageString,
args.PushMarkup(Loc.GetString(messageString,
("color", colorHex),
("wordedAmount", Loc.GetString(solutionHolder.Contents.Count == 1
? "shared-solution-container-component-on-examine-worded-amount-one-reagent"