mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-09 14:51:27 +00:00
Disable comments on story levels if comments are turned off in config.
This commit is contained in:
parent
541172b001
commit
98a7f95e65
1 changed files with 10 additions and 1 deletions
|
@ -1,6 +1,8 @@
|
||||||
using System.Linq;
|
using System;
|
||||||
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Xml.Serialization;
|
using System.Xml.Serialization;
|
||||||
|
using LBPUnion.ProjectLighthouse.Configuration;
|
||||||
using LBPUnion.ProjectLighthouse.Database;
|
using LBPUnion.ProjectLighthouse.Database;
|
||||||
using LBPUnion.ProjectLighthouse.Helpers;
|
using LBPUnion.ProjectLighthouse.Helpers;
|
||||||
using LBPUnion.ProjectLighthouse.Types.Entities.Profile;
|
using LBPUnion.ProjectLighthouse.Types.Entities.Profile;
|
||||||
|
@ -30,6 +32,13 @@ public class GameDeveloperSlot : SlotBase, INeedsPreparationForSerialization
|
||||||
[XmlElement("photoCount")]
|
[XmlElement("photoCount")]
|
||||||
public int PhotoCount { get; set; }
|
public int PhotoCount { get; set; }
|
||||||
|
|
||||||
|
[XmlElement("commentsEnabled")]
|
||||||
|
public bool CommentsEnabled
|
||||||
|
{
|
||||||
|
get => ServerConfiguration.Instance.UserGeneratedContentLimits.LevelCommentsEnabled;
|
||||||
|
set => throw new NotSupportedException();
|
||||||
|
}
|
||||||
|
|
||||||
public async Task PrepareSerialization(DatabaseContext database)
|
public async Task PrepareSerialization(DatabaseContext database)
|
||||||
{
|
{
|
||||||
if (this.SlotId == 0 || this.InternalSlotId == 0) return;
|
if (this.SlotId == 0 || this.InternalSlotId == 0) return;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue