Add ISingleInstanceInit interface.
Inits that are logically singletons (e.g. actor location or owner) should implement this interface to avoid runtime inconsistencies. Duplicate instances are rejected at init-time, allowing simpler queries when they are used.
This commit is contained in:
@@ -120,7 +120,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
}
|
||||
}
|
||||
|
||||
public class PlugsInit : ValueActorInit<Dictionary<CVec, string>>
|
||||
public class PlugsInit : ValueActorInit<Dictionary<CVec, string>>, ISingleInstanceInit
|
||||
{
|
||||
public PlugsInit(Dictionary<CVec, string> value)
|
||||
: base(value) { }
|
||||
|
||||
Reference in New Issue
Block a user