mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-30 00:38:38 +00:00
Add Challenges Support to LBP3 (#941)
* Adds Challenges and Promotions (No resources included for Promotions) * Adds Challenges and Promotions (No resources included for Promotions) * Adds Challenges and Promotions (No resources included for Promotions) * Created GameChallenge Class. Co-authored-by: koko <koko@sudokoko.xyz> * Add serialization logic and official server challenge config * Fix schema and simplify things * Renammed some classes * Update ProjectLighthouse/Types/Serialization/GameChallenge.cs Co-authored-by: Josh <josh@slendy.pw> * Update ProjectLighthouse/Types/Serialization/GameChallenge.cs Co-authored-by: Josh <josh@slendy.pw> * Update ProjectLighthouse/Types/Serialization/GameChallenge.cs Co-authored-by: Josh <josh@slendy.pw> * Update ProjectLighthouse/Types/Serialization/GameChallenge.cs Co-authored-by: Josh <josh@slendy.pw> * Update ProjectLighthouse/Types/Serialization/GameChallenge.cs Co-authored-by: Josh <josh@slendy.pw> * Update ProjectLighthouse/Types/Serialization/GameChallenge.cs Co-authored-by: Josh <josh@slendy.pw> * Update ProjectLighthouse/Types/Serialization/GameChallenge.cs Co-authored-by: Josh <josh@slendy.pw> * Update ProjectLighthouse/Types/Serialization/GameChallenge.cs Co-authored-by: Josh <josh@slendy.pw> * Update ProjectLighthouse/Types/Serialization/GameChallenge.cs Co-authored-by: Josh <josh@slendy.pw> * Update ProjectLighthouse/Types/Serialization/GameChallenge.cs Co-authored-by: Josh <josh@slendy.pw> * Update ProjectLighthouse/Types/Serialization/GameChallenge.cs Co-authored-by: Josh <josh@slendy.pw> * Update ProjectLighthouse/Types/Serialization/GameChallenge.cs Co-authored-by: Josh <josh@slendy.pw> * Fixed a simple coding error * Update ProjectLighthouse.Servers.GameServer/Controllers/Login/ClientConfigurationController.cs Co-authored-by: Zaprit <henry@vorax.org> --------- Co-authored-by: koko <koko@sudokoko.xyz> Co-authored-by: Josh <josh@slendy.pw> Co-authored-by: Zaprit <henry@vorax.org>
This commit is contained in:
parent
d45dc465e3
commit
e593d5c957
2 changed files with 289 additions and 3 deletions
|
@ -43,9 +43,11 @@ public class ClientConfigurationController : ControllerBase
|
|||
[Produces("text/xml")]
|
||||
public IActionResult Conf() => this.Ok(new TelemetryConfigResponse());
|
||||
|
||||
// The challenge config here is currently based on the official server's config.
|
||||
// We should probably make this configurable in the future.
|
||||
[HttpGet("ChallengeConfig.xml")]
|
||||
[Produces("text/xml")]
|
||||
public IActionResult Challenges() => this.Ok();
|
||||
public IActionResult Challenges() => this.Ok(GameChallengeResponse.ServerChallenges());
|
||||
|
||||
[HttpGet("farc_hashes")]
|
||||
public IActionResult FarcHashes() => this.Ok();
|
||||
|
@ -75,12 +77,12 @@ public class ClientConfigurationController : ControllerBase
|
|||
|
||||
PrivacySettings? settings = await this.DeserializeBody<PrivacySettings>();
|
||||
if (settings == null) return this.BadRequest();
|
||||
|
||||
|
||||
if (settings.LevelVisibility != null)
|
||||
{
|
||||
PrivacyType? type = PrivacyTypeExtensions.FromSerializedString(settings.LevelVisibility);
|
||||
if (type == null) return this.BadRequest();
|
||||
|
||||
|
||||
user.LevelVisibility = (PrivacyType)type;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue