-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
964f06a
commit 9c65258
Showing
136 changed files
with
6,108 additions
and
671 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
using System; | ||
|
||
namespace AATool.Data.Speedrunning | ||
{ | ||
internal class AllVersionsRun : Run | ||
{ | ||
public string Range { get; set; } | ||
public bool Hardcore { get; set; } | ||
public bool NoF3 { get; set; } | ||
|
||
public static new bool TryParse(LeaderboardSheet sheet, int rowIndex, string gameVersion, out Run pb) | ||
{ | ||
pb = null; | ||
try | ||
{ | ||
string[] row = sheet.Rows[rowIndex]; | ||
//required columns | ||
if (!sheet.TryGetRunner(rowIndex, out string runner)) | ||
return false; | ||
|
||
//optional columns | ||
sheet.TryGetRta(rowIndex, out TimeSpan rta); | ||
sheet.TryGetDate(rowIndex, out DateTime date); | ||
sheet.TryGetRank(rowIndex, out int rank); | ||
|
||
sheet.TryGetRange(rowIndex, out string range); | ||
sheet.TryGetIsNoF3(rowIndex, out bool noF3); | ||
sheet.TryGetIsHardcore(rowIndex, out bool hardcore); | ||
|
||
if (!sheet.TryGetLink(rowIndex, out string link)) | ||
Leaderboard.AALinks.TryGetValue((runner, date), out link); | ||
|
||
_= Version.TryParse(gameVersion, out Version version); | ||
|
||
pb = new AllVersionsRun() { | ||
GameVersion = version, | ||
RealTime = rta, | ||
Date = date, | ||
Runner = runner, | ||
Link = link, | ||
Range = range, | ||
NoF3 = noF3, | ||
Hardcore = hardcore, | ||
}; | ||
return true; | ||
} | ||
catch | ||
{ | ||
return false; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
using System; | ||
|
||
namespace AATool.Data.Speedrunning | ||
{ | ||
internal class HardcoreStreak : Run | ||
{ | ||
public string Runs { get; set; } | ||
public string Deaths { get; set; } | ||
public int BestStreak { get; set; } | ||
public bool OnBestStreak { get; set; } | ||
|
||
public static bool TryParse(LeaderboardSheet sheet, int rowIndex, string gameVersion, out HardcoreStreak pb) | ||
{ | ||
pb = null; | ||
try | ||
{ | ||
string[] row = sheet.Rows[rowIndex]; | ||
//required columns | ||
if (!sheet.TryGetRunner(rowIndex, out string runner)) | ||
return false; | ||
|
||
//optional columns | ||
sheet.TryGetIgt(rowIndex, out TimeSpan igt); | ||
sheet.TryGetDate(rowIndex, out DateTime date); | ||
sheet.TryGetRank(rowIndex, out int rank); | ||
sheet.TryGetRuns(rowIndex, out string runs); | ||
sheet.TryGetDeaths(rowIndex, out string deaths); | ||
sheet.TryGetStreak(rowIndex, out int streak); | ||
sheet.TryGetOnBestStreak(rowIndex, out bool onBestStreak); | ||
|
||
if (!sheet.TryGetLink(rowIndex, out string link)) | ||
Leaderboard.AALinks.TryGetValue((runner, date), out link); | ||
|
||
_= Version.TryParse(gameVersion, out Version version); | ||
|
||
pb = new HardcoreStreak() { | ||
GameVersion = version, | ||
InGameTime = igt, | ||
Date = date, | ||
Runner = runner, | ||
Link = link, | ||
Runs = runs, | ||
Deaths = deaths, | ||
BestStreak = streak, | ||
OnBestStreak = onBestStreak, | ||
}; | ||
return true; | ||
} | ||
catch | ||
{ | ||
return false; | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.