Replace IActorInit with an abstract class.
A shared ValueActorInit<T> is introduced to reduce duplication in the most common init cases, and an ActorInitActorReference allow actors to be referenced by map.yaml name.
This commit is contained in:
@@ -146,7 +146,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
if (turretInit != null)
|
||||
{
|
||||
var newTurretFacing = (turretInit.Value + newFacing - oldFacing + 255) % 255;
|
||||
actor.ReplaceInit(new TurretFacingInit(newTurretFacing));
|
||||
actor.ReplaceInit(new TurretFacingInit(this, newTurretFacing));
|
||||
}
|
||||
|
||||
if (turretsInit != null)
|
||||
|
||||
Reference in New Issue
Block a user