Fixes string interpolation

This commit is contained in:
Kamron Batman 2018-09-14 13:07:43 -07:00
parent 42d0b6271f
commit 7d3a0ca265
233 changed files with 758 additions and 690 deletions

View file

@ -615,16 +615,16 @@ namespace Server.Items
if (ts.TotalHours >= 1)
{
int h = (int)Math.Round(ts.TotalHours);
return String.Format("{0} hour{1}", h, (h == 1) ? "" : "s");
return $"{h} hour{((h == 1) ? "" : "s")}";
}
else if (ts.TotalMinutes >= 1)
{
int m = (int)Math.Round(ts.TotalMinutes);
return String.Format("{0} minute{1}", m, (m == 1) ? "" : "s");
return $"{m} minute{((m == 1) ? "" : "s")}";
}
int s = Math.Max((int)Math.Round(ts.TotalSeconds), 0);
return String.Format("{0} second{1}", s, (s == 1) ? "" : "s");
return $"{s} second{((s == 1) ? "" : "s")}";
}
private void EndLock(Mobile m)