Use RgbaColorRenderer in WeatherOverlay.
This commit is contained in:
@@ -38,7 +38,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
[Desc("Particles are drawn in squares when enabled, otherwise with lines.")]
|
||||
public readonly bool UseSquares = true;
|
||||
|
||||
[Desc("Works only with squares enabled. Size min. and max. value in pixels.")]
|
||||
[Desc("Size / width of the particle in px.")]
|
||||
public readonly int[] ParticleSize = { 1, 3 };
|
||||
|
||||
[Desc("Scatters falling direction on the x-axis. Scatter min. and max. value in px/tick.")]
|
||||
@@ -294,7 +294,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
else
|
||||
{
|
||||
var tempPosTail = new float2(topLeft.X + item.PosX - currentWindXOffset, item.PosY - (item.Gravity * 2 / 3) + topLeft.Y);
|
||||
Game.Renderer.WorldLineRenderer.DrawLine(tempPos, tempPosTail, item.Color, item.TailColor);
|
||||
Game.Renderer.WorldRgbaColorRenderer.DrawLine(tempPos, tempPosTail, item.Size, item.TailColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2694,6 +2694,14 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
}
|
||||
}
|
||||
|
||||
// Added width support for line particles
|
||||
if (engineVersion < 20151220 && node.Key == "WeatherOverlay")
|
||||
{
|
||||
var useSquares = node.Value.Nodes.FirstOrDefault(n => n.Key == "UseSquares");
|
||||
if (useSquares != null && !FieldLoader.GetValue<bool>("UseSquares", useSquares.Value.Value))
|
||||
node.Value.Nodes.Add(new MiniYamlNode("ParticleSize", "1, 1"));
|
||||
}
|
||||
|
||||
UpgradeActorRules(engineVersion, ref node.Value.Nodes, node, depth + 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1055,7 +1055,6 @@ Rules:
|
||||
WindTick: 150, 550
|
||||
InstantWindChanges: false
|
||||
UseSquares: false
|
||||
ParticleSize: 0, 0
|
||||
ScatterDirection: 0, 0
|
||||
Gravity: 8.00, 12.00
|
||||
SwingOffset: 0, 0
|
||||
@@ -1063,6 +1062,7 @@ Rules:
|
||||
SwingAmplitude: 0, 0
|
||||
ParticleColors: 304074, 28386C, 202C60, 182C54
|
||||
LineTailAlphaValue: 150
|
||||
ParticleSize: 1, 1
|
||||
GlobalLightingPaletteEffect:
|
||||
Red: 0.75
|
||||
Green: 0.85
|
||||
|
||||
@@ -508,7 +508,6 @@ Rules:
|
||||
WindTick: 150, 550
|
||||
InstantWindChanges: false
|
||||
UseSquares: false
|
||||
ParticleSize: 0, 0
|
||||
ScatterDirection: 0, 0
|
||||
Gravity: 8.00, 12.00
|
||||
SwingOffset: 0, 0
|
||||
@@ -516,6 +515,7 @@ Rules:
|
||||
SwingAmplitude: 0, 0
|
||||
ParticleColors: 304074, 28386C, 202C60, 182C54
|
||||
LineTailAlphaValue: 150
|
||||
ParticleSize: 1, 1
|
||||
GlobalLightingPaletteEffect:
|
||||
Red: 0.75
|
||||
Green: 0.85
|
||||
|
||||
Reference in New Issue
Block a user