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 @@ private void load(OsuColour colours)
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 @@ public enum KudosuAction
VoteReset,
DenyKudosuReset,
Revoke,
AllowKudosuGive,
DeleteReset,
RestoreGive,
RecalculateGive,
RecalculateReset
}
}

View File

@ -91,6 +91,41 @@ private void load()
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;
}
}