rm presets from Data and have them converted to rgb as needed
This commit is contained in:
parent
91bbbb4cb4
commit
e09e1525c2
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
|
@ -28,8 +29,10 @@ namespace Celeste.Mod.AvaliSkin {
|
|||
get => new AvaliConfig {
|
||||
Enabled = Settings.Enabled,
|
||||
ColorMode = Settings.ColorModeOpt,
|
||||
ManualPreset = Settings.DashPreset,
|
||||
ManualRGB = Settings.DashRGBColor,
|
||||
DashColors =
|
||||
Settings.ColorModeOpt == ColorMode.ManualPreset
|
||||
? Settings.DashPreset.Select(preset => ColorUtil.SettingToColor(preset)).ToList()
|
||||
: Settings.DashRGBColor,
|
||||
LightBody = Settings.ColorModeOpt == ColorMode.ManualPreset ? ColorUtil.SettingToColor(Settings.LightBodyPreset) : Settings.LightBodyRGBColor,
|
||||
DarkBody = Settings.ColorModeOpt == ColorMode.ManualPreset ? ColorUtil.SettingToColor(Settings.DarkBodyPreset) : Settings.DarkBodyRGBColor,
|
||||
};
|
||||
|
@ -40,8 +43,8 @@ namespace Celeste.Mod.AvaliSkin {
|
|||
ColorMode = ColorMode.ExternalDash,
|
||||
LightBody = PlayerConfig.LightBody,
|
||||
DarkBody = PlayerConfig.DarkBody,
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
private static Effect FxRecolor;
|
||||
|
||||
public static EverestModuleMetadata CelesteNetMeta = new EverestModuleMetadata() {
|
||||
|
|
|
@ -17,8 +17,7 @@ namespace Celeste.Mod.AvaliSkin {
|
|||
|
||||
public bool Enabled;
|
||||
public ColorMode ColorMode;
|
||||
public List<ColorChoice> ManualPreset = new List<ColorChoice>();
|
||||
public List<Color> ManualRGB = new List<Color>();
|
||||
public List<Color> DashColors = new List<Color>();
|
||||
public Color LightBody;
|
||||
public Color DarkBody;
|
||||
|
||||
|
@ -52,18 +51,11 @@ namespace Celeste.Mod.AvaliSkin {
|
|||
|
||||
// If the player does have no hair, then just default to
|
||||
// whatever preset... this only happens momentarily anyways
|
||||
return ColorUtil.SettingToColor(
|
||||
ManualPreset[Math.Min(dashes, ManualPreset.Count - 1)]
|
||||
);
|
||||
return this.DashColors[Math.Min(dashes, this.DashColors.Count - 1)];
|
||||
}
|
||||
|
||||
case ColorMode.ManualRGB:
|
||||
return ManualRGB[Math.Min(dashes, ManualRGB.Count - 1)];
|
||||
|
||||
case ColorMode.ManualPreset: default:
|
||||
return ColorUtil.SettingToColor(
|
||||
ManualPreset[Math.Min(dashes, ManualPreset.Count - 1)]
|
||||
);
|
||||
case ColorMode.ManualRGB: default:
|
||||
return this.DashColors[Math.Min(dashes, this.DashColors.Count - 1)];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue