diff --git a/Data/objects.xml b/Data/objects.xml
index 1e577ba5b..25d6a581d 100644
--- a/Data/objects.xml
+++ b/Data/objects.xml
@@ -34,7 +34,6 @@
-
@@ -241,7 +240,7 @@
-
+
@@ -288,66 +287,66 @@
-
-
+
+
-
-
+
+
-
+
-
+
-
+
-
+
-
-
-
+
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
+
-
-
+
+
-
+
@@ -435,9 +434,9 @@
-
+
-
+
@@ -458,7 +457,7 @@
-
+
@@ -467,7 +466,7 @@
-
+
@@ -497,8 +496,8 @@
-
-
+
+
@@ -517,7 +516,7 @@
-
+
@@ -530,28 +529,28 @@
-
-
-
+
+
+
-
-
+
+
-
-
-
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
@@ -618,10 +617,10 @@
-
+
-
+
@@ -1023,7 +1022,7 @@
-
+
@@ -1203,14 +1202,13 @@
-
-
+
@@ -1218,14 +1216,16 @@
+
+
-
+
@@ -1236,11 +1236,13 @@
+
+
@@ -1251,12 +1253,11 @@
+
-
-
-
+
@@ -1270,15 +1271,18 @@
+
+
+
@@ -1295,6 +1299,7 @@
+
@@ -1303,16 +1308,17 @@
-
-
+
+
-
+
-
+
+
@@ -1331,12 +1337,13 @@
-
+
+
@@ -1364,19 +1371,19 @@
-
-
+
-
+
+
@@ -1384,11 +1391,12 @@
-
+
+
@@ -1415,7 +1423,9 @@
+
+
@@ -1429,8 +1439,9 @@
-
+
+
@@ -1458,11 +1469,12 @@
+
-
-
+
+
@@ -1479,12 +1491,12 @@
-
+
-
+
@@ -1518,6 +1530,7 @@
+
@@ -1526,9 +1539,6 @@
-
-
-
@@ -1536,6 +1546,7 @@
+
@@ -1543,18 +1554,19 @@
-
+
+
-
-
+
+
@@ -1754,7 +1766,7 @@
-
+
@@ -1772,7 +1784,7 @@
-
+
@@ -1937,7 +1949,7 @@
-
+
@@ -2018,10 +2030,10 @@
-
+
-
+
@@ -2036,17 +2048,17 @@
-
-
-
+
+
+
-
-
-
-
+
+
+
+
-
+
@@ -2067,12 +2079,12 @@
-
+
-
+
@@ -2083,7 +2095,7 @@
-
+
@@ -2094,15 +2106,15 @@
-
+
-
+
-
+
@@ -2126,11 +2138,11 @@
-
+
-
+
@@ -2152,7 +2164,7 @@
-
+
@@ -2255,20 +2267,20 @@
-
+
-
-
+
+
-
+
-
+
@@ -2303,10 +2315,10 @@
-
+
-
-
+
+
@@ -2321,13 +2333,13 @@
-
+
-
+
-
+
@@ -2341,36 +2353,36 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
-
-
-
+
+
+
+
-
-
-
+
+
+
@@ -2383,11 +2395,11 @@
-
-
-
+
+
+
-
+
@@ -2402,24 +2414,24 @@
-
+
-
+
-
+
-
+
-
+
-
+
@@ -2431,16 +2443,16 @@
-
-
+
+
-
-
+
+
@@ -2481,151 +2493,150 @@
-
+
-
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
+
+
-
-
-
-
+
+
+
+
-
-
-
-
+
+
+
+
-
-
-
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
-
-
-
+
+
+
diff --git a/Scripts/Commands/Docs.cs b/Scripts/Commands/Docs.cs
index 7941e4351..0f19f958a 100644
--- a/Scripts/Commands/Docs.cs
+++ b/Scripts/Commands/Docs.cs
@@ -148,17 +148,6 @@ namespace Server.Commands
}
}
- private class NamespaceComparer : IComparer
- {
- public int Compare( object x, object y )
- {
- DictionaryEntry a = (DictionaryEntry)x;
- DictionaryEntry b = (DictionaryEntry)y;
-
- return ((string)a.Key).CompareTo( (string)b.Key );
- }
- }
-
private class TypeInfo
{
public Type m_Type, m_BaseType, m_Declaring;
@@ -176,13 +165,15 @@ namespace Server.Commands
m_Interfaces = type.GetInterfaces();
- m_TypeName = type.Name;
- m_FileName = Docs.GetFileName( "docs/types/", m_TypeName, ".html" );
+ m_TypeName = GetGenericTypeName( m_Type );
+
+ m_FileName = Docs.GetFileName( "docs/types/", GetGenericTypeName( m_Type, "-", "-" ), ".html" );
m_Writer = Docs.GetWriter( "docs/types/", m_FileName );
}
}
+ #region FileSystem
private static readonly char[] ReplaceChars = "<>".ToCharArray();
public static string GetFileName( string root, string name, string ext )
@@ -210,6 +201,37 @@ namespace Server.Commands
return file;
}
+ private static string m_RootDirectory = Path.GetDirectoryName( Environment.GetCommandLineArgs()[0] );
+
+ private static void EnsureDirectory( string path )
+ {
+ path = Path.Combine( m_RootDirectory, path );
+
+ if( !Directory.Exists( path ) )
+ Directory.CreateDirectory( path );
+ }
+
+ private static void DeleteDirectory( string path )
+ {
+ path = Path.Combine( m_RootDirectory, path );
+
+ if( Directory.Exists( path ) )
+ Directory.Delete( path, true );
+ }
+
+ private static StreamWriter GetWriter( string root, string name )
+ {
+ return new StreamWriter( Path.Combine( Path.Combine( m_RootDirectory, root ), name ) );
+ }
+
+ private static StreamWriter GetWriter( string path )
+ {
+ return new StreamWriter( Path.Combine( m_RootDirectory, path ) );
+ }
+ #endregion
+
+ #region GetPair
+
private static string[,] m_Aliases = new string[,]
{
{ "System.Object", "object" },
@@ -230,10 +252,6 @@ namespace Server.Commands
{ "System.Void", "void" }
};
- private static string m_RootDirectory = Path.GetDirectoryName( Environment.GetCommandLineArgs()[0] );
-
- private const string RefString = "ref ";
-
private static int m_AliasLength = m_Aliases.GetLength( 0 );
public static string GetPair( Type varType, string name, bool ignoreRef )
@@ -326,24 +344,12 @@ namespace Server.Commands
return String.Concat( prepend, aliased, append, name );
}
+ #endregion
+
private static Dictionary m_Types;
private static Dictionary> m_Namespaces;
- private static void EnsureDirectory( string path )
- {
- path = Path.Combine( m_RootDirectory, path );
-
- if( !Directory.Exists( path ) )
- Directory.CreateDirectory( path );
- }
-
- private static void DeleteDirectory( string path )
- {
- path = Path.Combine( m_RootDirectory, path );
-
- if( Directory.Exists( path ) )
- Directory.Delete( path, true );
- }
+ #region Root documentation
private static void Document()
{
@@ -442,6 +448,10 @@ namespace Server.Commands
}
}
+ #endregion
+
+ #region BODs
+
private const int Iron = 0xCCCCDD;
private const int DullCopper = 0xAAAAAA;
private const int ShadowIron = 0x777799;
@@ -1178,6 +1188,9 @@ namespace Server.Commands
#endregion
+ #endregion
+
+ #region Bodies
public static List LoadBodies()
{
List list = new List();
@@ -1283,7 +1296,9 @@ namespace Server.Commands
html.WriteLine( "