Fixes string interpolation
This commit is contained in:
parent
42d0b6271f
commit
7d3a0ca265
233 changed files with 758 additions and 690 deletions
|
|
@ -1060,7 +1060,7 @@ namespace Server.Mobiles
|
|||
m_Mobile.PlaySound(m_Mobile.GetIdleSound());
|
||||
m_Mobile.Warmode = true;
|
||||
m_Mobile.Combatant = null;
|
||||
string petname = String.Format("{0}", m_Mobile.Name);
|
||||
string petname = $"{m_Mobile.Name}";
|
||||
m_Mobile.ControlMaster.SendLocalizedMessage(1049671, petname); //~1_PETNAME~ is now guarding you.
|
||||
break;
|
||||
|
||||
|
|
@ -1349,12 +1349,12 @@ namespace Server.Mobiles
|
|||
else
|
||||
{
|
||||
// ~1_NAME~ will now accept movement commands from ~2_NAME~.
|
||||
from.SendLocalizedMessage(1049676, String.Format("{0}\t{1}", m_Mobile.Name, to.Name));
|
||||
from.SendLocalizedMessage(1049676, $"{m_Mobile.Name}\t{to.Name}");
|
||||
|
||||
/* ~1_NAME~ has granted you the ability to give orders to their pet ~2_PET_NAME~.
|
||||
* This creature will now consider you as a friend.
|
||||
*/
|
||||
to.SendLocalizedMessage(1043246, String.Format("{0}\t{1}", from.Name, m_Mobile.Name));
|
||||
to.SendLocalizedMessage(1043246, $"{@from.Name}\t{m_Mobile.Name}");
|
||||
|
||||
m_Mobile.AddPetFriend(to);
|
||||
|
||||
|
|
@ -1389,12 +1389,12 @@ namespace Server.Mobiles
|
|||
else
|
||||
{
|
||||
// ~1_NAME~ will no longer accept movement commands from ~2_NAME~.
|
||||
from.SendLocalizedMessage(1070951, String.Format("{0}\t{1}", m_Mobile.Name, to.Name));
|
||||
from.SendLocalizedMessage(1070951, $"{m_Mobile.Name}\t{to.Name}");
|
||||
|
||||
/* ~1_NAME~ has no longer granted you the ability to give orders to their pet ~2_PET_NAME~.
|
||||
* This creature will no longer consider you as a friend.
|
||||
*/
|
||||
to.SendLocalizedMessage(1070952, String.Format("{0}\t{1}", from.Name, m_Mobile.Name));
|
||||
to.SendLocalizedMessage(1070952, $"{@from.Name}\t{m_Mobile.Name}");
|
||||
|
||||
m_Mobile.RemovePetFriend(to);
|
||||
}
|
||||
|
|
@ -1680,7 +1680,7 @@ namespace Server.Mobiles
|
|||
}
|
||||
else if (accepted && !m_Creature.CanBeControlledBy(to))
|
||||
{
|
||||
string args = String.Format("{0}\t{1}\t ", to.Name, from.Name);
|
||||
string args = $"{to.Name}\t{@from.Name}\t ";
|
||||
|
||||
from.SendLocalizedMessage(1043248, args); // The pet refuses to be transferred because it will not obey ~1_NAME~.~3_BLANK~
|
||||
to.SendLocalizedMessage(1043249, args); // The pet will not accept you as a master because it does not trust you.~3_BLANK~
|
||||
|
|
@ -1689,7 +1689,7 @@ namespace Server.Mobiles
|
|||
}
|
||||
else if (accepted && !m_Creature.CanBeControlledBy(from))
|
||||
{
|
||||
string args = String.Format("{0}\t{1}\t ", to.Name, from.Name);
|
||||
string args = $"{to.Name}\t{@from.Name}\t ";
|
||||
|
||||
from.SendLocalizedMessage(1043250, args); // The pet refuses to be transferred because it will not obey you sufficiently.~3_BLANK~
|
||||
to.SendLocalizedMessage(1043251, args); // The pet will not accept you as a master because it does not trust ~2_NAME~.~3_BLANK~
|
||||
|
|
@ -1740,7 +1740,7 @@ namespace Server.Mobiles
|
|||
|
||||
m_Creature.PlaySound(m_Creature.GetIdleSound());
|
||||
|
||||
string args = String.Format("{0}\t{1}\t{2}", from.Name, m_Creature.Name, to.Name);
|
||||
string args = $"{@from.Name}\t{m_Creature.Name}\t{to.Name}";
|
||||
|
||||
from.SendLocalizedMessage(1043253, args); // You have transferred your pet to ~3_GETTER~.
|
||||
to.SendLocalizedMessage(1043252, args); // ~1_NAME~ has transferred the allegiance of ~2_PET_NAME~ to you.
|
||||
|
|
@ -1774,14 +1774,14 @@ namespace Server.Mobiles
|
|||
}
|
||||
else if (!m_Mobile.CanBeControlledBy(to))
|
||||
{
|
||||
string args = String.Format("{0}\t{1}\t ", to.Name, from.Name);
|
||||
string args = $"{to.Name}\t{@from.Name}\t ";
|
||||
|
||||
from.SendLocalizedMessage(1043248, args); // The pet refuses to be transferred because it will not obey ~1_NAME~.~3_BLANK~
|
||||
to.SendLocalizedMessage(1043249, args); // The pet will not accept you as a master because it does not trust you.~3_BLANK~
|
||||
}
|
||||
else if (!m_Mobile.CanBeControlledBy(from))
|
||||
{
|
||||
string args = String.Format("{0}\t{1}\t ", to.Name, from.Name);
|
||||
string args = $"{to.Name}\t{@from.Name}\t ";
|
||||
|
||||
from.SendLocalizedMessage(1043250, args); // The pet refuses to be transferred because it will not obey you sufficiently.~3_BLANK~
|
||||
to.SendLocalizedMessage(1043251, args); // The pet will not accept you as a master because it does not trust ~2_NAME~.~3_BLANK~
|
||||
|
|
@ -1976,7 +1976,8 @@ namespace Server.Mobiles
|
|||
{
|
||||
using (StreamWriter op = new StreamWriter("nan_transform.txt", true))
|
||||
{
|
||||
op.WriteLine(String.Format("NaN in TransformMoveDelay: {0}, {1}, {2}, {3}", DateTime.UtcNow, GetType().ToString(), m_Mobile == null ? "null" : m_Mobile.GetType().ToString(), m_Mobile.HitsMax));
|
||||
op.WriteLine(
|
||||
$"NaN in TransformMoveDelay: {DateTime.UtcNow}, {GetType().ToString()}, {(m_Mobile == null ? "null" : m_Mobile.GetType().ToString())}, {m_Mobile.HitsMax}");
|
||||
}
|
||||
|
||||
return 1.0;
|
||||
|
|
|
|||
|
|
@ -3083,7 +3083,7 @@ namespace Server.Mobiles
|
|||
else
|
||||
{
|
||||
// I will teach thee all I know, if paid the amount in full. The price is:
|
||||
Say( 1019077, AffixType.Append, String.Format( " {0}", pointsToLearn ), "" );
|
||||
Say( 1019077, AffixType.Append, $" {pointsToLearn}", "" );
|
||||
Say( 1043108 ); // For less I shall teach thee less.
|
||||
|
||||
m_Teaching = skill;
|
||||
|
|
|
|||
|
|
@ -181,7 +181,8 @@ namespace Server.Mobiles
|
|||
if ( (count % 4) == 0 )
|
||||
{
|
||||
m.LocalOverheadMessage( Network.MessageType.Emote, m.SpeechHue, true, "* The swarm of insects bites and stings your flesh! *" );
|
||||
m.NonlocalOverheadMessage( Network.MessageType.Emote, m.SpeechHue, true, String.Format( "* {0} is stung by a swarm of insects *", m.Name ) );
|
||||
m.NonlocalOverheadMessage( Network.MessageType.Emote, m.SpeechHue, true,
|
||||
$"* {m.Name} is stung by a swarm of insects *");
|
||||
}
|
||||
|
||||
m.FixedParticles( 0x91C, 10, 180, 9539, EffectLayer.Waist );
|
||||
|
|
|
|||
|
|
@ -493,13 +493,13 @@ namespace Server.Mobiles
|
|||
}
|
||||
|
||||
if ( name != null && ammo.Amount > 1 )
|
||||
name = String.Format( "{0}s", name );
|
||||
name = $"{name}s";
|
||||
|
||||
if ( name == null )
|
||||
name = String.Format( "#{0}", ammo.LabelNumber );
|
||||
name = $"#{ammo.LabelNumber}";
|
||||
|
||||
PlaceInBackpack( ammo );
|
||||
SendLocalizedMessage( 1073504, String.Format( "{0}\t{1}", ammo.Amount, name ) ); // You recover ~1_NUM~ ~2_AMMO~.
|
||||
SendLocalizedMessage( 1073504, $"{ammo.Amount}\t{name}"); // You recover ~1_NUM~ ~2_AMMO~.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1002,7 +1002,7 @@ namespace Server.Mobiles
|
|||
string name = weapon.Name;
|
||||
|
||||
if ( name == null )
|
||||
name = String.Format( "#{0}", weapon.LabelNumber );
|
||||
name = $"#{weapon.LabelNumber}";
|
||||
|
||||
from.SendLocalizedMessage( 1062001, name ); // You can no longer wield your ~1_WEAPON~
|
||||
from.AddToBackpack( weapon );
|
||||
|
|
@ -1044,7 +1044,7 @@ namespace Server.Mobiles
|
|||
string name = armor.Name;
|
||||
|
||||
if ( name == null )
|
||||
name = String.Format( "#{0}", armor.LabelNumber );
|
||||
name = $"#{armor.LabelNumber}";
|
||||
|
||||
if ( armor is BaseShield )
|
||||
from.SendLocalizedMessage( 1062003, name ); // You can no longer equip your ~1_SHIELD~
|
||||
|
|
@ -1085,7 +1085,7 @@ namespace Server.Mobiles
|
|||
string name = clothing.Name;
|
||||
|
||||
if ( name == null )
|
||||
name = String.Format( "#{0}", clothing.LabelNumber );
|
||||
name = $"#{clothing.LabelNumber}";
|
||||
|
||||
from.SendLocalizedMessage( 1062002, name ); // You can no longer wear your ~1_ARMOR~
|
||||
|
||||
|
|
@ -1253,7 +1253,7 @@ namespace Server.Mobiles
|
|||
int curWeight = BodyWeight + TotalWeight;
|
||||
|
||||
if ( curWeight > maxWeight )
|
||||
SendLocalizedMessage( 1019035, true, String.Format( " : {0} / {1}", curWeight, maxWeight ) );
|
||||
SendLocalizedMessage( 1019035, true, $" : {curWeight} / {maxWeight}");
|
||||
}
|
||||
|
||||
base.OnSubItemAdded(item);
|
||||
|
|
@ -1670,7 +1670,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
Mobile prot = m_JusticeProtectors[i];
|
||||
|
||||
string args = String.Format( "{0}\t{1}", Name, prot.Name );
|
||||
string args = $"{Name}\t{prot.Name}";
|
||||
|
||||
prot.SendLocalizedMessage( 1049371, args ); // The protective relationship between ~1_PLAYER1~ and ~2_PLAYER2~ has been ended.
|
||||
SendLocalizedMessage( 1049371, args ); // The protective relationship between ~1_PLAYER1~ and ~2_PLAYER2~ has been ended.
|
||||
|
|
@ -4361,7 +4361,7 @@ namespace Server.Mobiles
|
|||
|
||||
if ( faction != null )
|
||||
{
|
||||
string adjunct = String.Format( "[{0}]", faction.Definition.Abbreviation );
|
||||
string adjunct = $"[{faction.Definition.Abbreviation}]";
|
||||
if ( suffix.Length == 0 )
|
||||
suffix = adjunct;
|
||||
else
|
||||
|
|
|
|||
|
|
@ -417,7 +417,7 @@ namespace Server.Mobiles
|
|||
else
|
||||
m_DamageEntries.Add( from, amount );
|
||||
|
||||
from.SendMessage(String.Format("Total Damage: {0}", m_DamageEntries[from]) );
|
||||
from.SendMessage($"Total Damage: {m_DamageEntries[@from]}");
|
||||
}
|
||||
|
||||
public void AwardArtifact( Item artifact )
|
||||
|
|
|
|||
|
|
@ -348,7 +348,7 @@ namespace Server.Mobiles
|
|||
|
||||
if ( AccountGold.Enabled && e.Mobile.Account != null )
|
||||
{
|
||||
Say( 1155855, String.Format("{0:#,0}\t{1:#,0}", e.Mobile.Account.TotalPlat, e.Mobile.Account.TotalGold) ); // Thy current bank balance is ~1_AMOUNT~ platinum and ~2_AMOUNT~ gold.
|
||||
Say( 1155855, $"{e.Mobile.Account.TotalPlat:#,0}\t{e.Mobile.Account.TotalGold:#,0}"); // Thy current bank balance is ~1_AMOUNT~ platinum and ~2_AMOUNT~ gold.
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -264,7 +264,7 @@ namespace Server.Mobiles
|
|||
//return (Item)Activator.CreateInstance( m_Type );
|
||||
}
|
||||
|
||||
//Attempt to restock with item, (return true if restock sucessful)
|
||||
//Attempt to restock with item, (return true if restock successful)
|
||||
public bool Restock( Item item, int amount )
|
||||
{
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ namespace Server.Mobiles
|
|||
continue;
|
||||
|
||||
AddButton( 15, 39 + (i * 20), 10006, 10006, i + 1, GumpButtonType.Reply, 0 );
|
||||
AddHtml( 32, 35 + (i * 20), 275, 18, String.Format( "<BASEFONT COLOR=#C0C0EE>{0}</BASEFONT>", pet.Name ), false, false );
|
||||
AddHtml( 32, 35 + (i * 20), 275, 18, $"<BASEFONT COLOR=#C0C0EE>{pet.Name}</BASEFONT>", false, false );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ namespace Server.Mobiles
|
|||
|
||||
public BaseGuildmaster( string title ) : base( title )
|
||||
{
|
||||
Title = String.Format( "the {0} {1}", title, Female ? "guildmistress" : "guildmaster" );
|
||||
Title = $"the {title} {(Female ? "guildmistress" : "guildmaster")}";
|
||||
}
|
||||
|
||||
public BaseGuildmaster( Serial serial ) : base( serial )
|
||||
|
|
|
|||
|
|
@ -579,11 +579,11 @@ namespace Server.Mobiles
|
|||
public string m_Title;
|
||||
public bool m_Vendor;
|
||||
|
||||
public Entry( string desc ) : this( desc, String.Format( "the {0}", desc.ToLower() ), false )
|
||||
public Entry( string desc ) : this( desc, $"the {desc.ToLower()}", false )
|
||||
{
|
||||
}
|
||||
|
||||
public Entry( string desc, bool vendor ) : this( desc, String.Format( "the {0}", desc.ToLower() ), vendor )
|
||||
public Entry( string desc, bool vendor ) : this( desc, $"the {desc.ToLower()}", vendor )
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -711,7 +711,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
AddPage( 1 + page );
|
||||
|
||||
AddHtml( 430, 70, 180, 25, String.Format( "Page {0} of {1}", page + 1, (entries.Length + 19) / 20 ), false, false );
|
||||
AddHtml( 430, 70, 180, 25, $"Page {page + 1} of {(entries.Length + 19) / 20}", false, false );
|
||||
|
||||
for ( int count = 0, i = (page * 20); count < 20 && i < entries.Length; ++count, ++i )
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue