Add ability to load and save HashSets.

This commit is contained in:
RoosterDragon
2015-08-26 20:05:29 +01:00
parent 410b97823a
commit 5a177a889c
2 changed files with 18 additions and 2 deletions

View File

@@ -91,8 +91,12 @@ namespace OpenRA
if (t.IsArray && t.GetArrayRank() == 1)
{
var elems = ((Array)v).OfType<object>();
return elems.JoinWith(", ");
return ((Array)v).Cast<object>().JoinWith(", ");
}
if (t.IsGenericType && t.GetGenericTypeDefinition() == typeof(HashSet<>))
{
return ((System.Collections.IEnumerable)v).Cast<object>().JoinWith(", ");
}
if (t.IsGenericType && t.GetGenericTypeDefinition() == typeof(OpenRA.Primitives.Cache<,>))