diff --git a/ProjectLighthouse/Serialization/LbpSerializer.cs b/ProjectLighthouse/Serialization/LbpSerializer.cs index c97ec520..9633ea1f 100644 --- a/ProjectLighthouse/Serialization/LbpSerializer.cs +++ b/ProjectLighthouse/Serialization/LbpSerializer.cs @@ -4,6 +4,10 @@ using System.Linq; using System.Reflection; namespace ProjectLighthouse.Serialization { + /// + /// LBP doesn't like the XML serializer by C# that much, and it cant be controlled that much (cant have two root elements), + /// so I wrote my own crappy one. + /// public static class LbpSerializer { public static string BlankElement(string key) => $"<{key}>"; diff --git a/ProjectLighthouse/Startup.cs b/ProjectLighthouse/Startup.cs index dd9fb902..9aabd7d0 100644 --- a/ProjectLighthouse/Startup.cs +++ b/ProjectLighthouse/Startup.cs @@ -35,8 +35,11 @@ namespace ProjectLighthouse { app.UseDeveloperExceptionPage(); } + // Logs every request and the response to it + // Example: "200: GET /LITTLEBIGPLANETPS3_XML/news" + // Example: "404: GET /asdasd" app.Use(async (context, next) => { - await next(); + await next(); // Handle the request so we can get the status code from it Console.WriteLine($"{context.Response.StatusCode}: {context.Request.Method} {context.Request.Path}"); }); diff --git a/ProjectLighthouse/Types/LevelTags.cs b/ProjectLighthouse/Types/LevelTags.cs index 4edb3865..501ffaa1 100644 --- a/ProjectLighthouse/Types/LevelTags.cs +++ b/ProjectLighthouse/Types/LevelTags.cs @@ -1,4 +1,7 @@ namespace ProjectLighthouse.Types { + /// + /// A series of tags that can be applied to a level + /// public enum LevelTags { Brilliant, Beautiful, diff --git a/ProjectLighthouse/Types/Location.cs b/ProjectLighthouse/Types/Location.cs index fec7c8ce..b356b612 100644 --- a/ProjectLighthouse/Types/Location.cs +++ b/ProjectLighthouse/Types/Location.cs @@ -1,6 +1,9 @@ using ProjectLighthouse.Serialization; namespace ProjectLighthouse.Types { + /// + /// The location of a slot on a planet. + /// public class Location { public Location(int x, int y) { this.X = x; diff --git a/ProjectLighthouse/Types/LoginResult.cs b/ProjectLighthouse/Types/LoginResult.cs index 991c9c11..f9c20260 100644 --- a/ProjectLighthouse/Types/LoginResult.cs +++ b/ProjectLighthouse/Types/LoginResult.cs @@ -2,6 +2,9 @@ using System.Collections.Generic; using ProjectLighthouse.Serialization; namespace ProjectLighthouse.Types { + /// + /// Response to POST /login + /// public class LoginResult { public string AuthTicket { get; set; } public string LbpEnvVer { get; set; } diff --git a/ProjectLighthouse/Types/NewsEntry.cs b/ProjectLighthouse/Types/NewsEntry.cs index 5cf0ad35..35f9bcbf 100644 --- a/ProjectLighthouse/Types/NewsEntry.cs +++ b/ProjectLighthouse/Types/NewsEntry.cs @@ -1,6 +1,9 @@ using ProjectLighthouse.Serialization; namespace ProjectLighthouse.Types { + /// + /// Used on the info moon on LBP1. Broken for unknown reasons + /// public class NewsEntry { public int Id { get; set; } public string Title { get; set; } diff --git a/ProjectLighthouse/Types/User.cs b/ProjectLighthouse/Types/User.cs index c9c845f6..12004fd1 100644 --- a/ProjectLighthouse/Types/User.cs +++ b/ProjectLighthouse/Types/User.cs @@ -10,12 +10,20 @@ namespace ProjectLighthouse.Types { public int HeartCount { get; set; } public string YayHash { get; set; } public string BooHash { get; set; } + + /// + /// A user-customizable biography shown on the profile card + /// public string Biography { get; set; } public int ReviewCount { get; set; } public int CommentCount { get; set; } public int PhotosByMeCount { get; set; } public int PhotosWithMeCount { get; set; } public bool CommentsEnabled { get; set; } + + /// + /// The location of the profile card on the user's earth + /// public Location Location { get; set; } public int FavouriteSlotCount { get; set; } public int FavouriteUserCount { get; set; } @@ -28,8 +36,19 @@ namespace ProjectLighthouse.Types { #region Slots + /// + /// The maximum amount of slots allowed on the earth + /// public static int EntitledSlots = 20; + + /// + /// The number of used slots on the earth + /// public int UsedSlots { get; set; } + + /// + /// The number of slots remaining on the earth + /// public int FreeSlots => EntitledSlots - this.UsedSlots; private static string[] slotTypes = {