diff --git a/Scripts/Commands/Docs.cs b/Scripts/Commands/Docs.cs
index d69b96cde..ab7fc3ab2 100644
--- a/Scripts/Commands/Docs.cs
+++ b/Scripts/Commands/Docs.cs
@@ -268,21 +268,6 @@ namespace Server.Commands
{ "System.Char", "char" },
{ "System.Void", "void" },
};
- // For stuff we don't want to links to
- private static string[] m_DontLink = new string[]
- {
- "List",
- "Stack",
- "Queue",
- "Dictionary",
- "LinkedList",
- "SortedList",
- "SortedDictionary",
- "IComparable",
- "IComparer",
- "ICloneable",
- "Type"
- };
private static int m_AliasLength = m_Aliases.GetLength( 0 );
@@ -2154,6 +2139,7 @@ namespace Server.Commands
}
}
+ #region Write[...]
private static void WriteEnum( TypeInfo info, StreamWriter typeHtml )
{
Type type = info.m_Type;
@@ -2424,46 +2410,7 @@ namespace Server.Commands
html.WriteLine( ")
" );
}
-
- /*
- public static string GetGenericTypeName( Type type )
- {
- return GetGenericTypeName( type, "<", ">" );
- }
-
- public static string GetGenericTypeName( Type type, string leftGenericBracket, string rightGenericBracket )
- {
- string name = type.Name;
-
- if( type.IsGenericType )
- {
- int index = name.IndexOf( '`' );
-
- if( index > 0 )
- {
- StringBuilder sb = new StringBuilder( name.Substring( 0, index ) );
-
- sb.Append( leftGenericBracket );
-
- Type[] typeArguments = type.GetGenericArguments();
-
- for( int i = 0; i < typeArguments.Length; i++ )
- {
- if( i != 0 )
- sb.Append( ',' );
-
- sb.Append( typeArguments[i].Name );
- }
-
- sb.Append( rightGenericBracket );
-
- name = sb.ToString();
-
- }
- }
- return name;
- }
- */
+ #endregion
public static void FormatGeneric( Type type, ref string typeName, ref string fileName, ref string linkName )
{
@@ -2481,7 +2428,7 @@ namespace Server.Commands
StringBuilder nameBuilder = new StringBuilder( rootType );
StringBuilder fnamBuilder = new StringBuilder( "docs/types/" + Docs.SanitizeType( rootType ) );
StringBuilder linkBuilder;
- if( DontLink( rootType ) )
+ if( DontLink( type ) )//if( DontLink( rootType ) )
linkBuilder = new StringBuilder( "" + rootType + "" );
else
linkBuilder = new StringBuilder( "" + rootType + "" );
@@ -2506,7 +2453,7 @@ namespace Server.Commands
nameBuilder.Append( sanitizedName );
fnamBuilder.Append( "T" );
- if( DontLink( typeArguments[i].Name ) )
+ if( DontLink( typeArguments[i] ) )//if( DontLink( typeArguments[i].Name ) )
linkBuilder.Append( "" + aliasedName + "" );
else
linkBuilder.Append( "" + aliasedName + "" );
@@ -2529,7 +2476,7 @@ namespace Server.Commands
if( link == null )
{
- if( DontLink( type.Name ) )
+ if( DontLink( type ) ) //if( DontLink( type.Name ) )
linkName = "" + Docs.SanitizeType( type.Name ) + "";
else
linkName = "" + Docs.SanitizeType( type.Name ) + "";
@@ -2562,12 +2509,40 @@ namespace Server.Commands
return name;
}
+ /*
+ // For stuff we don't want to links to
+ private static string[] m_DontLink = new string[]
+ {
+ "List",
+ "Stack",
+ "Queue",
+ "Dictionary",
+ "LinkedList",
+ "SortedList",
+ "SortedDictionary",
+ "IComparable",
+ "IComparer",
+ "ICloneable",
+ "Type"
+ };
+
public static bool DontLink( string name )
{
foreach( string dontLink in m_DontLink )
if( dontLink == name ) return true;
return false;
}
+ */
+ public static bool DontLink( Type type )
+ {
+ if( type.Namespace.StartsWith( "Server" ) )
+ return false;
+
+ if( m_Namespaces == null )
+ return false; //sanity
+
+ return !m_Namespaces.ContainsKey( type.Namespace );
+ }
}
#region BodyEntry & BodyType
diff --git a/Scripts/Misc/CharacterCreation.cs b/Scripts/Misc/CharacterCreation.cs
index 938ac283c..8b68eb7d3 100644
--- a/Scripts/Misc/CharacterCreation.cs
+++ b/Scripts/Misc/CharacterCreation.cs
@@ -889,7 +889,7 @@ namespace Server.Misc
{
name = name.Trim();
- if ( !NameVerification.Validate( name, 2, 16, true, true, true, 1, NameVerification.SpaceDashPeriodQuote ) )
+ if ( !NameVerification.Validate( name, 2, 16, true, false, true, 1, NameVerification.SpaceDashPeriodQuote ) )
name = "Generic Player";
m.Name = name;