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:
@@ -45,7 +45,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
var bibOffset = bi.Dimensions.Y - rows;
|
||||
var centerOffset = bi.CenterOffset(init.World);
|
||||
var map = init.World.Map;
|
||||
var location = init.GetValue<LocationInit, CPos>(this, CPos.Zero);
|
||||
var location = init.GetValue<LocationInit, CPos>(CPos.Zero);
|
||||
|
||||
for (var i = 0; i < rows * width; i++)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user