mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-08-03 10:38:40 +00:00
Make VitaCreateMode option only affect vita
This commit is contained in:
parent
23eaed40b7
commit
49c22b4fab
1 changed files with 15 additions and 2 deletions
|
@ -1,4 +1,7 @@
|
|||
#nullable enable
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Threading.Tasks;
|
||||
using LBPUnion.ProjectLighthouse.Types;
|
||||
using LBPUnion.ProjectLighthouse.Types.Settings;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
@ -10,10 +13,20 @@ namespace LBPUnion.ProjectLighthouse.Controllers;
|
|||
[Produces("text/plain")]
|
||||
public class ClientConfigurationController : ControllerBase
|
||||
{
|
||||
private readonly Database database;
|
||||
|
||||
public ClientConfigurationController(Database database)
|
||||
{
|
||||
this.database = database;
|
||||
}
|
||||
|
||||
[HttpGet("network_settings.nws")]
|
||||
[SuppressMessage("ReSharper", "StringLiteralTypo")]
|
||||
public IActionResult NetworkSettings()
|
||||
public async Task<IActionResult> NetworkSettings()
|
||||
{
|
||||
GameToken? token = await this.database.GameTokenFromRequest(this.Request);
|
||||
if (token == null) return null;
|
||||
|
||||
HostString hostname = this.Request.Host;
|
||||
return this.Ok
|
||||
(
|
||||
|
@ -21,7 +34,7 @@ public class ClientConfigurationController : ControllerBase
|
|||
$"TelemetryServer {hostname}\n" +
|
||||
$"CDNHostName {hostname}\n" +
|
||||
$"ShowLevelBoos {ServerSettings.Instance.BooingEnabled.ToString().ToLower()}\n" +
|
||||
$"AllowOnlineCreate {ServerSettings.Instance.VitaCreateMode.ToString().ToLower()}\n"
|
||||
$"AllowOnlineCreate {(token.GameVersion != GameVersion.LittleBigPlanetVita || ServerSettings.Instance.VitaCreateMode).ToString().ToLower()}\n"
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue