Finished implementing xp shop. It allows users to buy frames and backgrounds if the user enables the feature in data/xp.yml. It can also be available only to patrons

This commit is contained in:
Kwoth
2022-07-25 18:10:00 +02:00
parent 967784c860
commit 6a042c3faa
21 changed files with 10983 additions and 74 deletions

View File

@@ -31,6 +31,7 @@ public interface IImageCache
Task<byte[]?> GetSlotBgAsync();
Task<byte[]?> GetRipBgAsync();
Task<byte[]?> GetRipOverlayAsync();
Task<byte[]?> GetImageDataAsync(Uri url);
}
public sealed class ImageCache : IImageCache, INService
@@ -54,7 +55,7 @@ public sealed class ImageCache : IImageCache, INService
private static TypedKey<byte[]> GetImageKey(Uri url)
=> new($"image:{url}");
private async Task<byte[]?> GetImageDataAsync(Uri url)
public async Task<byte[]?> GetImageDataAsync(Uri url)
=> await _cache.GetOrAddAsync(
GetImageKey(url),
async () =>