Replace Location table with packed 64-bit int (#679)

* Replace Location table with packed 64 bit int

* Remove double Include and fix Slot documentation

* Fix compilation errors from merge

* Fix namespaces and add expected values to unit tests
This commit is contained in:
Josh 2023-02-21 14:53:38 -06:00 committed by GitHub
commit 35ea2682b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
30 changed files with 996 additions and 930 deletions

View file

@ -20,7 +20,6 @@ public class HeartedCategory : CategoryWithUser
.Where(h => h.Slot.Type == SlotType.User && !h.Slot.Hidden && h.Slot.GameVersion <= GameVersion.LittleBigPlanet3)
.OrderByDescending(h => h.HeartedLevelId)
.Include(h => h.Slot.Creator)
.Include(h => h.Slot.Location)
.Select(h => h.Slot)
.ByGameVersion(GameVersion.LittleBigPlanet3, false, false, true)
.FirstOrDefault();
@ -30,7 +29,6 @@ public class HeartedCategory : CategoryWithUser
.Where(h => h.Slot.Type == SlotType.User && !h.Slot.Hidden && h.Slot.GameVersion <= GameVersion.LittleBigPlanet3)
.OrderByDescending(h => h.HeartedLevelId)
.Include(h => h.Slot.Creator)
.Include(h => h.Slot.Location)
.Select(h => h.Slot)
.ByGameVersion(GameVersion.LittleBigPlanet3, false, false, true)
.Skip(Math.Max(0, pageStart))

View file

@ -20,7 +20,6 @@ public class QueueCategory : CategoryWithUser
.Where(q => q.Slot.Type == SlotType.User && !q.Slot.Hidden && q.Slot.GameVersion <= GameVersion.LittleBigPlanet3)
.OrderByDescending(q => q.QueuedLevelId)
.Include(q => q.Slot.Creator)
.Include(q => q.Slot.Location)
.Select(q => q.Slot)
.ByGameVersion(GameVersion.LittleBigPlanet3, false, false, true)
.FirstOrDefault();
@ -30,7 +29,6 @@ public class QueueCategory : CategoryWithUser
.Where(q => q.Slot.Type == SlotType.User && !q.Slot.Hidden && q.Slot.GameVersion <= GameVersion.LittleBigPlanet3)
.OrderByDescending(q => q.QueuedLevelId)
.Include(q => q.Slot.Creator)
.Include(q => q.Slot.Location)
.Select(q => q.Slot)
.ByGameVersion(GameVersion.LittleBigPlanet3, false, false, true)
.Skip(Math.Max(0, pageStart - 1))

View file

@ -1,7 +1,7 @@
using LBPUnion.ProjectLighthouse.Serialization;
using Microsoft.EntityFrameworkCore;
namespace LBPUnion.ProjectLighthouse.Servers.GameServer.Types;
namespace LBPUnion.ProjectLighthouse.Servers.GameServer.Types.Users;
[Keyless]
public class ClientsConnected

View file

@ -1,6 +1,6 @@
using System.Xml.Serialization;
namespace LBPUnion.ProjectLighthouse.Servers.GameServer.Types;
namespace LBPUnion.ProjectLighthouse.Servers.GameServer.Types.Users;
/// <summary>
/// Sent by the game client to inform the server

View file

@ -1,6 +1,6 @@
using System.Text.Json.Serialization;
namespace LBPUnion.ProjectLighthouse.Servers.GameServer.Types;
namespace LBPUnion.ProjectLighthouse.Servers.GameServer.Types.Users;
public class Pins
{

View file

@ -2,7 +2,7 @@
using System.Xml.Serialization;
using LBPUnion.ProjectLighthouse.Serialization;
namespace LBPUnion.ProjectLighthouse.Servers.GameServer.Types;
namespace LBPUnion.ProjectLighthouse.Servers.GameServer.Types.Users;
[XmlRoot("privacySettings")]
[XmlType("privacySettings")]

View file

@ -3,7 +3,7 @@ using System.Xml.Serialization;
using LBPUnion.ProjectLighthouse.Types.Levels;
using LBPUnion.ProjectLighthouse.Types.Misc;
namespace LBPUnion.ProjectLighthouse.Servers.GameServer.Types;
namespace LBPUnion.ProjectLighthouse.Servers.GameServer.Types.Users;
/// <summary>
/// Used by the games to update details about a user's profile
/// LBP1 only uses Location and IconHash