From 9227cbe5a7768e9bd02b937df8fa52f3b78e06b9 Mon Sep 17 00:00:00 2001 From: Piplup <100526773+piplup55@users.noreply.github.com> Date: Tue, 25 Feb 2025 23:48:47 +0000 Subject: [PATCH] Dynamic RPC: Improve Pokemon Scarlet/Violet (#723) Updated Pokemon Scarlet and Violet to use multi parser it now displays if your in a team circle and area of the game ![image](https://github.com/user-attachments/assets/6d8d52c5-65a9-4ac3-af91-cb0c03576ad6) --- .../PlayReport/PlayReports.Formatters.cs | 18 +++++++++++------- .../Utilities/PlayReport/PlayReports.cs | 5 ++--- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/src/Ryujinx/Utilities/PlayReport/PlayReports.Formatters.cs b/src/Ryujinx/Utilities/PlayReport/PlayReports.Formatters.cs index a64379ab1..b5215c693 100644 --- a/src/Ryujinx/Utilities/PlayReport/PlayReports.Formatters.cs +++ b/src/Ryujinx/Utilities/PlayReport/PlayReports.Formatters.cs @@ -59,12 +59,13 @@ namespace Ryujinx.Ava.Utilities.PlayReport "Race" => "Racing", _ => FormattedValue.ForceReset }; - - private static FormattedValue PokemonSVUnionCircle(SingleValue value) - => value.Matched.BoxedValue is 0 ? "Playing Alone" : "Playing in a group"; - - private static FormattedValue PokemonSVArea(SingleValue value) - => value.Matched.StringValue switch + + private static FormattedValue PokemonSV(MultiValue values) + { + + string playStatus = values.Matched[0].BoxedValue is 0 ? "Playing Alone" : "Playing in a group"; + + FormattedValue locations = values.Matched[1].ToString() switch { // Base Game Locations "a_w01" => "South Area One", @@ -92,10 +93,13 @@ namespace Ryujinx.Ava.Utilities.PlayReport "a_w24" => "South Paldean Sea", "a_w25" => "West Paldean Sea", "a_w26" => "East Paldean Sea", - "a_w27" => "Nouth Paldean Sea", + "a_w27" => "North Paldean Sea", //TODO DLC Locations _ => FormattedValue.ForceReset }; + + return$"{playStatus} in {locations}"; + } private static FormattedValue SuperSmashBrosUltimate_Mode(SparseMultiValue values) { diff --git a/src/Ryujinx/Utilities/PlayReport/PlayReports.cs b/src/Ryujinx/Utilities/PlayReport/PlayReports.cs index 0de36a3ce..c46ae2be5 100644 --- a/src/Ryujinx/Utilities/PlayReport/PlayReports.cs +++ b/src/Ryujinx/Utilities/PlayReport/PlayReports.cs @@ -59,9 +59,8 @@ namespace Ryujinx.Ava.Utilities.PlayReport .AddSpec( ["0100a3d008c5c000", "01008f6008c5e000"], spec => spec - .WithDescription("based on what area of Paldea you're exploring.") - .AddValueFormatter("area_no", PokemonSVArea) - .AddValueFormatter("team_circle", PokemonSVUnionCircle) + .WithDescription("based on if you're playing alone or in a group and what area of Paldea you're exploring.") + .AddMultiValueFormatter(["team_circle", "area_no"], PokemonSV) ) .AddSpec( "01006a800016e000",