Merge pull request #9921 from obrakmann/fix-weatheroverlay-typo

Fix typo in WeatherOverlayInfo
This commit is contained in:
Matthias Mailänder
2015-11-08 09:12:15 +01:00
5 changed files with 13 additions and 7 deletions

View File

@@ -35,11 +35,11 @@ namespace OpenRA.Mods.Common.Traits
[Desc("Hard or soft fading between the WindLevels.")] [Desc("Hard or soft fading between the WindLevels.")]
public readonly bool InstantWindChanges = false; public readonly bool InstantWindChanges = false;
[Desc("Particles are drawn in squares when enabled, else with lines.")] [Desc("Particles are drawn in squares when enabled, otherwise with lines.")]
public readonly bool UseSquares = true; public readonly bool UseSquares = true;
[Desc("Works only with squares enabled. Size min. and max. value in pixels.")] [Desc("Works only with squares enabled. Size min. and max. value in pixels.")]
public readonly int[] PaticleSize = { 1, 3 }; public readonly int[] ParticleSize = { 1, 3 };
[Desc("Scatters falling direction on the x-axis. Scatter min. and max. value in px/tick.")] [Desc("Scatters falling direction on the x-axis. Scatter min. and max. value in px/tick.")]
public readonly int[] ScatterDirection = { -1, 1 }; public readonly int[] ScatterDirection = { -1, 1 };
@@ -64,7 +64,7 @@ namespace OpenRA.Mods.Common.Traits
Color.FromArgb(188, 188, 188) Color.FromArgb(188, 188, 188)
}; };
[Desc("Works only with line enabled and can get used to fade out the tail of the line like a contrail.")] [Desc("Works only with line enabled and can be used to fade out the tail of the line like a contrail.")]
public readonly byte LineTailAlphaValue = 200; public readonly byte LineTailAlphaValue = 200;
public object Create(ActorInitializer init) { return new WeatherOverlay(init.World, this); } public object Create(ActorInitializer init) { return new WeatherOverlay(init.World, this); }
@@ -130,7 +130,7 @@ namespace OpenRA.Mods.Common.Traits
{ {
PosX = Game.CosmeticRandom.Next(Game.Renderer.Resolution.Width), PosX = Game.CosmeticRandom.Next(Game.Renderer.Resolution.Width),
PosY = Game.CosmeticRandom.Next(rangeY), PosY = Game.CosmeticRandom.Next(rangeY),
Size = Game.CosmeticRandom.Next(info.PaticleSize[0], info.PaticleSize[1] + 1), Size = Game.CosmeticRandom.Next(info.ParticleSize[0], info.ParticleSize[1] + 1),
DirectionScatterX = info.ScatterDirection[0] + Game.CosmeticRandom.Next(info.ScatterDirection[1] - info.ScatterDirection[0]), DirectionScatterX = info.ScatterDirection[0] + Game.CosmeticRandom.Next(info.ScatterDirection[1] - info.ScatterDirection[0]),
Gravity = float2.Lerp(info.Gravity[0], info.Gravity[1], Game.CosmeticRandom.NextFloat()), Gravity = float2.Lerp(info.Gravity[0], info.Gravity[1], Game.CosmeticRandom.NextFloat()),
SwingOffset = float2.Lerp(info.SwingOffset[0], info.SwingOffset[1], Game.CosmeticRandom.NextFloat()), SwingOffset = float2.Lerp(info.SwingOffset[0], info.SwingOffset[1], Game.CosmeticRandom.NextFloat()),

View File

@@ -2371,6 +2371,12 @@ namespace OpenRA.Mods.Common.UtilityCommands
TryUpdateColors(ref node.Value.Value); TryUpdateColors(ref node.Value.Value);
} }
if (engineVersion < 20151107 && depth == 2)
{
if (node.Key == "PaticleSize")
node.Key = "ParticleSize";
}
UpgradeActorRules(engineVersion, ref node.Value.Nodes, node, depth + 1); UpgradeActorRules(engineVersion, ref node.Value.Nodes, node, depth + 1);
} }
} }

View File

@@ -1056,7 +1056,7 @@ Rules:
WindTick: 150, 550 WindTick: 150, 550
InstantWindChanges: false InstantWindChanges: false
UseSquares: false UseSquares: false
PaticleSize: 0, 0 ParticleSize: 0, 0
ScatterDirection: 0, 0 ScatterDirection: 0, 0
Gravity: 8.00, 12.00 Gravity: 8.00, 12.00
SwingOffset: 0, 0 SwingOffset: 0, 0

View File

@@ -508,7 +508,7 @@ Rules:
WindTick: 150, 550 WindTick: 150, 550
InstantWindChanges: false InstantWindChanges: false
UseSquares: false UseSquares: false
PaticleSize: 0, 0 ParticleSize: 0, 0
ScatterDirection: 0, 0 ScatterDirection: 0, 0
Gravity: 8.00, 12.00 Gravity: 8.00, 12.00
SwingOffset: 0, 0 SwingOffset: 0, 0

View File

@@ -668,7 +668,7 @@ Rules:
WindTick: 150, 550 WindTick: 150, 550
InstantWindChanges: false InstantWindChanges: false
UseSquares: true UseSquares: true
PaticleSize: 1, 3 ParticleSize: 1, 3
ScatterDirection: -1, 1 ScatterDirection: -1, 1
Gravity: 1.00, 2.00 Gravity: 1.00, 2.00
SwingOffset: 1.0, 1.5 SwingOffset: 1.0, 1.5