Add method to check if IGlobalModData exists.

This commit is contained in:
Paul Chote
2016-02-15 20:55:29 +00:00
parent 3674038f00
commit ab25e26312

View File

@@ -169,6 +169,11 @@ namespace OpenRA
return new ReadOnlyDictionary<string, string>(inner);
}
public bool Contains<T>() where T : IGlobalModData
{
return modules.Contains<T>();
}
public T Get<T>() where T : IGlobalModData
{
var module = modules.GetOrDefault<T>();