Initial commit
This commit is contained in:
17
ALttPRandomizer/ALttPRandomizer.csproj
Normal file
17
ALttPRandomizer/ALttPRandomizer.csproj
Normal file
@@ -0,0 +1,17 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>disable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<StartupObject>ALttPRandomizer.Program</StartupObject>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Azure.WebPubSub.AspNetCore" Version="1.4.0" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="7.2.0" />
|
||||
<PackageReference Include="System.Text.Json" Version="9.0.2" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
12
ALttPRandomizer/GenerateSeedController.cs
Normal file
12
ALttPRandomizer/GenerateSeedController.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
namespace ALttPRandomizer {
|
||||
using ALttPRandomizer.Model;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
public class GenerateController : Controller {
|
||||
[Route("/generate")]
|
||||
[HttpPost]
|
||||
public ActionResult Generate(SeedSettings settings) {
|
||||
return Content("Hello world");
|
||||
}
|
||||
}
|
||||
}
|
||||
71
ALttPRandomizer/Model/SeedSettings.cs
Normal file
71
ALttPRandomizer/Model/SeedSettings.cs
Normal file
@@ -0,0 +1,71 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace ALttPRandomizer.Model {
|
||||
public class SeedSettings {
|
||||
public Mode Mode { get; set; } = Mode.Open;
|
||||
|
||||
public Weapons Weapons { get; set; } = Weapons.Randomized;
|
||||
|
||||
public Goal Goal { get; set; } = Goal.Ganon;
|
||||
|
||||
public EntranceShuffle EntranceShuffle { get; set; } = EntranceShuffle.None;
|
||||
|
||||
public BossShuffle BossShuffle { get; set; } = BossShuffle.None;
|
||||
|
||||
public DungeonItemLocations SmallKeys { get; set; } = DungeonItemLocations.Dungeon;
|
||||
|
||||
[DeniedValues(DungeonItemLocations.Universal)]
|
||||
public DungeonItemLocations BigKeys { get; set; } = DungeonItemLocations.Dungeon;
|
||||
|
||||
[DeniedValues(DungeonItemLocations.Universal)]
|
||||
public DungeonItemLocations Maps { get; set; } = DungeonItemLocations.Dungeon;
|
||||
|
||||
[DeniedValues(DungeonItemLocations.Universal)]
|
||||
public DungeonItemLocations Compasses { get; set; } = DungeonItemLocations.Dungeon;
|
||||
}
|
||||
|
||||
public enum Mode {
|
||||
Open,
|
||||
Standard,
|
||||
Inverted,
|
||||
}
|
||||
|
||||
public enum Weapons {
|
||||
Randomized,
|
||||
Assured,
|
||||
Vanilla,
|
||||
Swordless,
|
||||
}
|
||||
|
||||
public enum Goal {
|
||||
Ganon,
|
||||
FastGanon,
|
||||
AllDungeons,
|
||||
Pedestal,
|
||||
TriforceHunt,
|
||||
GanonHunt,
|
||||
Completionist,
|
||||
}
|
||||
|
||||
public enum EntranceShuffle {
|
||||
None,
|
||||
Full,
|
||||
Crossed,
|
||||
Decoupled,
|
||||
}
|
||||
|
||||
public enum BossShuffle {
|
||||
None,
|
||||
Simple,
|
||||
Full,
|
||||
Random,
|
||||
PrizeUnique,
|
||||
}
|
||||
|
||||
public enum DungeonItemLocations {
|
||||
Dungeon,
|
||||
Wild,
|
||||
Nearby,
|
||||
Universal,
|
||||
}
|
||||
}
|
||||
30
ALttPRandomizer/Program.cs
Normal file
30
ALttPRandomizer/Program.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
namespace ALttPRandomizer
|
||||
{
|
||||
using System.Text.Json.Serialization;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
internal class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
builder.Services.AddControllers().AddJsonOptions(x =>
|
||||
x.JsonSerializerOptions.Converters.Add(new JsonStringEnumConverter()));
|
||||
builder.Services.AddSwaggerGen();
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
app.UseHttpsRedirection();
|
||||
app.MapControllers();
|
||||
app.UseSwagger();
|
||||
app.UseSwaggerUI(c => {
|
||||
c.ShowCommonExtensions();
|
||||
c.EnableValidator();
|
||||
});
|
||||
|
||||
app.Run();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user