mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-29 08:28:39 +00:00
Include number of photos in slot serialization (#402)
* Include number of photos in slot serialization * Fix compilation error Co-authored-by: Jayden <jvyden@jvyden.xyz>
This commit is contained in:
parent
e5028c870d
commit
39c969f3a9
1 changed files with 12 additions and 0 deletions
|
@ -143,6 +143,16 @@ public class Slot
|
|||
[JsonIgnore]
|
||||
public int Comments => this.database.Comments.Count(c => c.Type == CommentType.Level && c.TargetId == this.SlotId);
|
||||
|
||||
[XmlIgnore]
|
||||
[NotMapped]
|
||||
[JsonIgnore]
|
||||
public int Photos => this.database.Photos.Count(p => p.SlotId == this.SlotId);
|
||||
|
||||
[XmlIgnore]
|
||||
[NotMapped]
|
||||
[JsonIgnore]
|
||||
public int PhotosWithAuthor => this.database.Photos.Count(p => p.SlotId == this.SlotId && p.CreatorId == this.CreatorId);
|
||||
|
||||
[XmlIgnore]
|
||||
[NotMapped]
|
||||
public int Plays => this.PlaysLBP1 + this.PlaysLBP2 + this.PlaysLBP3 + this.PlaysLBPVita;
|
||||
|
@ -303,6 +313,8 @@ public class Slot
|
|||
LbpSerializer.StringElement("mmpick", this.TeamPick) +
|
||||
LbpSerializer.StringElement("heartCount", this.Hearts) +
|
||||
LbpSerializer.StringElement("playCount", this.Plays) +
|
||||
LbpSerializer.StringElement("photoCount", this.Photos) +
|
||||
LbpSerializer.StringElement("authorPhotoCount", this.PhotosWithAuthor) +
|
||||
LbpSerializer.StringElement("commentCount", this.Comments) +
|
||||
LbpSerializer.StringElement("uniquePlayCount", this.PlaysLBP2Unique) + // ??? good naming scheme lol
|
||||
LbpSerializer.StringElement("completionCount", this.PlaysComplete) +
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue