Add country definitions

This commit is contained in:
ScottNZ
2014-10-04 21:52:39 +13:00
parent 5b011e6baf
commit c4110bad45
5 changed files with 49 additions and 6 deletions

View File

@@ -33,5 +33,17 @@ namespace OpenRA.Widgets
{
return FieldLoader.GetValue<T>(key, data[key]);
}
public static bool TryGet<T>(string key, out T result)
{
string s;
if (!data.TryGetValue(key, out s))
{
result = default(T);
return false;
}
result = FieldLoader.GetValue<T>(key, s);
return true;
}
}
}