mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-25 22:51:29 +00:00
Add LevelTagsController and EnterLevelController
This commit is contained in:
parent
c20ac6a845
commit
4c6e5e07a5
4 changed files with 122 additions and 0 deletions
13
ProjectLighthouse/Controllers/EnterLevelController.cs
Normal file
13
ProjectLighthouse/Controllers/EnterLevelController.cs
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
|
||||||
|
namespace ProjectLighthouse.Controllers {
|
||||||
|
[ApiController]
|
||||||
|
[Route("LITTLEBIGPLANETPS3_XML/enterLevel")]
|
||||||
|
// [Produces("text/plain")]
|
||||||
|
public class EnterLevelController : ControllerBase {
|
||||||
|
[HttpGet("enterLevel/{id}")]
|
||||||
|
public IActionResult EnterLevel(string id) {
|
||||||
|
return this.Ok();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
22
ProjectLighthouse/Controllers/LevelTagsController.cs
Normal file
22
ProjectLighthouse/Controllers/LevelTagsController.cs
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
using System;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
|
||||||
|
namespace ProjectLighthouse.Controllers {
|
||||||
|
[ApiController]
|
||||||
|
[Route("LITTLEBIGPLANETPS3_XML/tags")]
|
||||||
|
[Produces("text/plain")]
|
||||||
|
public class LevelTagsController : ControllerBase {
|
||||||
|
[HttpGet]
|
||||||
|
public IActionResult Get() {
|
||||||
|
string[] tags = Enum.GetNames(typeof(LevelTags));
|
||||||
|
|
||||||
|
int i = 0;
|
||||||
|
foreach(string tag in tags) {
|
||||||
|
tags[i] = $"TAG_{tag.Replace("_", "-")}";
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.Ok(string.Join(",", tags));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
80
ProjectLighthouse/LevelTags.cs
Normal file
80
ProjectLighthouse/LevelTags.cs
Normal file
|
@ -0,0 +1,80 @@
|
||||||
|
namespace ProjectLighthouse {
|
||||||
|
public enum LevelTags {
|
||||||
|
Brilliant,
|
||||||
|
Beautiful,
|
||||||
|
Funky,
|
||||||
|
Points_Fest,
|
||||||
|
Weird,
|
||||||
|
Tricky,
|
||||||
|
Short,
|
||||||
|
Vehicles,
|
||||||
|
Easy,
|
||||||
|
Cute,
|
||||||
|
Quick,
|
||||||
|
Fun,
|
||||||
|
Relaxing,
|
||||||
|
Great,
|
||||||
|
Speedy,
|
||||||
|
Race,
|
||||||
|
Multi_Path,
|
||||||
|
Machines,
|
||||||
|
Complex,
|
||||||
|
Pretty,
|
||||||
|
Rubbish,
|
||||||
|
Toys,
|
||||||
|
Repetitive,
|
||||||
|
Machinery,
|
||||||
|
Satisfying,
|
||||||
|
Braaains,
|
||||||
|
Fast,
|
||||||
|
Simple,
|
||||||
|
Long,
|
||||||
|
Slow,
|
||||||
|
Mad,
|
||||||
|
Hectic,
|
||||||
|
Creepy,
|
||||||
|
Perilous,
|
||||||
|
Empty,
|
||||||
|
Ingenious,
|
||||||
|
Lousy,
|
||||||
|
Frustrating,
|
||||||
|
Timing,
|
||||||
|
Boss,
|
||||||
|
Springy,
|
||||||
|
Funny,
|
||||||
|
Musical,
|
||||||
|
Good,
|
||||||
|
Hilarious,
|
||||||
|
Electric,
|
||||||
|
Puzzler,
|
||||||
|
Platformer,
|
||||||
|
Difficult,
|
||||||
|
Mechanical,
|
||||||
|
Horizontal,
|
||||||
|
Splendid,
|
||||||
|
Fiery,
|
||||||
|
Swingy,
|
||||||
|
Single_Path,
|
||||||
|
Annoying,
|
||||||
|
Co_op,
|
||||||
|
Boring,
|
||||||
|
Moody,
|
||||||
|
Bubbly,
|
||||||
|
Nerve_wracking,
|
||||||
|
Hoists,
|
||||||
|
Ugly,
|
||||||
|
Daft,
|
||||||
|
Ramps,
|
||||||
|
Secrets,
|
||||||
|
Floaty,
|
||||||
|
Artistic,
|
||||||
|
Competitive,
|
||||||
|
Gas,
|
||||||
|
Varied,
|
||||||
|
Stickers,
|
||||||
|
Spikes,
|
||||||
|
Collectables,
|
||||||
|
Vertical,
|
||||||
|
Balancing
|
||||||
|
}
|
||||||
|
}
|
|
@ -35,6 +35,13 @@ namespace ProjectLighthouse {
|
||||||
app.UseDeveloperExceptionPage();
|
app.UseDeveloperExceptionPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
app.Use(async (context, next) => {
|
||||||
|
await next();
|
||||||
|
if(context.Response.StatusCode == 404) {
|
||||||
|
Console.WriteLine($"404: {context.Request.Method} {context.Request.Path}");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
app.UseRouting();
|
app.UseRouting();
|
||||||
|
|
||||||
app.UseAuthorization();
|
app.UseAuthorization();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue