From 133889856d1d665632ed0339ce75dbde01bcafdc Mon Sep 17 00:00:00 2001 From: Moon <5924350+MatrikMoon@users.noreply.github.com> Date: Thu, 27 Jun 2024 19:20:31 -0500 Subject: [PATCH] Added bad cuts to songfinished --- .../UI/FlowCoordinators/RoomCoordinator.cs | 2 + .../PublishProfiles/Docker.pubxml.user | 3 +- TournamentAssistantProtos | 2 +- TournamentAssistantShared/Constants.cs | 7 +- .../UI/UserControls/GameOverDialogTeams.xaml | 4 + .../UserControls/GameOverDialogTeams.xaml.cs | 9 +++ vagueNotes.txt | 75 +++++++++++++++++++ 7 files changed, 97 insertions(+), 5 deletions(-) create mode 100644 vagueNotes.txt diff --git a/TournamentAssistant/UI/FlowCoordinators/RoomCoordinator.cs b/TournamentAssistant/UI/FlowCoordinators/RoomCoordinator.cs index 488d5dbb..6e563091 100644 --- a/TournamentAssistant/UI/FlowCoordinators/RoomCoordinator.cs +++ b/TournamentAssistant/UI/FlowCoordinators/RoomCoordinator.cs @@ -590,6 +590,8 @@ public void SongFinished(StandardLevelScenesTransitionSetupDataSO standardLevelS }, Score = results.modifiedScore, Misses = results.missedCount, + BadCuts = results.badCutsCount, + GoodCuts = results.goodCutsCount, EndTime = results.endSongTime }; diff --git a/TournamentAssistantCore/Properties/PublishProfiles/Docker.pubxml.user b/TournamentAssistantCore/Properties/PublishProfiles/Docker.pubxml.user index 293b2f36..e53a0329 100644 --- a/TournamentAssistantCore/Properties/PublishProfiles/Docker.pubxml.user +++ b/TournamentAssistantCore/Properties/PublishProfiles/Docker.pubxml.user @@ -5,6 +5,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAAgLk4hF8hxkiQ4cN43iSg7QAAAAACAAAAAAAQZgAAAAEAACAAAAC8Sc4fYUa+pPv8FqV9y4fAc+xCbmMWjHaWkNO2FxOrAAAAAAAOgAAAAAIAACAAAACLSwjFK4hPrz9yiKpBuF376VK8+p17OSWwOPXgmYTbaCAAAACrSl4IwcYt26VqOU9wOo+potPvZIb/NK6FmcDuKu2STkAAAABxh2+7mXLQT4WAOBdSLjvZkMrGLayMc/i4jtsXEoq9/6H3/x8fezQotV1AMNo1kEQygdlJZK6VEWzGySVJWPqy - True|2022-05-31T05:04:46.8734125Z;True|2022-05-24T18:10:10.9432816-05:00;True|2022-05-20T00:48:31.1875219-05:00;False|2022-05-20T00:36:09.3699887-05:00;True|2022-05-19T23:32:40.4898188-05:00;False|2022-05-19T23:29:05.2480570-05:00;True|2022-05-10T00:05:07.5292150-05:00;False|2022-05-10T00:02:10.1918955-05:00;True|2022-04-30T16:38:37.1271080-05:00;True|2022-04-30T16:29:18.9429794-05:00;False|2022-04-30T15:33:44.6878088-05:00;False|2022-04-30T15:30:26.1186139-05:00;False|2022-04-30T15:26:53.4525242-05:00;False|2022-04-30T15:25:34.9467241-05:00;False|2022-04-30T14:55:17.3885287-05:00;False|2022-04-30T14:39:42.4783680-05:00;False|2022-04-30T14:35:58.9702981-05:00;False|2022-04-30T14:23:28.3338839-05:00;False|2022-04-30T14:20:47.8025347-05:00;False|2022-04-30T14:10:49.7546588-05:00;False|2022-04-30T14:06:39.9156950-05:00;False|2022-04-30T13:59:27.1702334-05:00;False|2022-04-30T13:57:34.2037863-05:00;False|2022-04-30T13:45:03.5555315-05:00;False|2022-04-30T13:42:58.7480471-05:00;False|2022-04-30T13:42:33.4223134-05:00;False|2022-04-30T13:33:49.9959663-05:00;False|2022-04-30T01:11:15.8646243-05:00;False|2022-04-30T01:08:38.2080358-05:00;False|2022-04-30T01:05:43.1047108-05:00;False|2022-04-30T01:00:34.5274425-05:00;False|2022-04-30T00:53:49.0872590-05:00;False|2022-04-30T00:51:25.5073205-05:00;False|2022-04-30T00:50:48.7949266-05:00;False|2022-04-30T00:47:08.2989707-05:00;False|2022-04-30T00:46:50.6142024-05:00;False|2022-04-30T00:46:35.5329678-05:00;False|2022-04-30T00:45:28.0401932-05:00;False|2022-04-30T00:36:12.5530251-05:00;False|2022-04-30T00:30:44.8961474-05:00;False|2022-04-30T00:27:55.9635992-05:00;False|2022-04-30T00:26:30.2101687-05:00;False|2022-04-30T00:22:58.6204642-05:00;True|2021-08-13T20:40:00.8260412-05:00;False|2021-08-13T20:38:44.3992083-05:00;False|2021-08-13T20:36:58.0439107-05:00;False|2021-08-13T20:33:10.5051184-05:00;False|2021-08-13T20:27:53.2235208-05:00;False|2021-08-13T20:27:16.7369936-05:00;False|2021-08-13T20:26:25.6866293-05:00;False|2021-08-13T20:24:31.5457991-05:00;False|2021-08-13T20:24:13.4994144-05:00; + True|2024-06-28T00:18:33.5337402Z;True|2022-05-31T00:04:46.8734125-05:00;True|2022-05-24T18:10:10.9432816-05:00;True|2022-05-20T00:48:31.1875219-05:00;False|2022-05-20T00:36:09.3699887-05:00;True|2022-05-19T23:32:40.4898188-05:00;False|2022-05-19T23:29:05.2480570-05:00;True|2022-05-10T00:05:07.5292150-05:00;False|2022-05-10T00:02:10.1918955-05:00;True|2022-04-30T16:38:37.1271080-05:00;True|2022-04-30T16:29:18.9429794-05:00;False|2022-04-30T15:33:44.6878088-05:00;False|2022-04-30T15:30:26.1186139-05:00;False|2022-04-30T15:26:53.4525242-05:00;False|2022-04-30T15:25:34.9467241-05:00;False|2022-04-30T14:55:17.3885287-05:00;False|2022-04-30T14:39:42.4783680-05:00;False|2022-04-30T14:35:58.9702981-05:00;False|2022-04-30T14:23:28.3338839-05:00;False|2022-04-30T14:20:47.8025347-05:00;False|2022-04-30T14:10:49.7546588-05:00;False|2022-04-30T14:06:39.9156950-05:00;False|2022-04-30T13:59:27.1702334-05:00;False|2022-04-30T13:57:34.2037863-05:00;False|2022-04-30T13:45:03.5555315-05:00;False|2022-04-30T13:42:58.7480471-05:00;False|2022-04-30T13:42:33.4223134-05:00;False|2022-04-30T13:33:49.9959663-05:00;False|2022-04-30T01:11:15.8646243-05:00;False|2022-04-30T01:08:38.2080358-05:00;False|2022-04-30T01:05:43.1047108-05:00;False|2022-04-30T01:00:34.5274425-05:00;False|2022-04-30T00:53:49.0872590-05:00;False|2022-04-30T00:51:25.5073205-05:00;False|2022-04-30T00:50:48.7949266-05:00;False|2022-04-30T00:47:08.2989707-05:00;False|2022-04-30T00:46:50.6142024-05:00;False|2022-04-30T00:46:35.5329678-05:00;False|2022-04-30T00:45:28.0401932-05:00;False|2022-04-30T00:36:12.5530251-05:00;False|2022-04-30T00:30:44.8961474-05:00;False|2022-04-30T00:27:55.9635992-05:00;False|2022-04-30T00:26:30.2101687-05:00;False|2022-04-30T00:22:58.6204642-05:00;True|2021-08-13T20:40:00.8260412-05:00;False|2021-08-13T20:38:44.3992083-05:00;False|2021-08-13T20:36:58.0439107-05:00;False|2021-08-13T20:33:10.5051184-05:00;False|2021-08-13T20:27:53.2235208-05:00;False|2021-08-13T20:27:16.7369936-05:00;False|2021-08-13T20:26:25.6866293-05:00;False|2021-08-13T20:24:31.5457991-05:00;False|2021-08-13T20:24:13.4994144-05:00; + \ No newline at end of file diff --git a/TournamentAssistantProtos b/TournamentAssistantProtos index ca742a4b..a99348ff 160000 --- a/TournamentAssistantProtos +++ b/TournamentAssistantProtos @@ -1 +1 @@ -Subproject commit ca742a4bc946046db36828f89dc0e01dfafd6a16 +Subproject commit a99348ff6309de6f7a35dd623928d6e2fc463e05 diff --git a/TournamentAssistantShared/Constants.cs b/TournamentAssistantShared/Constants.cs index b4fe94b4..a25a6590 100644 --- a/TournamentAssistantShared/Constants.cs +++ b/TournamentAssistantShared/Constants.cs @@ -8,8 +8,8 @@ namespace TournamentAssistantShared public static class Constants { public const string NAME = "TournamentAssistant"; - public const string VERSION = "0.7.8"; - public const int VERSION_CODE = 078; + public const string VERSION = "0.7.9"; + public const int VERSION_CODE = 079; public const string MASTER_SERVER = "tournamentassistant.net"; public const string Changelog = "0.0.1: Begin assembling UI for coordinator panels\n" + @@ -65,7 +65,8 @@ public static class Constants "0.7.3: Update for 1.29.1\n" + "0.7.4: Score update fix\n" + "0.7.5: Add ability for players to select Pro Mode\n" + - "0.7.8: Added song end time to results"; + "0.7.8: Added song end time to results\n" + + "0.7.9: Added bad cuts to results"; public enum BeatmapDifficulty { diff --git a/TournamentAssistantUI/UI/UserControls/GameOverDialogTeams.xaml b/TournamentAssistantUI/UI/UserControls/GameOverDialogTeams.xaml index 457a2469..e6e3c3c4 100644 --- a/TournamentAssistantUI/UI/UserControls/GameOverDialogTeams.xaml +++ b/TournamentAssistantUI/UI/UserControls/GameOverDialogTeams.xaml @@ -35,6 +35,10 @@ + + + + diff --git a/TournamentAssistantUI/UI/UserControls/GameOverDialogTeams.xaml.cs b/TournamentAssistantUI/UI/UserControls/GameOverDialogTeams.xaml.cs index a9c7e804..ef8f7443 100644 --- a/TournamentAssistantUI/UI/UserControls/GameOverDialogTeams.xaml.cs +++ b/TournamentAssistantUI/UI/UserControls/GameOverDialogTeams.xaml.cs @@ -17,6 +17,10 @@ public class TeamResult public Team Team { get; set; } public List<(User, int)> Players { get; set; } public int TotalScore { get; set; } = 0; + public int TotalMisses { get;set; } = 0; + public int TotalBadCuts { get; set; } = 0; + public int TotalGoodCuts { get; set; } = 0; + public int TotalNonGoodCuts { get; set; } = 0; public string IndividualScores { get @@ -52,6 +56,11 @@ public GameOverDialogTeams(List results) teamResult.Players.Add((x.Player, x.Score)); teamResult.TotalScore += x.Score; + teamResult.TotalMisses += x.Misses; + teamResult.TotalBadCuts += x.BadCuts; + teamResult.TotalGoodCuts += x.GoodCuts; + teamResult.TotalNonGoodCuts += x.BadCuts + x.Misses; + teamResult.TotalScore += x.Score; }); TeamResults = TeamResults.OrderByDescending(x => x.TotalScore).ToList(); diff --git a/vagueNotes.txt b/vagueNotes.txt new file mode 100644 index 00000000..f3850472 --- /dev/null +++ b/vagueNotes.txt @@ -0,0 +1,75 @@ +Vague notes: + +Better heartbeat stuff + - Looks like we don't have good handling for when the dns doesn't resolve to the correct ip + +We can leverage the auth plugin's stack trace verification / calling assembly signature verification +to more confidently assign userId and username as well as discord info for Players + +We should take extra care that final scores are signed w/stack trace + +Make the default T actually default and not just filler + +Might need to merge the Splash screens (If this was on the TAUI side, it's done) + +AuthorizationRequestedFromServer... Should that be a Request? later moon: I don't think so? + +I've disabled modals for now, until they can be revisited + +Fix antifail autorestart bug + +Add toggles for showing quals / tournaments + +Add popup on end qual for downloading scores + +WEIGHTING: Get score percentage, take player #1's score, divide percentage by 100, multiply rest of scores by result + + +TIPS, NOT TODO: + +Allow Transparency in OBS keeps qr codes (or color bars) from appearing + +AuthorizedUsers are not in state, so they don't update automatically + +Keep an eye on image size, and how that affects Join Response time + +Do not- DO NOT use await after getting a database object and before changing and saving it. In console apps, await +might resume on a different thread + +!!! - CURRENT POTENTIAL CRASH - !!! + IE: even if UpdateMatch() properly wraps match locking, + what's wrapping match.AssociatedUsers? There's probably more like it out there + + + + +Notes on generating new .pfx when necessary: + +FRONTEND: +1. Set up port forwarding and all that for 80,443 +2. `certbot certonly --standalone --key-type rsa` +3. `openssl pkcs12 -export -out certificate.pfx -inkey privateKey.pem -in certificate.pem` + +PLAYER: + +How to check certificate expiration date: + +1. `certutil -dump certificate.pfx` +OR +1. `openssl pkcs12 -in yourfile.pfx -passin pass:exportpassword -nokeys | openssl x509 -noout -dates` + +Notes on how to publish TAAuth: + +1. Build with ILRepack, without EAZFuscator +2. Find EAZFuscator executable in nuget package + (C:\Users\Moon\.nuget\packages\gapotchenko.eazfuscator.net\2023.1.427\tools) +3. Use command-line tool to obfuscate the dll + If it's expired, EAZFuscator stores its license info in HKCU\Identities\{0FE6CF32-23D2-4166-B147-20D4E86A8523}, so delete it + If there's a Microsoft.Net.SDK error, install .NET Build tools in any VS installations where it's missing +4. Use the trial remover on the resulting dll + + + +Testing notes: +4. Results didn't appear once +5. Token expiry during match causes havoc \ No newline at end of file