Typo, redundant string interpolation, namespaces and imports cleanup (#2068)

* Readonly, typos and redundant string interpolations

* Namespaces

* Optimize imports

* Address reviews

* but actually

* Localize missing strings

* Remove redundant vars
This commit is contained in:
DrSmugleaf
2020-09-13 14:23:52 +02:00
committed by GitHub
parent 2e5838bb62
commit 74943a2770
213 changed files with 465 additions and 669 deletions

View File

@@ -1,6 +1,4 @@
#nullable enable
using System;
using Content.Server.GameObjects.Components.Body;
using Content.Server.GameObjects.Components.Medical;
using Content.Server.GameObjects.Components.Observer;
using Content.Server.Interfaces.GameTicking;
@@ -8,7 +6,6 @@ using Content.Server.Mobs;
using Content.Server.Utility;
using Content.Shared.GameObjects.Components;
using Content.Shared.GameObjects.Components.Damage;
using Content.Shared.GameObjects.Components.Mobs;
using Content.Shared.GameObjects.EntitySystems;
using Robust.Server.GameObjects.Components.UserInterface;
using Robust.Shared.GameObjects;
@@ -21,7 +18,6 @@ using Robust.Shared.Serialization;
using Robust.Shared.Timers;
using Robust.Shared.Utility;
using Robust.Shared.ViewVariables;
using Serilog.Debugging;
namespace Content.Server.GameObjects.Components.Mobs
{
@@ -180,20 +176,20 @@ namespace Content.Server.GameObjects.Components.Mobs
if (!HasMind)
{
message.AddMarkup(!dead
? $"[color=red]" +
Loc.GetString(
"{0:They} {0:are} totally catatonic. The stresses of life in deep-space must have been too much for {0:them}. Any recovery is unlikely.",
Owner) + "[/color]"
: $"[color=purple]" + Loc.GetString("{0:Their} soul has departed.", Owner) + "[/color]");
var aliveText =
$"[color=red]{Loc.GetString("{0:They} {0:are} totally catatonic. The stresses of life in deep-space must have been too much for {0:them}. Any recovery is unlikely.", Owner)}[/color]";
var deadText = $"[color=purple]{Loc.GetString("{0:Their} soul has departed.", Owner)}[/color]";
message.AddMarkup(dead ? deadText : aliveText);
}
else if (Mind?.Session == null)
{
if (!dead)
message.AddMarkup("[color=yellow]" +
Loc.GetString(
"{0:They} {0:have} a blank, absent-minded stare and appears completely unresponsive to anything. {0:They} may snap out of it soon.",
Owner) + "[/color]");
if (dead) return;
var text =
$"[color=yellow]{Loc.GetString("{0:They} {0:have} a blank, absent-minded stare and appears completely unresponsive to anything. {0:They} may snap out of it soon.", Owner)}[/color]";
message.AddMarkup(text);
}
}
}