From 372095937e13489129e9da7ad924d1f3e84a408f Mon Sep 17 00:00:00 2001 From: LumaLivy Date: Sun, 14 Nov 2021 21:35:20 -0500 Subject: [PATCH] Integrate yourXStats into serializer nicely --- ProjectLighthouse/Types/Levels/Slot.cs | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/ProjectLighthouse/Types/Levels/Slot.cs b/ProjectLighthouse/Types/Levels/Slot.cs index 6b2207ad..db10794d 100644 --- a/ProjectLighthouse/Types/Levels/Slot.cs +++ b/ProjectLighthouse/Types/Levels/Slot.cs @@ -199,13 +199,6 @@ namespace LBPUnion.ProjectLighthouse.Types.Levels public string Serialize(RatedLevel? yourRatingStats = null, VisitedLevel? yourVisitedStats = null) { - string yourRatingStatsSerialized = LbpSerializer.StringElement("yourRating", yourRatingStats?.RatingLBP1) + - LbpSerializer.StringElement("yourDPadRating", yourRatingStats?.Rating); - - - string yourVisitedStatsSerialized = LbpSerializer.StringElement("yourLBP1PlayCount", yourVisitedStats?.PlaysLBP1) + - LbpSerializer.StringElement("yourLBP2PlayCount", yourVisitedStats?.PlaysLBP2) + - LbpSerializer.StringElement("yourLBP3PlayCount", yourVisitedStats?.PlaysLBP3); string slotData = LbpSerializer.StringElement("name", this.Name) + LbpSerializer.StringElement("id", this.SlotId) + @@ -244,8 +237,11 @@ namespace LBPUnion.ProjectLighthouse.Types.Levels LbpSerializer.StringElement("thumbsdown", this.Thumbsdown) + LbpSerializer.StringElement("averageRating", this.RatingLBP1) + LbpSerializer.StringElement("leveltype", this.LevelType) + - yourRatingStatsSerialized + - yourVisitedStatsSerialized; + LbpSerializer.StringElement("yourRating", yourRatingStats?.RatingLBP1) + + LbpSerializer.StringElement("yourDPadRating", yourRatingStats?.Rating) + + LbpSerializer.StringElement("yourLBP1PlayCount", yourVisitedStats?.PlaysLBP1) + + LbpSerializer.StringElement("yourLBP2PlayCount", yourVisitedStats?.PlaysLBP2) + + LbpSerializer.StringElement("yourLBP3PlayCount", yourVisitedStats?.PlaysLBP3); return LbpSerializer.TaggedStringElement("slot", slotData, "type", "user"); }