Revert color validator

This commit is contained in:
Gustas
2023-07-03 12:21:26 +03:00
committed by Matthias Mailänder
parent 4cd4e1f8ea
commit 9d8f0634b1
2 changed files with 27 additions and 31 deletions

View File

@@ -19,7 +19,7 @@ namespace OpenRA.Mods.Common.UpdateRules.Rules
public override string Name => "ColorPickerManager's PresetHues, PresetSaturations and V were replaced with PresetColors.";
public override string Description =>
"Each preset color can now have their brightness specified.";
"Each preset color can now have their brightness specified. SimilarityThreshold range was changed.";
public override IEnumerable<string> UpdateActorNode(ModData modData, MiniYamlNode actorNode)
{
@@ -27,6 +27,8 @@ namespace OpenRA.Mods.Common.UpdateRules.Rules
if (manager == null)
yield break;
manager.RemoveNodes("SimilarityThreshold");
var v = manager.LastChildMatching("V")?.NodeValue<float>() ?? 0.95f;
var hues = manager.LastChildMatching("PresetHues")?.NodeValue<float[]>();
var saturations = manager.LastChildMatching("PresetSaturations")?.NodeValue<float[]>();