Add weapon rules documentation.

This commit is contained in:
Matthias Mailänder
2016-08-28 17:28:59 +02:00
committed by reaperrr
parent 1a54b36e2b
commit fdad5e2c48
6 changed files with 120 additions and 1 deletions

View File

@@ -201,7 +201,10 @@ namespace OpenRA.Mods.Common
return "Mapping of {0} to {1}".F(t.GetGenericArguments().Select(FriendlyTypeName).ToArray());
if (t.IsSubclassOf(typeof(Array)))
return "Multiple {0}".F(FriendlyTypeName(t.GetElementType()));
return "Collection of {0}".F(FriendlyTypeName(t.GetElementType()));
if (t.IsGenericType && t.GetGenericTypeDefinition().GetInterfaces().Any(e => e.IsGenericType && e.GetGenericTypeDefinition() == typeof(IEnumerable<>)))
return "Collection of {0}".F(FriendlyTypeName(t.GetGenericArguments().First()));
if (t == typeof(int) || t == typeof(uint))
return "Integer";
@@ -239,6 +242,12 @@ namespace OpenRA.Mods.Common
if (t == typeof(HSLColor) || t == typeof(Color))
return "Color (RRGGBB[AA] notation)";
if (t == typeof(IProjectileInfo))
return "Projectile";
if (t == typeof(IWarhead))
return "Warhead";
return t.Name;
}
}