Replace ResourcePath with ResPath (#15308)

This commit is contained in:
Ygg01
2023-04-19 15:39:17 +02:00
committed by GitHub
parent 9513ea66e4
commit 71f358a027
124 changed files with 278 additions and 273 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);
}
}

View File

@@ -16,7 +16,7 @@ public sealed class ImageParallaxTextureSource : IParallaxTextureSource
/// Texture path.
/// </summary>
[DataField("path", required: true)]
public ResourcePath Path { get; } = default!;
public ResPath Path { get; } = default!;
Task<Texture> IParallaxTextureSource.GenerateTexture(CancellationToken cancel)
{