Revert "Revert "Replace ResourcePath with ResPath (#15308)" (#155… (#15566)

This commit is contained in:
metalgearsloth
2023-04-20 20:16:01 +10:00
committed by GitHub
parent 0c38a6db8d
commit ae01618874
125 changed files with 279 additions and 276 deletions

View File

@@ -23,7 +23,7 @@ public sealed class GeneratedParallaxTextureSource : IParallaxTextureSource
/// In client resources.
/// </summary>
[DataField("configPath")]
public ResourcePath ParallaxConfigPath { get; } = new("/parallax_config.toml");
public ResPath ParallaxConfigPath { get; } = new("/parallax_config.toml");
/// <summary>
/// ID for debugging, caching, and so forth.
@@ -37,13 +37,13 @@ public sealed class GeneratedParallaxTextureSource : IParallaxTextureSource
/// Cached path.
/// In user directory.
/// </summary>
private ResourcePath ParallaxCachedImagePath => new($"/parallax_{Identifier}cache.png");
private ResPath ParallaxCachedImagePath => new($"/parallax_{Identifier}cache.png");
/// <summary>
/// Old parallax config path (for checking for parallax updates).
/// In user directory.
/// </summary>
private ResourcePath PreviousParallaxConfigPath => new($"/parallax_{Identifier}config_old");
private ResPath PreviousParallaxConfigPath => new($"/parallax_{Identifier}config_old");
async Task<Texture> IParallaxTextureSource.GenerateTexture(CancellationToken cancel)
{
@@ -113,7 +113,7 @@ public sealed class GeneratedParallaxTextureSource : IParallaxTextureSource
for (var i = 0; i < debugImages!.Count; i++)
{
var debugImage = debugImages[i];
using var debugImageStream = StaticIoC.ResC.UserData.OpenWrite(new ResourcePath($"/parallax_{Identifier}debug_{i}.png"));
using var debugImageStream = StaticIoC.ResC.UserData.OpenWrite(new ResPath($"/parallax_{Identifier}debug_{i}.png"));
debugImage.SaveAsPng(debugImageStream);
}
}