mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-09-15 14:52:35 +02:00
Remove last FormattedMessage.FromMarkup calls
This commit is contained in:
@@ -81,7 +81,7 @@ public record struct NoSuchPlayerError(string Username) : IConError
|
||||
{
|
||||
public FormattedMessage DescribeInner()
|
||||
{
|
||||
return FormattedMessage.FromMarkup($"No player with the username/GUID {Username} could be found.");
|
||||
return FormattedMessage.FromUnformatted($"No player with the username/GUID {Username} could be found.");
|
||||
}
|
||||
|
||||
public string? Expression { get; set; }
|
||||
|
||||
@@ -134,7 +134,7 @@ public record struct MissingClosingBrace() : IConError
|
||||
{
|
||||
public FormattedMessage DescribeInner()
|
||||
{
|
||||
return FormattedMessage.FromMarkup("Expected a closing brace.");
|
||||
return FormattedMessage.FromUnformatted("Expected a closing brace.");
|
||||
}
|
||||
|
||||
public string? Expression { get; set; }
|
||||
|
||||
@@ -182,7 +182,7 @@ public record struct ExpressionOfWrongType(Type Expected, Type Got, bool Once) :
|
||||
{
|
||||
public FormattedMessage DescribeInner()
|
||||
{
|
||||
var msg = FormattedMessage.FromMarkup(
|
||||
var msg = FormattedMessage.FromUnformatted(
|
||||
$"Expected an expression of type {Expected.PrettyName()}, but got {Got.PrettyName()}");
|
||||
|
||||
if (Once)
|
||||
|
||||
@@ -240,7 +240,7 @@ public record struct UnknownCommandError(string Cmd) : IConError
|
||||
{
|
||||
public FormattedMessage DescribeInner()
|
||||
{
|
||||
return FormattedMessage.FromMarkup($"Got unknown command {Cmd}.");
|
||||
return FormattedMessage.FromUnformatted($"Got unknown command {Cmd}.");
|
||||
}
|
||||
|
||||
public string? Expression { get; set; }
|
||||
@@ -252,7 +252,7 @@ public record NoImplementationError(string Cmd, Type[] Types, string? SubCommand
|
||||
{
|
||||
public FormattedMessage DescribeInner()
|
||||
{
|
||||
var msg = FormattedMessage.FromMarkup($"Could not find an implementation for {Cmd} given the input type {PipedType?.PrettyName() ?? "void"}.");
|
||||
var msg = FormattedMessage.FromUnformatted($"Could not find an implementation for {Cmd} given the input type {PipedType?.PrettyName() ?? "void"}.");
|
||||
msg.PushNewline();
|
||||
|
||||
var typeArgs = "";
|
||||
|
||||
@@ -181,17 +181,17 @@ public record UnparseableValueError(Type T) : IConError
|
||||
|
||||
if (T.Constructable())
|
||||
{
|
||||
var msg = FormattedMessage.FromMarkup(
|
||||
var msg = FormattedMessage.FromUnformatted(
|
||||
$"The type {T.PrettyName()} has no parser available and cannot be parsed.");
|
||||
msg.PushNewline();
|
||||
msg.AddText("Please contact a programmer with this error, they'd probably like to see it.");
|
||||
msg.PushNewline();
|
||||
msg.AddMarkup("[bold][color=red]THIS IS A BUG.[/color][/bold]");
|
||||
msg.AddMarkupOrThrow("[bold][color=red]THIS IS A BUG.[/color][/bold]");
|
||||
return msg;
|
||||
}
|
||||
else
|
||||
{
|
||||
return FormattedMessage.FromMarkup($"The type {T.PrettyName()} cannot be parsed, as it cannot be constructed.");
|
||||
return FormattedMessage.FromUnformatted($"The type {T.PrettyName()} cannot be parsed, as it cannot be constructed.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ public record InvalidBool(string Value) : IConError
|
||||
{
|
||||
public FormattedMessage DescribeInner()
|
||||
{
|
||||
return FormattedMessage.FromMarkup(
|
||||
return FormattedMessage.FromUnformatted(
|
||||
$"The value {Value} is not a valid boolean.");
|
||||
}
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ public record struct UnknownComponentError(string Component) : IConError
|
||||
{
|
||||
public FormattedMessage DescribeInner()
|
||||
{
|
||||
var msg = FormattedMessage.FromMarkup(
|
||||
var msg = FormattedMessage.FromUnformatted(
|
||||
$"Unknown component {Component}. For a list of all components, try types:components."
|
||||
);
|
||||
if (Component.EndsWith("component", true, CultureInfo.InvariantCulture))
|
||||
|
||||
@@ -49,7 +49,7 @@ public record InvalidEntity(string Value) : IConError
|
||||
{
|
||||
public FormattedMessage DescribeInner()
|
||||
{
|
||||
return FormattedMessage.FromMarkup($"Couldn't parse {Value} as an Entity.");
|
||||
return FormattedMessage.FromUnformatted($"Couldn't parse {Value} as an Entity.");
|
||||
}
|
||||
|
||||
public string? Expression { get; set; }
|
||||
@@ -61,7 +61,7 @@ public record DeadEntity(EntityUid Entity) : IConError
|
||||
{
|
||||
public FormattedMessage DescribeInner()
|
||||
{
|
||||
return FormattedMessage.FromMarkup($"The entity {Entity} does not exist.");
|
||||
return FormattedMessage.FromUnformatted($"The entity {Entity} does not exist.");
|
||||
}
|
||||
|
||||
public string? Expression { get; set; }
|
||||
|
||||
@@ -57,7 +57,7 @@ public record InvalidEnum<T>(string Value) : IConError
|
||||
{
|
||||
public FormattedMessage DescribeInner()
|
||||
{
|
||||
var msg = FormattedMessage.FromMarkup($"The value {Value} is not a valid {typeof(T).PrettyName()}.");
|
||||
var msg = FormattedMessage.FromUnformatted($"The value {Value} is not a valid {typeof(T).PrettyName()}.");
|
||||
msg.AddText($"Valid values are: {string.Join(", ", Enum.GetNames<T>())}");
|
||||
return msg;
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ public record InvalidAngle(string Value) : IConError
|
||||
{
|
||||
public FormattedMessage DescribeInner()
|
||||
{
|
||||
return FormattedMessage.FromMarkup(
|
||||
return FormattedMessage.FromUnformatted(
|
||||
$"The value {Value} is not a valid angle.");
|
||||
}
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ public record InvalidColor(string Value) : IConError
|
||||
{
|
||||
public FormattedMessage DescribeInner()
|
||||
{
|
||||
return FormattedMessage.FromMarkup(
|
||||
return FormattedMessage.FromUnformatted(
|
||||
$"The value {Value} is not a valid RGB color or name of color.");
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ public record InvalidNumber<T>(string Value) : IConError
|
||||
{
|
||||
public FormattedMessage DescribeInner()
|
||||
{
|
||||
return FormattedMessage.FromMarkup(
|
||||
return FormattedMessage.FromUnformatted(
|
||||
$"The value {Value} is not a valid {typeof(T).PrettyName()}.");
|
||||
}
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@ public record UnexpectedCloseBrace : IConError
|
||||
{
|
||||
public FormattedMessage DescribeInner()
|
||||
{
|
||||
return FormattedMessage.FromMarkup("Unexpected closing brace.");
|
||||
return FormattedMessage.FromUnformatted("Unexpected closing brace.");
|
||||
}
|
||||
|
||||
public string? Expression { get; set; }
|
||||
|
||||
@@ -69,7 +69,7 @@ public record NotAValidPrototype(string Proto, string Kind) : IConError
|
||||
{
|
||||
public FormattedMessage DescribeInner()
|
||||
{
|
||||
return FormattedMessage.FromMarkup($"{Proto} is not a valid {Kind} prototype");
|
||||
return FormattedMessage.FromUnformatted($"{Proto} is not a valid {Kind} prototype");
|
||||
}
|
||||
|
||||
public string? Expression { get; set; }
|
||||
|
||||
@@ -64,7 +64,7 @@ public record InvalidQuantity(string Value) : IConError
|
||||
{
|
||||
public FormattedMessage DescribeInner()
|
||||
{
|
||||
return FormattedMessage.FromMarkup(
|
||||
return FormattedMessage.FromUnformatted(
|
||||
$"The value {Value} is not a valid quantity. Please input some decimal number, optionally with a % to indicate that it's a percentage.");
|
||||
}
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ internal sealed class SessionTypeParser : TypeParser<ICommonSession>
|
||||
{
|
||||
public FormattedMessage DescribeInner()
|
||||
{
|
||||
return FormattedMessage.FromMarkup(Loc.GetString("cmd-parse-failure-session", ("username", Username)));
|
||||
return FormattedMessage.FromUnformatted(Loc.GetString("cmd-parse-failure-session", ("username", Username)));
|
||||
}
|
||||
|
||||
public string? Expression { get; set; }
|
||||
|
||||
Reference in New Issue
Block a user