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

@ -233,8 +233,7 @@ namespace Server.Commands
e.Mobile.SendGump(
new WarningGump( 1060635, 30720,
String.Format( "You are about to delete {0} object{1} from this facet. Do you really wish to continue?",
list.Count, list.Count == 1 ? "" : "s" ),
$"You are about to delete {list.Count} object{(list.Count == 1 ? "" : "s")} from this facet. Do you really wish to continue?",
0xFFC000, 360, 260, new WarningGumpCallback( DeleteList_Callback ), list ) );
}
else
@ -345,7 +344,7 @@ namespace Server.Commands
{
Item item = m.Items[i];
entries[i] = new ItemListEntry( String.Format( "{0}: {1}", item.Layer, item.GetType().Name ), item.ItemID, item.Hue );
entries[i] = new ItemListEntry($"{item.Layer}: {item.GetType().Name}", item.ItemID, item.Hue );
}
return entries;
@ -377,7 +376,7 @@ namespace Server.Commands
private Mobile m_Mobile;
private Item m_Item;
public EquipDetailsMenu( Mobile m, Item item ) : base( String.Format( "{0}: {1}", item.Layer, item.GetType().Name ), new[]{"Move","Delete","Props"})
public EquipDetailsMenu( Mobile m, Item item ) : base($"{item.Layer}: {item.GetType().Name}", new[]{"Move","Delete","Props"})
{
m_Mobile = m;
m_Item = item;
@ -828,7 +827,7 @@ namespace Server.Commands
[Description( "Broadcasts a message to all online staff." )]
public static void StaffMessage_OnCommand( CommandEventArgs e )
{
BroadcastMessage( AccessLevel.Counselor, e.Mobile.SpeechHue, String.Format( "[{0}] {1}", e.Mobile.Name, e.ArgString ) );
BroadcastMessage( AccessLevel.Counselor, e.Mobile.SpeechHue, $"[{e.Mobile.Name}] {e.ArgString}");
}
[Usage( "BCast <text>" )]
@ -836,7 +835,7 @@ namespace Server.Commands
[Description( "Broadcasts a message to everyone online." )]
public static void BroadcastMessage_OnCommand( CommandEventArgs e )
{
BroadcastMessage( AccessLevel.Player, 0x482, String.Format( "Staff message from {0}:", e.Mobile.Name ) );
BroadcastMessage( AccessLevel.Player, 0x482, $"Staff message from {e.Mobile.Name}:");
BroadcastMessage( AccessLevel.Player, 0x482, e.ArgString );
}