Adds style cop (#109)

This commit is contained in:
Kamron Batman 2020-04-26 00:16:02 -07:00 • committed by GitHub
parent 3e715bcb60
commit 556a17aba8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
1725 changed files with 33831 additions and 38046 deletions

View file

@ -3,7 +3,7 @@ namespace Server.Items
[Flippable(0x236E, 0x2371)]
public class LightOfTheWinterSolstice : Item
{
private static string[] m_StaffNames =
private static readonly string[] m_StaffNames =
{
"Aenima",
"Alkiser",
@ -12,14 +12,14 @@ namespace Server.Items
"Krrios",
"Mark",
"Merlin",
"Merlix", //LordMerlix
"Merlix", // LordMerlix
"Phantom",
"Phenos",
"psz",
"Ryan",
"Quantos",
"Outkast", //TheOutkastDev
"V", //Admin_V
"Outkast", // TheOutkastDev
"V", // Admin_V
"Zippy"
};
@ -39,7 +39,7 @@ namespace Server.Items
}
[CommandProperty(AccessLevel.GameMaster)]
public string Dipper{ get; set; }
public string Dipper { get; set; }
public override void OnSingleClick(Mobile from)
{
@ -75,15 +75,15 @@ namespace Server.Items
switch (version)
{
case 1:
{
Dipper = reader.ReadString();
break;
}
{
Dipper = reader.ReadString();
break;
}
case 0:
{
Dipper = m_StaffNames[Utility.Random(m_StaffNames.Length)];
break;
}
{
Dipper = m_StaffNames[Utility.Random(m_StaffNames.Length)];
break;
}
}
if (Dipper != null)

View file

@ -117,8 +117,8 @@ namespace Server.Items
private class MistletoeAddonGump : Gump
{
private MistletoeAddon m_Addon;
private Mobile m_From;
private readonly MistletoeAddon m_Addon;
private readonly Mobile m_From;
public MistletoeAddonGump(Mobile from, MistletoeAddon addon) : base(150, 50)
{
@ -282,9 +282,9 @@ namespace Server.Items
private class MistletoeDeedGump : Gump
{
private MistletoeDeed m_Deed;
private Mobile m_From;
private Point3D m_Loc;
private readonly MistletoeDeed m_Deed;
private readonly Mobile m_From;
private readonly Point3D m_Loc;
public MistletoeDeedGump(Mobile from, Point3D loc, MistletoeDeed deed) : base(150, 50)
{

View file

@ -64,7 +64,6 @@ namespace Server.Items
{
from.SendLocalizedMessage(1010097); // You cannot use this while mounted.
}
else if (from.CanBeginAction<SnowPile>())
{
from.SendLocalizedMessage(1005575); // You carefully pack the snow into a ball...
@ -78,7 +77,7 @@ namespace Server.Items
private class InternalTimer : Timer
{
private Mobile m_From;
private readonly Mobile m_From;
public InternalTimer(Mobile from) : base(TimeSpan.FromSeconds(5.0)) => m_From = from;
@ -147,4 +146,4 @@ namespace Server.Items
}
}
}
}
}

View file

@ -50,7 +50,6 @@ namespace Server.Items
{
from.SendLocalizedMessage(1010097); // You cannot use this while mounted.
}
else if (from.CanBeginAction<SnowPile>())
{
from.SendLocalizedMessage(1005575); // You carefully pack the snow into a ball...
@ -64,7 +63,7 @@ namespace Server.Items
private class InternalTimer : Timer
{
private Mobile m_From;
private readonly Mobile m_From;
public InternalTimer(Mobile from) : base(TimeSpan.FromSeconds(5.0)) => m_From = from;
@ -133,4 +132,4 @@ namespace Server.Items
}
}
}
}
}