Fixes string interpolation
This commit is contained in:
parent
42d0b6271f
commit
7d3a0ca265
233 changed files with 758 additions and 690 deletions
|
|
@ -274,7 +274,7 @@ namespace Server.Items
|
|||
string fmt;
|
||||
|
||||
if ( Sextant.Format( loc, map, ref xLong, ref yLat, ref xMins, ref yMins, ref xEast, ref ySouth ) )
|
||||
fmt = String.Format( "{0}°{1}'{2},{3}°{4}'{5}", yLat, yMins, ySouth ? "S" : "N", xLong, xMins, xEast ? "E" : "W" );
|
||||
fmt = $"{yLat}°{yMins}'{(ySouth ? "S" : "N")},{xLong}°{xMins}'{(xEast ? "E" : "W")}";
|
||||
else
|
||||
fmt = "?????";
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ namespace Server.Items
|
|||
|
||||
if ( Format( from.Location, from.Map, ref xLong, ref yLat, ref xMins, ref yMins, ref xEast, ref ySouth ) )
|
||||
{
|
||||
string location = String.Format( "{0}<7D> {1}'{2}, {3}<7D> {4}'{5}", yLat, yMins, ySouth ? "S" : "N", xLong, xMins, xEast ? "E" : "W" );
|
||||
string location = $"{yLat}<7D> {yMins}'{(ySouth ? "S" : "N")}, {xLong}<7D> {xMins}'{(xEast ? "E" : "W")}";
|
||||
from.LocalOverheadMessage( MessageType.Regular, from.SpeechHue, false, location );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ namespace Server.Items
|
|||
|
||||
public override void OnSingleClick( Mobile from )
|
||||
{
|
||||
LabelTo( from, 1050039, String.Format( "#{0}\t#1041645", LabelNumber ) );
|
||||
LabelTo( from, 1050039, $"#{LabelNumber}\t#1041645");
|
||||
}
|
||||
|
||||
public override void AddNameProperties( ObjectPropertyList list )
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ namespace Server.Items
|
|||
|
||||
if ( delay > 0 )
|
||||
{
|
||||
from.SendLocalizedMessage( 1072529, String.Format( "{0}\t{1}", delay, delay > 1 ? "seconds." : "second." ) ); // You cannot use that for another ~1_NUM~ ~2_TIMEUNITS~
|
||||
from.SendLocalizedMessage( 1072529, $"{delay}\t{(delay > 1 ? "seconds." : "second.")}"); // You cannot use that for another ~1_NUM~ ~2_TIMEUNITS~
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ namespace Server.Items
|
|||
|
||||
if ( delay > 0 )
|
||||
{
|
||||
from.SendLocalizedMessage( 1072529, String.Format( "{0}\t{1}", delay, delay > 1 ? "seconds." : "second." ) ); // You cannot use that for another ~1_NUM~ ~2_TIMEUNITS~
|
||||
from.SendLocalizedMessage( 1072529, $"{delay}\t{(delay > 1 ? "seconds." : "second.")}"); // You cannot use that for another ~1_NUM~ ~2_TIMEUNITS~
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ namespace Server.Items
|
|||
|
||||
public override void AddNameProperty( ObjectPropertyList list )
|
||||
{
|
||||
list.Add( 1061133, String.Format( "{0}\t{1}", GetSkillTitle( m_SkillLevel ).ToString(), RepairSkillInfo.GetInfo( m_Skill ).Name ) ); // A repair service contract from ~1_SKILL_TITLE~ ~2_SKILL_NAME~.
|
||||
list.Add( 1061133, $"{GetSkillTitle(m_SkillLevel).ToString()}\t{RepairSkillInfo.GetInfo(m_Skill).Name}"); // A repair service contract from ~1_SKILL_TITLE~ ~2_SKILL_NAME~.
|
||||
}
|
||||
|
||||
public override void GetProperties( ObjectPropertyList list )
|
||||
|
|
@ -110,7 +110,8 @@ namespace Server.Items
|
|||
if ( Deleted || !from.CanSee( this ) )
|
||||
return;
|
||||
|
||||
LabelTo( from, 1061133, String.Format( "{0}\t{1}", GetSkillTitle( m_SkillLevel ).ToString(), RepairSkillInfo.GetInfo( m_Skill ).Name ) ); // A repair service contract from ~1_SKILL_TITLE~ ~2_SKILL_NAME~.
|
||||
LabelTo( from, 1061133,
|
||||
$"{GetSkillTitle(m_SkillLevel).ToString()}\t{RepairSkillInfo.GetInfo(m_Skill).Name}"); // A repair service contract from ~1_SKILL_TITLE~ ~2_SKILL_NAME~.
|
||||
|
||||
if ( m_Crafter != null )
|
||||
LabelTo( from, 1050043, m_Crafter.Name ); // crafted by ~1_NAME~
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ namespace Server.Items
|
|||
if ( hours == 0 )
|
||||
hours = 12;
|
||||
|
||||
exactTime = String.Format( "{0}:{1:D2}", hours, minutes );
|
||||
exactTime = $"{hours}:{minutes:D2}";
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ namespace Server.Items
|
|||
int num = CraftResources.GetLocalizationNumber( Resource );
|
||||
|
||||
if ( num > 0 )
|
||||
v = String.Format( "#{0}", num );
|
||||
v = $"#{num}";
|
||||
else
|
||||
v = CraftResources.GetName( Resource );
|
||||
}
|
||||
|
|
@ -33,7 +33,7 @@ namespace Server.Items
|
|||
int num = CraftResources.GetLocalizationNumber( Resource );
|
||||
|
||||
if ( num > 0 )
|
||||
v = String.Format( "#{0}", num );
|
||||
v = $"#{num}";
|
||||
else
|
||||
v = CraftResources.GetName( Resource );
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue