Expose common actor Inits in the map editor.

This commit is contained in:
Paul Chote
2018-12-08 18:41:12 +00:00
committed by reaperrr
parent f6768fe624
commit 4723e5ddb9
11 changed files with 369 additions and 79 deletions

View File

@@ -134,6 +134,14 @@ namespace OpenRA.Mods.Common.Traits
GeneratePreviews();
}
public void RemoveInit<T>()
{
var original = actor.InitDict.GetOrDefault<T>();
if (original != null)
actor.InitDict.Remove(original);
GeneratePreviews();
}
public T Init<T>()
{
return actor.InitDict.GetOrDefault<T>();