Add an upgrade rule
This commit is contained in:
@@ -256,6 +256,18 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ParticleDensityFactor was converted from a float to an int
|
||||||
|
if (engineVersion < 20160713 && node.Key == "WeatherOverlay")
|
||||||
|
{
|
||||||
|
var density = node.Value.Nodes.FirstOrDefault(n => n.Key == "ParticleDensityFactor");
|
||||||
|
if (density != null)
|
||||||
|
{
|
||||||
|
var value = float.Parse(density.Value.Value, CultureInfo.InvariantCulture);
|
||||||
|
value = (int)Math.Round(value * 10000, 0);
|
||||||
|
density.Value.Value = value.ToString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
UpgradeActorRules(modData, engineVersion, ref node.Value.Nodes, node, depth + 1);
|
UpgradeActorRules(modData, engineVersion, ref node.Value.Nodes, node, depth + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user