mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-08-05 19:38:39 +00:00
Fix serialization of plays in slots
This commit is contained in:
parent
81622441be
commit
3bedec5f70
2 changed files with 22 additions and 8 deletions
|
@ -142,4 +142,5 @@
|
||||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Unheart/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=Unheart/@EntryIndexedValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Unpublish/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=Unpublish/@EntryIndexedValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Unpushed/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=Unpushed/@EntryIndexedValue">True</s:Boolean>
|
||||||
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=yourlbp/@EntryIndexedValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=yourthumb/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=yourthumb/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
|
|
@ -306,21 +306,34 @@ public class Slot
|
||||||
LbpSerializer.StringElement("commentsEnabled", ServerSettings.Instance.LevelCommentsEnabled) +
|
LbpSerializer.StringElement("commentsEnabled", ServerSettings.Instance.LevelCommentsEnabled) +
|
||||||
LbpSerializer.StringElement("reviewCount", this.ReviewCount);
|
LbpSerializer.StringElement("reviewCount", this.ReviewCount);
|
||||||
|
|
||||||
|
int yourPlays;
|
||||||
|
int plays;
|
||||||
|
int playsComplete;
|
||||||
|
int playsUnique;
|
||||||
|
|
||||||
if (gameVersion == GameVersion.LittleBigPlanetVita)
|
if (gameVersion == GameVersion.LittleBigPlanetVita)
|
||||||
{
|
{
|
||||||
slotData += LbpSerializer.StringElement("yourlbp2PlayCount", yourVisitedStats?.PlaysLBPVita) +
|
yourPlays = yourVisitedStats?.PlaysLBPVita ?? 0;
|
||||||
LbpSerializer.StringElement("lbp2PlayCount", this.PlaysLBPVita) +
|
plays = this.PlaysLBPVita;
|
||||||
LbpSerializer.StringElement("lbp2CompletionCount", this.PlaysLBPVitaComplete) +
|
playsComplete = this.PlaysLBPVitaComplete;
|
||||||
LbpSerializer.StringElement("lbp2UniquePlayCount", this.PlaysLBPVitaUnique);
|
playsUnique = this.PlaysLBPVitaUnique;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
slotData += LbpSerializer.StringElement("yourlbp2PlayCount", yourVisitedStats?.PlaysLBP2) +
|
yourPlays = yourVisitedStats?.PlaysLBP2 ?? 0;
|
||||||
LbpSerializer.StringElement("lbp2PlayCount", this.PlaysLBP2) +
|
plays = this.PlaysLBP2;
|
||||||
LbpSerializer.StringElement("lbp2CompletionCount", this.PlaysLBP2Complete) +
|
playsComplete = this.PlaysLBP2Complete;
|
||||||
LbpSerializer.StringElement("lbp2UniquePlayCount", this.PlaysLBP2Unique); // not actually used ingame, as per above comment
|
playsUnique = this.PlaysLBP2Unique;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
slotData += LbpSerializer.StringElement("yourlbp2PlayCount", yourPlays) +
|
||||||
|
LbpSerializer.StringElement("lbp2PlayCount", plays) +
|
||||||
|
LbpSerializer.StringElement("playCount", plays) +
|
||||||
|
LbpSerializer.StringElement("lbp2CompletionCount", playsComplete) +
|
||||||
|
LbpSerializer.StringElement("completionCount", playsComplete) +
|
||||||
|
LbpSerializer.StringElement("lbp2UniquePlayCount", playsUnique) + // not actually used ingame, as per above comment
|
||||||
|
LbpSerializer.StringElement("uniquePlayCount", playsUnique);
|
||||||
|
|
||||||
return LbpSerializer.TaggedStringElement("slot", slotData, "type", "user");
|
return LbpSerializer.TaggedStringElement("slot", slotData, "type", "user");
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue