fix: Update LabelTo, SendMessage, etc to Interpolated Strings (#1283)

This commit is contained in:
Fabrizio 2022-11-29 04:58:12 +01:00 • committed by GitHub
parent 0facd73842
commit 537526a328
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
94 changed files with 514 additions and 769 deletions

View file

@ -43,7 +43,7 @@ namespace Server.Gumps
{
if (BaseGuild.FindByAbbrev(text) != null)
{
m_Mobile.SendMessage("{0} conflicts with the abbreviation of an existing guild.", text);
m_Mobile.SendMessage($"{text} conflicts with the abbreviation of an existing guild.");
}
else
{

View file

@ -45,7 +45,7 @@ namespace Server.Gumps
g.WarDeclarations.Remove(m_Guild);
m_Guild.AddEnemy(g);
m_Guild.GuildMessage(1018020, true, "{0} ({1})", g.Name, g.Abbreviation);
m_Guild.GuildMessage(1018020, true, $"{g.Name} ({g.Abbreviation})");
GuildGump.EnsureClosed(m_Mobile);

View file

@ -42,13 +42,8 @@ namespace Server.Gumps
if (g != null)
{
m_Guild.RemoveEnemy(g);
m_Guild.GuildMessage(
1018018,
true,
"{0} ({1})",
g.Name,
g.Abbreviation
); // Guild Message: You are now at peace with this guild:
// Guild Message: You are now at peace with this guild:
m_Guild.GuildMessage(1018018, true, $"{g.Name} ({g.Abbreviation})");
GuildGump.EnsureClosed(m_Mobile);

View file

@ -62,26 +62,15 @@ namespace Server.Gumps
if (!m_Guild.WarDeclarations.Contains(g))
{
m_Guild.WarDeclarations.Add(g);
m_Guild.GuildMessage(
1018019,
true,
"{0} ({1})",
g.Name,
g.Abbreviation
); // Guild Message: Your guild has sent an invitation for war:
// Guild Message: Your guild has sent an invitation for war:
m_Guild.GuildMessage(1018019, true, $"{g.Name} ({g.Abbreviation})");
}
if (!g.WarInvitations.Contains(m_Guild))
{
g.WarInvitations.Add(m_Guild);
g.GuildMessage(
1018021,
true,
"{0} ({1})",
m_Guild.Name,
m_Guild
.Abbreviation
); // Guild Message: Your guild has received an invitation to war:
// Guild Message: Your guild has received an invitation to war:
g.GuildMessage(1018021, true, $"{m_Guild.Name} ({m_Guild.Abbreviation})");
}
}

View file

@ -43,7 +43,7 @@ namespace Server.Gumps
{
if (BaseGuild.FindByName(text) != null)
{
m_Mobile.SendMessage("{0} conflicts with the name of an existing guild.", text);
m_Mobile.SendMessage($"{text} conflicts with the name of an existing guild.");
}
else
{

View file

@ -137,7 +137,7 @@ namespace Server.Guilds
}
else
{
pm.SendMessage("You can't demote a {0}.", RankDefinition.Lowest.Name);
pm.SendMessage($"You can't demote a {RankDefinition.Lowest.Name}.");
}
}
else