Cleanup/Housekeeping (#242)

This commit is contained in:
Kamron Batman 2020-09-12 15:31:21 -07:00 committed by GitHub
parent 90ede0659f
commit 741e8d8300
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
228 changed files with 6292 additions and 2690 deletions

View file

@ -1,6 +1,6 @@
/*************************************************************************
* ModernUO *
* Copyright (C) 2019-2020 - ModernUO Development Team *
* Copyright 2019-2020 - ModernUO Development Team *
* Email: hi@modernuo.com *
* File: AccountSecurity.cs *
* *

View file

@ -1,6 +1,6 @@
/*************************************************************************
* ModernUO *
* Copyright (C) 2019-2020 - ModernUO Development Team *
* Copyright 2019-2020 - ModernUO Development Team *
* Email: hi@modernuo.com *
* File: Argon2PasswordProtection.cs *
* *

View file

@ -1,6 +1,6 @@
/*************************************************************************
* ModernUO *
* Copyright (C) 2019-2020 - ModernUO Development Team *
* Copyright 2019-2020 - ModernUO Development Team *
* Email: hi@modernuo.com *
* File: MD5PasswordProtection.cs *
* *

View file

@ -1,6 +1,6 @@
/*************************************************************************
* ModernUO *
* Copyright (C) 2019-2020 - ModernUO Development Team *
* Copyright 2019-2020 - ModernUO Development Team *
* Email: hi@modernuo.com *
* File: PBKDF2PasswordProtection.cs *
* *

View file

@ -1,6 +1,6 @@
/*************************************************************************
* ModernUO *
* Copyright (C) 2019-2020 - ModernUO Development Team *
* Copyright 2019-2020 - ModernUO Development Team *
* Email: hi@modernuo.com *
* File: SHA1PasswordProtection.cs *
* *

View file

@ -1,6 +1,6 @@
/*************************************************************************
* ModernUO *
* Copyright (C) 2019-2020 - ModernUO Development Team *
* Copyright 2019-2020 - ModernUO Development Team *
* Email: hi@modernuo.com *
* File: SHA2PasswordProtection.cs *
* *

View file

@ -1,6 +1,6 @@
/*************************************************************************
* ModernUO *
* Copyright (C) 2019-2020 - ModernUO Development Team *
* Copyright 2019-2020 - ModernUO Development Team *
* Email: hi@modernuo.com *
* File: CAGCategory.cs *
* *

View file

@ -1,6 +1,6 @@
/*************************************************************************
* ModernUO *
* Copyright (C) 2019-2020 - ModernUO Development Team *
* Copyright 2019-2020 - ModernUO Development Team *
* Email: hi@modernuo.com *
* File: CAGLoader.cs *
* *

View file

@ -1,6 +1,6 @@
/*************************************************************************
* ModernUO *
* Copyright (C) 2019-2020 - ModernUO Development Team *
* Copyright 2019-2020 - ModernUO Development Team *
* Email: hi@modernuo.com *
* File: CAGNode.cs *
* *

View file

@ -1,6 +1,6 @@
/*************************************************************************
* ModernUO *
* Copyright (C) 2019-2020 - ModernUO Development Team *
* Copyright 2019-2020 - ModernUO Development Team *
* Email: hi@modernuo.com *
* File: CAGObject.cs *
* *

View file

@ -1,6 +1,6 @@
/*************************************************************************
* ModernUO *
* Copyright (C) 2019-2020 - ModernUO Development Team *
* Copyright 2019-2020 - ModernUO Development Team *
* Email: hi@modernuo.com *
* File: EmailConfiguration.cs *
* *

View file

@ -117,7 +117,6 @@ namespace Server.Items
Use(from);
}
// Called by RunUO
public static void Initialize()
{
EventSink.OpenDoorMacroUsed += EventSink_OpenDoorMacroUsed;

View file

@ -185,9 +185,9 @@ namespace Server.Items
case MiningCartType.GemEast:
if (Gems > 0)
{
var gems = Utility.Random(15) switch
Item gems = Utility.Random(15) switch
{
0 => (Item)new Amber(),
0 => new Amber(),
1 => new Amethyst(),
2 => new Citrine(),
3 => new Diamond(),
@ -196,14 +196,14 @@ namespace Server.Items
6 => new Sapphire(),
7 => new StarSapphire(),
8 => new Tourmaline(),
// Mondain's Legacy gems
9 => new PerfectEmerald(),
10 => new DarkSapphire(),
11 => new Turquoise(),
12 => new EcruCitrine(),
13 => new FireRuby(),
14 => new BlueDiamond(),
_ => null
_ => new BlueDiamond() // 14
};
var amount = Math.Min(5, Gems);

View file

@ -1,6 +1,6 @@
/*************************************************************************
* ModernUO *
* Copyright (C) 2019-2020 - ModernUO Development Team *
* Copyright 2019-2020 - ModernUO Development Team *
* Email: hi@modernuo.com *
* File: TextDefinitionConverter.cs *
* *

View file

@ -1,6 +1,6 @@
/*************************************************************************
* ModernUO *
* Copyright (C) 2019-2020 - ModernUO Development Team *
* Copyright 2019-2020 - ModernUO Development Team *
* Email: hi@modernuo.com *
* File: TextDefinitionConverterFactory.cs *
* *

View file

@ -395,7 +395,9 @@ namespace Server.Items
ResourceTypes = resourceTypes;
for (var i = 0; i < resourceTypes.Length; ++i)
{
CraftResources.RegisterType(resourceTypes[i], resource);
}
}
public int Hue { get; }
@ -723,7 +725,9 @@ namespace Server.Items
public static void RegisterType(Type resourceType, CraftResource resource)
{
if (m_TypeTable == null)
{
m_TypeTable = new Dictionary<Type, CraftResource>();
}
m_TypeTable[resourceType] = resource;
}
@ -735,7 +739,9 @@ namespace Server.Items
public static CraftResource GetFromType(Type resourceType)
{
if (m_TypeTable == null)
{
return CraftResource.None;
}
return m_TypeTable.TryGetValue(resourceType, out var res) ? res : CraftResource.None;
}
@ -760,7 +766,9 @@ namespace Server.Items
var index = GetIndex(resource);
if (index >= 0 && index < list.Length)
{
return list[index];
}
}
return null;
@ -772,16 +780,24 @@ namespace Server.Items
public static CraftResourceType GetType(CraftResource resource)
{
if (resource >= CraftResource.Iron && resource <= CraftResource.Valorite)
{
return CraftResourceType.Metal;
}
if (resource >= CraftResource.RegularLeather && resource <= CraftResource.BarbedLeather)
{
return CraftResourceType.Leather;
}
if (resource >= CraftResource.RedScales && resource <= CraftResource.BlueScales)
{
return CraftResourceType.Scales;
}
if (resource >= CraftResource.RegularWood && resource <= CraftResource.Frostwood)
{
return CraftResourceType.Wood;
}
return CraftResourceType.None;
}
@ -810,7 +826,9 @@ namespace Server.Items
var start = GetStart(resource);
if (start == CraftResource.None)
{
return 0;
}
return resource - start;
}
@ -855,32 +873,69 @@ namespace Server.Items
public static CraftResource GetFromOreInfo(OreInfo info)
{
if (info.Name.IndexOf("Spined") >= 0)
{
return CraftResource.SpinedLeather;
}
if (info.Name.IndexOf("Horned") >= 0)
{
return CraftResource.HornedLeather;
}
if (info.Name.IndexOf("Barbed") >= 0)
{
return CraftResource.BarbedLeather;
}
if (info.Name.IndexOf("Leather") >= 0)
{
return CraftResource.RegularLeather;
}
if (info.Level == 0)
{
return CraftResource.Iron;
}
if (info.Level == 1)
{
return CraftResource.DullCopper;
}
if (info.Level == 2)
{
return CraftResource.ShadowIron;
}
if (info.Level == 3)
{
return CraftResource.Copper;
}
if (info.Level == 4)
{
return CraftResource.Bronze;
}
if (info.Level == 5)
{
return CraftResource.Gold;
}
if (info.Level == 6)
{
return CraftResource.Agapite;
}
if (info.Level == 7)
{
return CraftResource.Verite;
}
if (info.Level == 8)
{
return CraftResource.Valorite;
}
return CraftResource.None;
}
@ -896,13 +951,24 @@ namespace Server.Items
material == ArmorMaterialType.Horned || material == ArmorMaterialType.Barbed)
{
if (info.Level == 0)
{
return CraftResource.RegularLeather;
}
if (info.Level == 1)
{
return CraftResource.SpinedLeather;
}
if (info.Level == 2)
{
return CraftResource.HornedLeather;
}
if (info.Level == 3)
{
return CraftResource.BarbedLeather;
}
return CraftResource.None;
}
@ -911,7 +977,7 @@ namespace Server.Items
}
}
// NOTE: This class is only for compatability with very old RunUO versions.
// NOTE: This class is only for compatibility with very old RunUO versions.
// No changes to it should be required for custom resources.
public class OreInfo
{

View file

@ -107,7 +107,7 @@ namespace Server.Misc
op.WriteLine(" tr.even td { background: #DDD; color: #222; }");
op.WriteLine(" </style>");
op.WriteLine(" <body>");
op.WriteLine(" <h1>RunUO Server Status</h1>");
op.WriteLine(" <h1>ModernUO Server Status</h1>");
op.WriteLine(" <h3>Online clients</h3>");
op.WriteLine(" <table cellpadding=\"0\" cellspacing=\"0\">");
op.WriteLine(

File diff suppressed because it is too large Load diff