diff --git a/src/Config/AssetNode.cs b/src/Config/AssetNode.cs index c2423d896..409cc06eb 100644 --- a/src/Config/AssetNode.cs +++ b/src/Config/AssetNode.cs @@ -72,7 +72,7 @@ public T GetProperty(IAssetProperty assetProperty, T defaultValue) } /// - /// Set's a property by name + /// Sets a property by name /// /// The property /// The value to set the property to @@ -148,4 +148,4 @@ public void SetProperties(IReadOnlyDictionary dict, TypeCon public int Width => GetProperty(AssetProps.Width); // The default width, in pixels, of frames in images inside the file. For sprites only. public int Height => GetProperty(AssetProps.Height); // The default height, in pixels, of frames in images inside the file. For sprites only. public AssetId PaletteId => GetProperty(AssetProps.Palette); // for providing context when exporting 8-bit images to true-colour PNGs -} \ No newline at end of file +} diff --git a/src/Config/PathResolver.cs b/src/Config/PathResolver.cs index 7d3ea0ea3..69407305d 100644 --- a/src/Config/PathResolver.cs +++ b/src/Config/PathResolver.cs @@ -35,7 +35,7 @@ public void RegisterPath(string name, string path) if (string.IsNullOrWhiteSpace(path)) throw new ArgumentNullException(nameof(path)); Paths[name] = path; } - + public string ResolvePathAbsolute(string relative) { var path = ResolvePath(relative); diff --git a/src/Game/PaletteManager.cs b/src/Game/PaletteManager.cs index ddea540dc..13c56b0d0 100644 --- a/src/Game/PaletteManager.cs +++ b/src/Game/PaletteManager.cs @@ -26,7 +26,8 @@ public float Blend if (state == null || Night == null) return 0; - return MathF.Cos((float)state.Time.TimeOfDay.TotalDays * MathF.PI * 2 * 60) * 0.5f + 0.5f; + var daysElapsed = (float)state.Time.TimeOfDay.TotalDays; // how far through the day we are (0..1) + return MathF.Cos(daysElapsed * MathF.PI * 2) * 0.5f + 0.5f; } } @@ -71,4 +72,4 @@ void SetPalette(PaletteId paletteId) $"Night palette {Night.Id} had entries [ {string.Join(", ", Night.AnimatedEntries)} ]"); } } -} \ No newline at end of file +} diff --git a/src/UAlbion/CommandLineOptions.cs b/src/UAlbion/CommandLineOptions.cs index 4e10495b4..07ba2bf06 100644 --- a/src/UAlbion/CommandLineOptions.cs +++ b/src/UAlbion/CommandLineOptions.cs @@ -43,7 +43,7 @@ public CommandLineOptions(string[] args) if (arg is "--ISO" or "-ISO") Mode = ExecutionMode.BakeIsometric; if (arg is "--CONVERT" or "--BUILD" or "-B") { - if (i +2 >= args.Length) + if (i + 2 >= args.Length) throw new FormatException("\"--convert\" requires two parameters: the mod to convert from and the mod to convert to"); ConvertFrom = args[++i].Split(' ', StringSplitOptions.RemoveEmptyEntries); ConvertTo = args[++i];