Fixes string interpolation
This commit is contained in:
parent
42d0b6271f
commit
7d3a0ca265
233 changed files with 758 additions and 690 deletions
|
|
@ -258,9 +258,9 @@ namespace Server.Engines.Plants
|
|||
string args;
|
||||
|
||||
if ( ShowContainerType )
|
||||
args = String.Format( "#{0}\t#{1}", GetLocalizedContainerType(), m_PlantSystem.GetLocalizedDirtStatus() );
|
||||
args = $"#{GetLocalizedContainerType()}\t#{m_PlantSystem.GetLocalizedDirtStatus()}";
|
||||
else
|
||||
args = String.Format( "#{0}", m_PlantSystem.GetLocalizedDirtStatus() );
|
||||
args = $"#{m_PlantSystem.GetLocalizedDirtStatus()}";
|
||||
|
||||
list.Add( 1060830, args ); // a ~1_val~ of ~2_val~ dirt
|
||||
}
|
||||
|
|
@ -271,24 +271,26 @@ namespace Server.Engines.Plants
|
|||
|
||||
if ( m_PlantStatus >= PlantStatus.DecorativePlant )
|
||||
{
|
||||
list.Add( typeInfo.GetPlantLabelDecorative( hueInfo ), String.Format( "#{0}\t#{1}", hueInfo.Name, typeInfo.Name ) );
|
||||
list.Add( typeInfo.GetPlantLabelDecorative( hueInfo ), $"#{hueInfo.Name}\t#{typeInfo.Name}");
|
||||
}
|
||||
else if ( m_PlantStatus >= PlantStatus.FullGrownPlant )
|
||||
{
|
||||
list.Add( typeInfo.GetPlantLabelFullGrown( hueInfo ), String.Format( "#{0}\t#{1}\t#{2}", m_PlantSystem.GetLocalizedHealth(), hueInfo.Name, typeInfo.Name ) );
|
||||
list.Add( typeInfo.GetPlantLabelFullGrown( hueInfo ),
|
||||
$"#{m_PlantSystem.GetLocalizedHealth()}\t#{hueInfo.Name}\t#{typeInfo.Name}");
|
||||
}
|
||||
else
|
||||
{
|
||||
string args;
|
||||
|
||||
if ( ShowContainerType )
|
||||
args = String.Format( "#{0}\t#{1}\t#{2}", GetLocalizedContainerType(), m_PlantSystem.GetLocalizedDirtStatus(), m_PlantSystem.GetLocalizedHealth() );
|
||||
args =
|
||||
$"#{GetLocalizedContainerType()}\t#{m_PlantSystem.GetLocalizedDirtStatus()}\t#{m_PlantSystem.GetLocalizedHealth()}";
|
||||
else
|
||||
args = String.Format( "#{0}\t#{1}", m_PlantSystem.GetLocalizedDirtStatus(), m_PlantSystem.GetLocalizedHealth() );
|
||||
args = $"#{m_PlantSystem.GetLocalizedDirtStatus()}\t#{m_PlantSystem.GetLocalizedHealth()}";
|
||||
|
||||
if ( m_ShowType )
|
||||
{
|
||||
args += String.Format( "\t#{0}\t#{1}\t#{2}", hueInfo.Name, typeInfo.Name, GetLocalizedPlantStatus() );
|
||||
args += $"\t#{hueInfo.Name}\t#{typeInfo.Name}\t#{GetLocalizedPlantStatus()}";
|
||||
|
||||
if ( m_PlantStatus == PlantStatus.Plant )
|
||||
list.Add( typeInfo.GetPlantLabelPlant( hueInfo ), args );
|
||||
|
|
@ -297,7 +299,8 @@ namespace Server.Engines.Plants
|
|||
}
|
||||
else
|
||||
{
|
||||
args += String.Format( "\t#{0}\t#{1}", ( typeInfo.PlantCategory == PlantCategory.Default ) ? hueInfo.Name : (int)typeInfo.PlantCategory, GetLocalizedPlantStatus() );
|
||||
args +=
|
||||
$"\t#{((typeInfo.PlantCategory == PlantCategory.Default) ? hueInfo.Name : (int) typeInfo.PlantCategory)}\t#{GetLocalizedPlantStatus()}";
|
||||
|
||||
list.Add( hueInfo.IsBright() ? 1060832 : 1060831, args ); // a ~1_val~ of ~2_val~ dirt with a ~3_val~ [bright] ~4_val~ ~5_val~
|
||||
}
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ namespace Server.Engines.Plants
|
|||
else
|
||||
{
|
||||
AddLabel( x, y, PlantHueInfo.GetInfo( m_Plant.PlantHue ).GumpHue,
|
||||
string.Format( "{0}/{1}", system.AvailableResources, totalResources ) );
|
||||
$"{system.AvailableResources}/{totalResources}");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -106,7 +106,7 @@ namespace Server.Engines.Plants
|
|||
else
|
||||
{
|
||||
AddLabel( x, y, PlantHueInfo.GetInfo( system.SeedHue ).GumpHue,
|
||||
string.Format( "{0}/{1}", system.AvailableSeeds, totalSeeds ) );
|
||||
$"{system.AvailableSeeds}/{totalSeeds}");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -106,12 +106,12 @@ namespace Server.Engines.Plants
|
|||
{
|
||||
if ( m_ShowType )
|
||||
{
|
||||
args = String.Format( "#{0}\t#{1}", title, typeInfo.Name );
|
||||
args = $"#{title}\t#{typeInfo.Name}";
|
||||
return typeInfo.GetSeedLabel( hueInfo );
|
||||
}
|
||||
else
|
||||
{
|
||||
args = String.Format( "#{0}", title );
|
||||
args = $"#{title}";
|
||||
return hueInfo.IsBright() ? 1060839 : 1060838; // [bright] ~1_val~ seed
|
||||
}
|
||||
}
|
||||
|
|
@ -119,12 +119,12 @@ namespace Server.Engines.Plants
|
|||
{
|
||||
if ( m_ShowType )
|
||||
{
|
||||
args = String.Format( "{0}\t#{1}\t#{2}", Amount, title, typeInfo.Name );
|
||||
args = $"{Amount}\t#{title}\t#{typeInfo.Name}";
|
||||
return typeInfo.GetSeedLabelPlural( hueInfo );
|
||||
}
|
||||
else
|
||||
{
|
||||
args = String.Format( "{0}\t#{1}", Amount, title );
|
||||
args = $"{Amount}\t#{title}";
|
||||
return hueInfo.IsBright() ? 1113491 : 1113490; // ~1_amount~ [bright] ~2_val~ seeds
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue