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:
@@ -35,7 +35,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
public GrantConditionOnLineBuildDirection(ActorInitializer init, GrantConditionOnLineBuildDirectionInfo info)
|
||||
{
|
||||
this.info = info;
|
||||
direction = init.GetValue<LineBuildDirectionInit, LineBuildDirection>(info);
|
||||
direction = init.GetValue<LineBuildDirectionInit, LineBuildDirection>();
|
||||
}
|
||||
|
||||
void INotifyCreated.Created(Actor self)
|
||||
|
||||
Reference in New Issue
Block a user