Fixes string interpolation
This commit is contained in:
parent
42d0b6271f
commit
7d3a0ca265
233 changed files with 758 additions and 690 deletions
|
|
@ -180,42 +180,25 @@ namespace Server.Items
|
|||
|
||||
if ( deed.IsExpired )
|
||||
{
|
||||
return String.Format(
|
||||
"<bodytextblack>" +
|
||||
"This deed once entitled the bearer to build a house on the plot of land " +
|
||||
"located at {0} on the {1} facet.<br><br>" +
|
||||
|
||||
"The deed has expired, and now the indicated plot of land " +
|
||||
"is subject to normal house construction rules.<br><br>" +
|
||||
|
||||
"This deed functions as a recall rune marked for the location of the plot it represents." +
|
||||
"</bodytextblack>",
|
||||
HouseRaffleStone.FormatLocation( deed.PlotLocation, deed.PlotFacet, false ),
|
||||
deed.PlotFacet
|
||||
);
|
||||
return "<bodytextblack>" +
|
||||
"This deed once entitled the bearer to build a house on the plot of land " +
|
||||
$"located at {HouseRaffleStone.FormatLocation(deed.PlotLocation, deed.PlotFacet, false)} on the {deed.PlotFacet} facet.<br><br>" +
|
||||
"The deed has expired, and now the indicated plot of land " +
|
||||
"is subject to normal house construction rules.<br><br>" +
|
||||
"This deed functions as a recall rune marked for the location of the plot it represents." +
|
||||
"</bodytextblack>";
|
||||
}
|
||||
else
|
||||
{
|
||||
int daysLeft = (int)Math.Ceiling( ( deed.Stone.Started + deed.Stone.Duration + HouseRaffleStone.ExpirationTime - DateTime.UtcNow ).TotalDays );
|
||||
|
||||
return String.Format(
|
||||
"<bodytextblack>" +
|
||||
"This deed entitles the bearer to build a house on the plot of land " +
|
||||
"located at {0} on the {1} facet.<br><br>" +
|
||||
|
||||
"The deed will expire after {2} more day{3} have passed, and at that time the right to place " +
|
||||
"a house reverts to normal house construction rules.<br><br>" +
|
||||
|
||||
"This deed functions as a recall rune marked for the location of the plot it represents.<br><br>" +
|
||||
|
||||
"To place a house on the deeded plot, you must simply have this deed in your backpack " +
|
||||
"or bank box when using a House Placement Tool there." +
|
||||
"</bodytextblack>",
|
||||
HouseRaffleStone.FormatLocation( deed.PlotLocation, deed.PlotFacet, false ),
|
||||
deed.PlotFacet,
|
||||
daysLeft,
|
||||
( daysLeft == 1 ) ? "" : "s"
|
||||
);
|
||||
return "<bodytextblack>" + "This deed entitles the bearer to build a house on the plot of land " +
|
||||
$"located at {HouseRaffleStone.FormatLocation(deed.PlotLocation, deed.PlotFacet, false)} on the {deed.PlotFacet} facet.<br><br>" +
|
||||
$"The deed will expire after {daysLeft} more day{((daysLeft == 1) ? "" : "s")} have passed, and at that time the right to place " +
|
||||
"a house reverts to normal house construction rules.<br><br>" +
|
||||
"This deed functions as a recall rune marked for the location of the plot it represents.<br><br>" +
|
||||
"To place a house on the deeded plot, you must simply have this deed in your backpack " +
|
||||
"or bank box when using a House Placement Tool there." + "</bodytextblack>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,17 +18,17 @@ namespace Server.Gumps
|
|||
|
||||
public string Right( string text )
|
||||
{
|
||||
return String.Format( "<DIV ALIGN=RIGHT>{0}</DIV>", text );
|
||||
return $"<DIV ALIGN=RIGHT>{text}</DIV>";
|
||||
}
|
||||
|
||||
public string Center( string text )
|
||||
{
|
||||
return String.Format( "<CENTER>{0}</CENTER>", text );
|
||||
return $"<CENTER>{text}</CENTER>";
|
||||
}
|
||||
|
||||
public string Color( string text, int color )
|
||||
{
|
||||
return String.Format( "<BASEFONT COLOR=#{0:X6}>{1}</BASEFONT>", color, text );
|
||||
return $"<BASEFONT COLOR=#{color:X6}>{text}</BASEFONT>";
|
||||
}
|
||||
|
||||
public const int LabelColor = 0xFFFFFF;
|
||||
|
|
@ -203,7 +203,7 @@ namespace Server.Gumps
|
|||
if ( entry.From != null )
|
||||
{
|
||||
if ( entry.From.Account is Account acc )
|
||||
name = String.Format( "{0} ({1})", entry.From.Name, acc );
|
||||
name = $"{entry.From.Name} ({acc})";
|
||||
else
|
||||
name = entry.From.Name;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -380,7 +380,7 @@ namespace Server.Items
|
|||
if ( m_TicketPrice == 0 )
|
||||
return "FREE";
|
||||
else
|
||||
return String.Format( "{0} gold", m_TicketPrice );
|
||||
return $"{m_TicketPrice} gold";
|
||||
}
|
||||
|
||||
public override void GetProperties( ObjectPropertyList list )
|
||||
|
|
@ -414,12 +414,12 @@ namespace Server.Items
|
|||
{
|
||||
case HouseRaffleState.Active:
|
||||
{
|
||||
LabelTo( from, 1060658, String.Format( "Ends\t{0}", m_Started + m_Duration ) ); // ~1_val~: ~2_val~
|
||||
LabelTo( from, 1060658, $"Ends\t{m_Started + m_Duration}"); // ~1_val~: ~2_val~
|
||||
break;
|
||||
}
|
||||
case HouseRaffleState.Completed:
|
||||
{
|
||||
LabelTo( from, 1060658, String.Format( "Winner\t{0}", ( m_Winner == null ) ? "Unknown" : m_Winner.Name ) ); // ~1_val~: ~2_val~
|
||||
LabelTo( from, 1060658, $"Winner\t{((m_Winner == null) ? "Unknown" : m_Winner.Name)}"); // ~1_val~: ~2_val~
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -461,7 +461,8 @@ namespace Server.Items
|
|||
}
|
||||
else
|
||||
{
|
||||
from.SendGump( new WarningGump( 1150470, 0x7F00, String.Format( "You are about to purchase a raffle ticket for the house plot located at {0}. The ticket price is {1}. Tickets are non-refundable and you can only purchase one ticket per account. Do you wish to continue?", FormatLocation(), FormatPrice() ), 0xFFFFFF, 420, 280, new WarningGumpCallback( Purchase_Callback ), null ) ); // CONFIRM TICKET PURCHASE
|
||||
from.SendGump( new WarningGump( 1150470, 0x7F00,
|
||||
$"You are about to purchase a raffle ticket for the house plot located at {FormatLocation()}. The ticket price is {FormatPrice()}. Tickets are non-refundable and you can only purchase one ticket per account. Do you wish to continue?", 0xFFFFFF, 420, 280, new WarningGumpCallback( Purchase_Callback ), null ) ); // CONFIRM TICKET PURCHASE
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue