Fixes string interpolation
This commit is contained in:
parent
42d0b6271f
commit
7d3a0ca265
233 changed files with 758 additions and 690 deletions
|
|
@ -164,7 +164,7 @@ namespace Server.Engines.MLQuests.Gumps
|
|||
public void SetTitle( TextDefinition def )
|
||||
{
|
||||
if ( def.Number > 0 )
|
||||
m_Title = String.Format( "#{0}", def.Number ); // OSI does "@@#{0}" instead, why? KR client related?
|
||||
m_Title = $"#{def.Number}"; // OSI does "@@#{0}" instead, why? KR client related?
|
||||
else
|
||||
m_Title = def.String;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ namespace Server.Engines.MLQuests.Gumps
|
|||
else if ( targetRace == Race.Elf )
|
||||
AddHtmlLocalized( 15, 15, 210, 75, 1073642, 0, false, false ); // Are you sure you want to follow the elven ways?
|
||||
else
|
||||
AddHtml( 15, 15, 210, 75, String.Format( "Are you sure you want to change your race to {0}?", targetRace.Name ), false, false );
|
||||
AddHtml( 15, 15, 210, 75, $"Are you sure you want to change your race to {targetRace.Name}?", false, false );
|
||||
|
||||
AddButton( 160, 95, 0xF7, 0xF8, 1, GumpButtonType.Reply, 0 );
|
||||
AddButton( 90, 95, 0xF2, 0xF1, 0, GumpButtonType.Reply, 0 );
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ namespace Server.Engines.MLQuests.Items
|
|||
base.GetProperties(list);
|
||||
|
||||
if (m_QuestType != null)
|
||||
list.Add(String.Format("Required quest: {0}", m_QuestType.Name));
|
||||
list.Add($"Required quest: {m_QuestType.Name}");
|
||||
}
|
||||
|
||||
public MLQuestTeleporter(Serial serial)
|
||||
|
|
@ -187,7 +187,7 @@ namespace Server.Engines.MLQuests.Items
|
|||
base.GetProperties(list);
|
||||
|
||||
if (m_TicketType != null)
|
||||
list.Add(String.Format("Required ticket: {0}", m_TicketType.Name));
|
||||
list.Add($"Required ticket: {m_TicketType.Name}");
|
||||
}
|
||||
|
||||
public TicketTeleporter(Serial serial)
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ namespace Server.Engines.MLQuests
|
|||
|
||||
public void PutSpawner( Spawner s, Point3D loc, Map map )
|
||||
{
|
||||
string name = String.Format( "MLQS-{0}", GetType().Name );
|
||||
string name = $"MLQS-{GetType().Name}";
|
||||
|
||||
// Auto cleanup on regeneration
|
||||
List<Item> toDelete = new List<Item>();
|
||||
|
|
|
|||
|
|
@ -218,7 +218,7 @@ namespace Server.Engines.MLQuests.Mobiles
|
|||
if ( m_Index == 0 )
|
||||
{
|
||||
if ( m_Target.ShowFameTitle && m_Target.Fame >= 10000 )
|
||||
m_Owner.Say( true, String.Format( "{0} {1}", m_Target.Female ? "Lady" : "Lord", m_Target.Name ) );
|
||||
m_Owner.Say( true, $"{(m_Target.Female ? "Lady" : "Lord")} {m_Target.Name}");
|
||||
else
|
||||
m_Owner.Say( true, m_Target.Name );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -212,7 +212,7 @@ namespace Server.Engines.MLQuests.Objectives
|
|||
if ( total < desired )
|
||||
{
|
||||
pm.SendLocalizedMessage( 1074861 ); // You do not have everything you need!
|
||||
pm.SendLocalizedMessage( 1074885, String.Format( "{0}\t{1}", total, desired ) ); // You have ~1_val~ item(s) but require ~2_val~
|
||||
pm.SendLocalizedMessage( 1074885, $"{total}\t{desired}"); // You have ~1_val~ item(s) but require ~2_val~
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -85,9 +85,9 @@ namespace Server.Engines.MLQuests.Objectives
|
|||
string args;
|
||||
|
||||
if ( m_ThresholdFixed % 10 == 0 )
|
||||
args = String.Format( "#{0}\t{1}", skillLabel, m_ThresholdFixed / 10 ); // as seen on OSI
|
||||
args = $"#{skillLabel}\t{m_ThresholdFixed / 10}"; // as seen on OSI
|
||||
else
|
||||
args = String.Format( "#{0}\t{1:0.0}", skillLabel, (double)m_ThresholdFixed / 10 ); // for non-integer skill levels
|
||||
args = $"#{skillLabel}\t{(double) m_ThresholdFixed / 10:0.0}"; // for non-integer skill levels
|
||||
|
||||
g.AddHtmlLocalized( 98, y, 312, 16, 1077485, args, 0x15F90, false, false ); // Increase ~1_SKILL~ to ~2_VALUE~
|
||||
y += 16;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue