diff --git a/ProjectLighthouse.Servers.Website/Pages/SlotSettingsPage.cshtml b/ProjectLighthouse.Servers.Website/Pages/SlotSettingsPage.cshtml
index 97d078261..85384367d 100644
--- a/ProjectLighthouse.Servers.Website/Pages/SlotSettingsPage.cshtml
+++ b/ProjectLighthouse.Servers.Website/Pages/SlotSettingsPage.cshtml
@@ -60,6 +60,34 @@ function onSubmit(){
+
+
+
+ @if (Model.Slot.GameVersion != GameVersion.LittleBigPlanet1)
+ {
+
+ }
+ else
+ {
+
+ }
+
@if (Model.Slot.GameVersion != GameVersion.LittleBigPlanet1)
{
diff --git a/ProjectLighthouse.Servers.Website/Pages/SlotSettingsPage.cshtml.cs b/ProjectLighthouse.Servers.Website/Pages/SlotSettingsPage.cshtml.cs
index b461d9825..0fe2eab32 100644
--- a/ProjectLighthouse.Servers.Website/Pages/SlotSettingsPage.cshtml.cs
+++ b/ProjectLighthouse.Servers.Website/Pages/SlotSettingsPage.cshtml.cs
@@ -5,6 +5,7 @@
using LBPUnion.ProjectLighthouse.Helpers;
using LBPUnion.ProjectLighthouse.Servers.Website.Pages.Layouts;
using LBPUnion.ProjectLighthouse.Types.Entities.Level;
+using LBPUnion.ProjectLighthouse.Types.Users;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
@@ -17,7 +18,18 @@ public class SlotSettingsPage : BaseLayout
public SlotSettingsPage(DatabaseContext database) : base(database)
{}
- public async Task OnPost([FromRoute] int slotId, [FromForm] string? avatar, [FromForm] string? name, [FromForm] string? description, string? labels)
+ public async Task OnPost
+ (
+ [FromRoute] int slotId,
+ [FromForm] string? avatar,
+ [FromForm] string? name,
+ [FromForm] string? description,
+ [FromForm] string? labels,
+ [FromForm] bool initiallyLocked,
+ [FromForm] int shareable,
+ [FromForm] bool subLevel,
+ [FromForm] bool lbp1Only
+ )
{
this.Slot = await this.Database.Slots.FirstOrDefaultAsync(u => u.SlotId == slotId);
if (this.Slot == null) return this.NotFound();
@@ -55,6 +67,22 @@ public async Task OnPost([FromRoute] int slotId, [FromForm] strin
this.Slot.AuthorLabels = labels;
}
+ if (this.Slot.InitiallyLocked != initiallyLocked) this.Slot.InitiallyLocked = initiallyLocked;
+
+ if (this.Slot.Shareable != shareable) this.Slot.Shareable = shareable;
+
+ if (this.Slot.SubLevel != subLevel)
+ {
+ if (this.Slot.GameVersion != GameVersion.LittleBigPlanet1)
+ this.Slot.SubLevel = subLevel;
+ }
+
+ if (this.Slot.Lbp1Only != lbp1Only)
+ {
+ if (this.Slot.GameVersion == GameVersion.LittleBigPlanet1)
+ this.Slot.Lbp1Only = lbp1Only;
+ }
+
// ReSharper disable once InvertIf
if (this.Database.ChangeTracker.HasChanges())
{