better support for contrail coloring everywhere
This commit is contained in:
@@ -32,6 +32,7 @@ namespace OpenRA.Mods.RA.Effects
|
|||||||
public readonly float Angle = 0;
|
public readonly float Angle = 0;
|
||||||
public readonly int TrailInterval = 2;
|
public readonly int TrailInterval = 2;
|
||||||
public readonly int ContrailLength = 0;
|
public readonly int ContrailLength = 0;
|
||||||
|
public readonly Color ContrailColor = Color.White;
|
||||||
public readonly bool ContrailUsePlayerColor = false;
|
public readonly bool ContrailUsePlayerColor = false;
|
||||||
public readonly int ContrailDelay = 1;
|
public readonly int ContrailDelay = 1;
|
||||||
|
|
||||||
@@ -69,7 +70,7 @@ namespace OpenRA.Mods.RA.Effects
|
|||||||
if (Info.ContrailLength > 0)
|
if (Info.ContrailLength > 0)
|
||||||
{
|
{
|
||||||
Trail = new ContrailHistory(Info.ContrailLength,
|
Trail = new ContrailHistory(Info.ContrailLength,
|
||||||
Info.ContrailUsePlayerColor ? ContrailHistory.ChooseColor(args.firedBy) : Color.White,
|
Info.ContrailUsePlayerColor ? ContrailHistory.ChooseColor(args.firedBy) : Info.ContrailColor,
|
||||||
Info.ContrailDelay);
|
Info.ContrailDelay);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ namespace OpenRA.Mods.RA
|
|||||||
public readonly int[] ContrailOffset = {0, 0};
|
public readonly int[] ContrailOffset = {0, 0};
|
||||||
|
|
||||||
public readonly int TrailLength = 20;
|
public readonly int TrailLength = 20;
|
||||||
|
public readonly Color Color = Color.White;
|
||||||
public readonly bool UsePlayerColor = true;
|
public readonly bool UsePlayerColor = true;
|
||||||
|
|
||||||
public object Create(ActorInitializer init) { return new Contrail(init.self, this); }
|
public object Create(ActorInitializer init) { return new Contrail(init.self, this); }
|
||||||
@@ -38,7 +39,7 @@ namespace OpenRA.Mods.RA
|
|||||||
{
|
{
|
||||||
Info = info;
|
Info = info;
|
||||||
ContrailTurret = new Turret(Info.ContrailOffset);
|
ContrailTurret = new Turret(Info.ContrailOffset);
|
||||||
history = new ContrailHistory(Info.TrailLength, Info.UsePlayerColor ? ContrailHistory.ChooseColor(self) : Color.White);
|
history = new ContrailHistory(Info.TrailLength, Info.UsePlayerColor ? ContrailHistory.ChooseColor(self) : Info.Color);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Tick(Actor self)
|
public void Tick(Actor self)
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ namespace OpenRA.Mods.RA.Effects
|
|||||||
public readonly bool TurboBoost = false;
|
public readonly bool TurboBoost = false;
|
||||||
public readonly int TrailInterval = 2;
|
public readonly int TrailInterval = 2;
|
||||||
public readonly int ContrailLength = 0;
|
public readonly int ContrailLength = 0;
|
||||||
|
public readonly Color ContrailColor = Color.White;
|
||||||
public readonly bool ContrailUsePlayerColor = false;
|
public readonly bool ContrailUsePlayerColor = false;
|
||||||
public readonly int ContrailDelay = 1;
|
public readonly int ContrailDelay = 1;
|
||||||
|
|
||||||
@@ -76,7 +77,7 @@ namespace OpenRA.Mods.RA.Effects
|
|||||||
if (Info.ContrailLength > 0)
|
if (Info.ContrailLength > 0)
|
||||||
{
|
{
|
||||||
Trail = new ContrailHistory(Info.ContrailLength,
|
Trail = new ContrailHistory(Info.ContrailLength,
|
||||||
Info.ContrailUsePlayerColor ? ContrailHistory.ChooseColor(args.firedBy) : Color.White,
|
Info.ContrailUsePlayerColor ? ContrailHistory.ChooseColor(args.firedBy) : Info.ContrailColor,
|
||||||
Info.ContrailDelay);
|
Info.ContrailDelay);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user