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:
@@ -63,7 +63,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
}
|
||||
|
||||
public class SkipMakeAnimsInit : RuntimeFlagInit { }
|
||||
public class SpawnedByMapInit : ValueActorInit<string>, ISuppressInitExport
|
||||
public class SpawnedByMapInit : ValueActorInit<string>, ISuppressInitExport, ISingleInstanceInit
|
||||
{
|
||||
public SpawnedByMapInit(string value)
|
||||
: base(value) { }
|
||||
|
||||
Reference in New Issue
Block a user