mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-19 11:41:30 +00:00
Make user serialize fully
This commit is contained in:
parent
ceac914475
commit
61a30c260b
2 changed files with 31 additions and 3 deletions
|
@ -1,2 +1,3 @@
|
||||||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=ezoiar/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=ezoiar/@EntryIndexedValue">True</s:Boolean>
|
||||||
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=lolcatftw/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
|
|
@ -18,6 +18,9 @@ namespace ProjectLighthouse {
|
||||||
public int PhotosWithMeCount { get; set; }
|
public int PhotosWithMeCount { get; set; }
|
||||||
public bool CommentsEnabled { get; set; }
|
public bool CommentsEnabled { get; set; }
|
||||||
public Location Location { get; set; }
|
public Location Location { get; set; }
|
||||||
|
public int FavouriteSlotCount { get; set; }
|
||||||
|
public int FavouriteUserCount { get; set; }
|
||||||
|
public int lolcatftwCount { get; set; }
|
||||||
public string Pins { get; set; }
|
public string Pins { get; set; }
|
||||||
public int StaffChallengeGoldCount { get; set; }
|
public int StaffChallengeGoldCount { get; set; }
|
||||||
public int StaffChallengeSilverCount { get; set; }
|
public int StaffChallengeSilverCount { get; set; }
|
||||||
|
@ -40,8 +43,11 @@ namespace ProjectLighthouse {
|
||||||
private string SerializeSlots() {
|
private string SerializeSlots() {
|
||||||
string slots = string.Empty;
|
string slots = string.Empty;
|
||||||
|
|
||||||
foreach(string slotType in slotTypes) {
|
foreach(string s in slotTypes) {
|
||||||
|
string slotType = s; // vars in foreach are immutable, define helper var
|
||||||
|
|
||||||
slots += LbpSerializer.GetStringElement(slotType + "UsedSlots", UsedSlots);
|
slots += LbpSerializer.GetStringElement(slotType + "UsedSlots", UsedSlots);
|
||||||
|
if(slotType == "lbp1") slotType = "";
|
||||||
slots += LbpSerializer.GetStringElement(slotType + "EntitledSlots", EntitledSlots);
|
slots += LbpSerializer.GetStringElement(slotType + "EntitledSlots", EntitledSlots);
|
||||||
// ReSharper disable once StringLiteralTypo
|
// ReSharper disable once StringLiteralTypo
|
||||||
slots += LbpSerializer.GetStringElement(slotType + slotType == "crossControl" ? "PurchsedSlots" : "PurchasedSlots", 0);
|
slots += LbpSerializer.GetStringElement(slotType + slotType == "crossControl" ? "PurchsedSlots" : "PurchasedSlots", 0);
|
||||||
|
@ -55,8 +61,29 @@ namespace ProjectLighthouse {
|
||||||
|
|
||||||
public string Serialize() {
|
public string Serialize() {
|
||||||
string user = LbpSerializer.GetTaggedStringElement("npHandle", Username, "icon", IconHash) +
|
string user = LbpSerializer.GetTaggedStringElement("npHandle", Username, "icon", IconHash) +
|
||||||
|
LbpSerializer.GetStringElement("game", Game) +
|
||||||
this.SerializeSlots() +
|
this.SerializeSlots() +
|
||||||
LbpSerializer.GetStringElement("game", Game);
|
LbpSerializer.GetStringElement("lists", Lists) +
|
||||||
|
LbpSerializer.GetStringElement("lists_quota", ListsQuota) +
|
||||||
|
LbpSerializer.GetStringElement("heartCount", HeartCount) +
|
||||||
|
LbpSerializer.GetStringElement("yay2", YayHash) +
|
||||||
|
LbpSerializer.GetStringElement("boo2", BooHash) +
|
||||||
|
LbpSerializer.GetStringElement("biography", Biography) +
|
||||||
|
LbpSerializer.GetStringElement("reviewCount", ReviewCount) +
|
||||||
|
LbpSerializer.GetStringElement("commentCount", CommentCount) +
|
||||||
|
LbpSerializer.GetStringElement("photosByMeCount", PhotosByMeCount) +
|
||||||
|
LbpSerializer.GetStringElement("photosWithMeCount", PhotosWithMeCount) +
|
||||||
|
LbpSerializer.GetStringElement("commentsEnabled", CommentsEnabled) +
|
||||||
|
Location.Serialize() +
|
||||||
|
LbpSerializer.GetStringElement("favouriteSlotCount", FavouriteSlotCount) +
|
||||||
|
LbpSerializer.GetStringElement("favouriteUserCount", FavouriteUserCount) +
|
||||||
|
LbpSerializer.GetStringElement("lolcatftwCount", lolcatftwCount) +
|
||||||
|
LbpSerializer.GetStringElement("pins", Pins) +
|
||||||
|
LbpSerializer.GetStringElement("staffChallengeGoldCount", StaffChallengeGoldCount) +
|
||||||
|
LbpSerializer.GetStringElement("staffChallengeSilverCount", StaffChallengeSilverCount) +
|
||||||
|
LbpSerializer.GetStringElement("staffChallengeBronzeCount", StaffChallengeBronzeCount) +
|
||||||
|
LbpSerializer.GetStringElement("photos", "") +
|
||||||
|
this.ClientsConnected.Serialize();
|
||||||
|
|
||||||
return LbpSerializer.GetTaggedStringElement("user", user, "type", "user");
|
return LbpSerializer.GetTaggedStringElement("user", user, "type", "user");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue