mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2026-05-23 21:12:08 +00:00
More Consistent Updates For Tomodachi Life LTD RPC
Tomodachi Life doesn't seem to send the PlayReport containing `"Money"` nearly enough for it to be worth including it, it barely updates, and keeping it like this makes the island level not update.
This commit is contained in:
parent
bf9e46e7a8
commit
7f27aad88f
2 changed files with 10 additions and 8 deletions
|
|
@ -1070,13 +1070,15 @@ namespace Ryujinx.Ava.Systems.PlayReport
|
|||
_ => FormattedValue.ForceReset
|
||||
};
|
||||
|
||||
private static FormattedValue TomodachiLifeLTD_Status(MultiValue values)
|
||||
private static FormattedValue TomodachiLifeLTD_Status(SingleValue value)
|
||||
{
|
||||
int miiCount = values.Matched[0].IntValue;
|
||||
int fountainLevel = values.Matched[1].IntValue;
|
||||
int money = values.Matched[2].IntValue;
|
||||
|
||||
return $"Looking after {"Mii".ToQuantity(miiCount)}, Fountain Lvl. {fountainLevel}, {((float)money / 100):C2}";
|
||||
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}";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -123,8 +123,8 @@ namespace Ryujinx.Ava.Systems.PlayReport
|
|||
[ "010051f0207b2000", "0100ca502552a000" ], // Tomodachi Life: Living the Dream + Demo
|
||||
spec => spec
|
||||
.WithDescription(
|
||||
"based on your mii count, total money, and fountain level.")
|
||||
.AddMultiValueFormatter(["CountMii", "FountainLevel", "Money"], TomodachiLifeLTD_Status)
|
||||
"based on your total Mii count and island level.")
|
||||
.AddValueFormatter("Common", TomodachiLifeLTD_Status)
|
||||
)
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue