Skip to content

Commit

Permalink
Allow direct import for skins and scores
Browse files Browse the repository at this point in the history
  • Loading branch information
Feodor0090 committed Jan 22, 2022
1 parent 8eaa5d3 commit 3d6f8aa
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions osu.Game.Rulesets.OvkTab/API/VkModelsExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,10 @@ public static IEnumerable<Drawable> ParseAttachments(this IEnumerable<Attachment
SimpleAttachment.AttachmentAction[] actions;
IconUsage icon;
string type;
// only beatmaps are supported for now.
if (x.Ext == "osz")
if (x.Ext == "osz" || x.Ext == "osr" || x.Ext == "osk")
{
icon = OsuIcon.Logo;
type = "osu! beatmap set";
type = x.Ext == "osz" ? "osu! beatmap set" : x.Ext == "osr" ? "osu! replay" : "osu! legacy skin";
actions = new[]
{
new SimpleAttachment.IconAttachmentAction(FontAwesome.Solid.Download, b =>
Expand Down Expand Up @@ -151,9 +150,9 @@ public static IEnumerable<Drawable> ParseAttachments(this IEnumerable<Attachment
}
}

foreach(var x in walls)
foreach (var x in walls)
{
result.Add(new DrawableVkWall(x, users?.Where(u=>u.id == x.OwnerId).FirstOrDefault()));
result.Add(new DrawableVkWall(x, users?.Where(u => u.id == x.OwnerId).FirstOrDefault()));
}
return result;
}
Expand Down

0 comments on commit 3d6f8aa

Please sign in to comment.