1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 12:33:01 +08:00

Expand KudosuAction list

This commit is contained in:
Andrei Zavatski 2019-08-22 16:50:54 +03:00
parent 67e0a2e35e
commit f4d2bb036b
3 changed files with 120 additions and 0 deletions

View File

@ -150,6 +150,86 @@ namespace osu.Game.Tests.Visual.Online
Username = @"Username6",
Url = @"https://osu.ppy.sh/u/1234"
}
},
new APIKudosuHistory
{
Amount = 11,
CreatedAt = new DateTimeOffset(new DateTime(2016, 6, 11)),
Action = KudosuAction.AllowKudosuGive,
Post = new APIKudosuHistory.ModdingPost
{
Title = @"Random post 7",
Url = @"https://osu.ppy.sh/b/1234",
},
Giver = new APIKudosuHistory.KudosuGiver
{
Username = @"Username7",
Url = @"https://osu.ppy.sh/u/1234"
}
},
new APIKudosuHistory
{
Amount = 24,
CreatedAt = new DateTimeOffset(new DateTime(2014, 6, 11)),
Action = KudosuAction.DeleteReset,
Post = new APIKudosuHistory.ModdingPost
{
Title = @"Random post 8",
Url = @"https://osu.ppy.sh/b/1234",
},
Giver = new APIKudosuHistory.KudosuGiver
{
Username = @"Username8",
Url = @"https://osu.ppy.sh/u/1234"
}
},
new APIKudosuHistory
{
Amount = 12,
CreatedAt = new DateTimeOffset(new DateTime(2016, 6, 11)),
Action = KudosuAction.RestoreGive,
Post = new APIKudosuHistory.ModdingPost
{
Title = @"Random post 9",
Url = @"https://osu.ppy.sh/b/1234",
},
Giver = new APIKudosuHistory.KudosuGiver
{
Username = @"Username9",
Url = @"https://osu.ppy.sh/u/1234"
}
},
new APIKudosuHistory
{
Amount = 2,
CreatedAt = new DateTimeOffset(new DateTime(2012, 6, 11)),
Action = KudosuAction.RecalculateGive,
Post = new APIKudosuHistory.ModdingPost
{
Title = @"Random post 10",
Url = @"https://osu.ppy.sh/b/1234",
},
Giver = new APIKudosuHistory.KudosuGiver
{
Username = @"Username10",
Url = @"https://osu.ppy.sh/u/1234"
}
},
new APIKudosuHistory
{
Amount = 32,
CreatedAt = new DateTimeOffset(new DateTime(2019, 8, 11)),
Action = KudosuAction.RecalculateReset,
Post = new APIKudosuHistory.ModdingPost
{
Title = @"Random post 11",
Url = @"https://osu.ppy.sh/b/1234",
},
Giver = new APIKudosuHistory.KudosuGiver
{
Username = @"Username11",
Url = @"https://osu.ppy.sh/u/1234"
}
}
};
}

View File

@ -27,5 +27,10 @@ namespace osu.Game.Online.API.Requests
VoteReset,
DenyKudosuReset,
Revoke,
AllowKudosuGive,
DeleteReset,
RestoreGive,
RecalculateGive,
RecalculateReset
}
}

View File

@ -91,6 +91,41 @@ namespace osu.Game.Overlays.Profile.Sections.Kudosu
addMainPart($@"Denied kudosu by {userLinkTemplate()} for the post ");
addPostPart();
break;
case KudosuAction.AllowKudosuGive:
linkFlowContainer.AddText(@"Received ");
addKudosuPart();
addMainPart(@" from kudosu deny repeal of modding post ");
addPostPart();
break;
case KudosuAction.DeleteReset:
linkFlowContainer.AddText(@"Lost ");
addKudosuPart();
addMainPart(@" from modding post deletion of ");
addPostPart();
break;
case KudosuAction.RestoreGive:
linkFlowContainer.AddText(@"Received ");
addKudosuPart();
addMainPart(@" from modding post restoration of ");
addPostPart();
break;
case KudosuAction.RecalculateGive:
linkFlowContainer.AddText(@"Received ");
addKudosuPart();
addMainPart(@" from votes recalculation in modding post of ");
addPostPart();
break;
case KudosuAction.RecalculateReset:
linkFlowContainer.AddText(@"Lost ");
addKudosuPart();
addMainPart(@" from votes recalculation in modding post of ");
addPostPart();
break;
}
}