diff options
author | Zoryn Aaron <zoryn4163@gmail.com> | 2016-03-23 01:11:13 -0400 |
---|---|---|
committer | Zoryn Aaron <zoryn4163@gmail.com> | 2016-03-23 01:11:13 -0400 |
commit | a56e98c87cb67577f3e2e45f192df2835ded81fd (patch) | |
tree | 0837380745fc0139fd4880e25c4405a792c6d658 /StardewModdingAPI/Extensions.cs | |
parent | 24e144d0f1aaae33fb51e80031259d0119acff7c (diff) | |
download | SMAPI-a56e98c87cb67577f3e2e45f192df2835ded81fd.tar.gz SMAPI-a56e98c87cb67577f3e2e45f192df2835ded81fd.tar.bz2 SMAPI-a56e98c87cb67577f3e2e45f192df2835ded81fd.zip |
redoes getting keys because sillyness
Diffstat (limited to 'StardewModdingAPI/Extensions.cs')
-rw-r--r-- | StardewModdingAPI/Extensions.cs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/StardewModdingAPI/Extensions.cs b/StardewModdingAPI/Extensions.cs index a0e87f04..53c69c29 100644 --- a/StardewModdingAPI/Extensions.cs +++ b/StardewModdingAPI/Extensions.cs @@ -21,10 +21,14 @@ namespace StardewModdingAPI return new Color(Random.Next(0, 255), Random.Next(0, 255), Random.Next(0, 255)); } - public static string ToSingular(this IEnumerable<Object> enumerable, string split = ", ") + public static string ToSingular(this IEnumerable ienum, string split = ", ") { - string result = string.Join(split, enumerable); - return result; + //Apparently Keys[] won't split normally :l + if (ienum is Keys[]) + { + return string.Join(split, (Keys[])ienum); + } + return string.Join(split, ienum); } public static bool IsInt32(this object o) |