mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2026-05-21 04:35:46 +00:00
Discord Rich Presence: Tomodachi Life LTD and Animal Crossing New Horizons (#103)
Adds Discord Rich Presence for Tomodachi Life: Living the Dream, Tomodachi Life: Living the Dream - Welcome Version, and Animal Crossing: New Horizons Tomodachi Life Rich Presence uses your total Mii count, and your island level  Animal Crossing New Horizons Rich Presence uses your island name  Reviewed-on: https://git.ryujinx.app/projects/Ryubing/pulls/103
This commit is contained in:
@@ -1070,6 +1070,23 @@ namespace Ryujinx.Ava.Systems.PlayReport
|
|||||||
_ => FormattedValue.ForceReset
|
_ => FormattedValue.ForceReset
|
||||||
};
|
};
|
||||||
|
|
||||||
|
private static FormattedValue TomodachiLifeLTD_Status(SingleValue value)
|
||||||
|
{
|
||||||
|
MessagePackObject messagePackObject = value.Matched.PackedValue;
|
||||||
|
MessagePackObjectDictionary messagePackObjectDictionary = messagePackObject.AsDictionary();
|
||||||
|
|
||||||
|
int miiCount = messagePackObjectDictionary["MiiNum"].AsInt32();
|
||||||
|
int fountainLevel = messagePackObjectDictionary["FountainLevel"].AsInt32();
|
||||||
|
|
||||||
|
return $"Looking after {"Mii".ToQuantity(miiCount)}, with an island level of {fountainLevel}";
|
||||||
|
}
|
||||||
|
|
||||||
|
private static FormattedValue AnimalCrossingNewHorizons_AppCommon(SingleValue value)
|
||||||
|
{
|
||||||
|
MessagePackObject messagePackObject = value.Matched.PackedValue;
|
||||||
|
MessagePackObjectDictionary messagePackObjectDictionary = messagePackObject.AsDictionary();
|
||||||
|
|
||||||
|
return $"Living on {messagePackObjectDictionary["LandName"].AsString()} Island";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -119,6 +119,19 @@ namespace Ryujinx.Ava.Systems.PlayReport
|
|||||||
"based on what game you first launch.\n\nNSO emulators do not print any Play Report information past the first game launch so it's all we got.")
|
"based on what game you first launch.\n\nNSO emulators do not print any Play Report information past the first game launch so it's all we got.")
|
||||||
.AddValueFormatter("launch_title_id", NsoEmulator_LaunchedGame)
|
.AddValueFormatter("launch_title_id", NsoEmulator_LaunchedGame)
|
||||||
)
|
)
|
||||||
|
.AddSpec(
|
||||||
|
[ "010051f0207b2000", "0100ca502552a000" ], // Tomodachi Life: Living the Dream + Demo
|
||||||
|
spec => spec
|
||||||
|
.WithDescription(
|
||||||
|
"based on your total Mii count and island level.")
|
||||||
|
.AddValueFormatter("Common", TomodachiLifeLTD_Status)
|
||||||
|
)
|
||||||
|
.AddSpec(
|
||||||
|
"01006f8002326000", // Animal Crossing New Horizons
|
||||||
|
spec => spec
|
||||||
|
.WithDescription("based on your island name.")
|
||||||
|
.AddValueFormatter("AppCmn", AnimalCrossingNewHorizons_AppCommon)
|
||||||
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
private static string Playing(string game) => $"Playing {game}";
|
private static string Playing(string game) => $"Playing {game}";
|
||||||
|
|||||||
Reference in New Issue
Block a user