mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2026-06-18 02:09:15 +00:00
Discord Rich Presence: Miitopia (#129)
Hello and welcome to my PR that adds discord rich presence stuff from play reports generated by Miitopia. The following items are tracked and displayed: Main menu (for booting game) MII Selector (from main menu) Region (Game stage based) Gold (Only updates at start of game play due to lack of play reports generated after loading into world) As a bonus, I will be exporting the title icon for discord rich presence images and providing the title ID so it can be added to rich presence images. (See bottom of my message) Examples of current rich presence messages: At Greenhorne (Starting area)  After defeating final boss  Rich presence image and titleID: titleID: 01003da010e8a000  Co-authored-by: Awesomeangotti <143439211+Awesomeangotti@users.noreply.github.com> Reviewed-on: https://git.ryujinx.app/projects/Ryubing/pulls/129
This commit is contained in:
@@ -147,6 +147,7 @@ namespace Ryujinx.Common
|
||||
"0100c1f0051b6000", // Donkey Kong Country: Tropical Freeze
|
||||
"0100ed000d390000", // Dr. Kawashima's Brain Training
|
||||
"010067b017588000", // Endless Ocean Luminous
|
||||
"01003da010e8a000", // Miitopia
|
||||
"01006b5012b32000", // Part Time UFO
|
||||
"0100704000B3A000", // Snipperclips
|
||||
"01006a800016e000", // Super Smash Bros. Ultimate
|
||||
|
||||
@@ -1088,5 +1088,33 @@ namespace Ryujinx.Ava.Systems.PlayReport
|
||||
|
||||
return $"Living on {messagePackObjectDictionary["LandName"].AsString()} Island";
|
||||
}
|
||||
|
||||
private static FormattedValue MiitopiaRPC(SparseMultiValue values)
|
||||
{
|
||||
if (values.Matched.TryGetValue("gold", out Value gold) && values.Matched.TryGetValue("stage", out Value location))
|
||||
{
|
||||
return $"{LocFinal(location.ToString())} with {gold} gold";
|
||||
}
|
||||
|
||||
if (values.Matched.TryGetValue("secret", out Value secret)) // Yes "secret" is unused, but it only appears in the MII selector.
|
||||
{
|
||||
return $"In the MII selector";
|
||||
}
|
||||
|
||||
return $"At the main menu";
|
||||
|
||||
static string LocFinal(string? location) => location switch
|
||||
{
|
||||
"0" => "Somewhere in Miitopia",
|
||||
"1" => "Wandering around Greenhorne",
|
||||
"2" => "Trodding through Neksdor",
|
||||
"3" => "Exploring The Realm of the Fey",
|
||||
"4" => "Burning their feet at Karkaton",
|
||||
"5" => "Soaring in the skies of Miitopia",
|
||||
"6" => "Fighting up The Sky Scraper",
|
||||
"7" => "Traveling Miitopia",
|
||||
_ => "Wandering"
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -132,6 +132,12 @@ namespace Ryujinx.Ava.Systems.PlayReport
|
||||
.WithDescription("based on your island name.")
|
||||
.AddValueFormatter("AppCmn", AnimalCrossingNewHorizons_AppCommon)
|
||||
)
|
||||
.AddSpec(
|
||||
"01003da010e8a000", // Miitopia 01003da010e8a000
|
||||
spec => spec
|
||||
.WithDescription("based on gold count, report info only in the mii selector, and gamestage (progression)")
|
||||
.AddSparseMultiValueFormatter(["gold", "secret", "stage"], MiitopiaRPC)
|
||||
)
|
||||
);
|
||||
|
||||
private static string Playing(string game) => $"Playing {game}";
|
||||
|
||||
Reference in New Issue
Block a user