mirror of
https://github.com/DorkSquadRR/DorkNet.git
synced 2026-10-26 07:28:45 -07:00
Import march-2020-03-10 from private repo (scrubbed 2026-05-27)
Targets Rec Room 2020.03.10 client (also serves 2020.03.06).
Re-import after adding:
- DorkNet.ClientMod/dorknet-clientmod.json.template — config schema
the launcher's manifest-driven patcher renders into UserData/.
- tools/build-patcher-zip.ps1 — produces dorknet-clientpatch-{key}.zip
for v1-march-* Release uploads.
- .github/workflows/release.yml — on tag push publishes both
dorknet-server-march_2020_03_10-win-x64.zip and
dorknet-clientpatch-march_2020_03_10.zip as Release assets.
Same scrub rules as december; tools/build-patcher-zip.ps1 added to
the maintainer-side allow-list so it survives.
This commit is contained in:
@@ -0,0 +1,72 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using DorkNet.Server.Services;
|
||||
|
||||
namespace DorkNet.Server.Controllers.API.Config.V1;
|
||||
|
||||
[ApiController]
|
||||
[Route("api/[controller]/v1")]
|
||||
public class ConfigController(ConfigService configService) : ControllerBase
|
||||
{
|
||||
[HttpGet("motd")]
|
||||
public ActionResult<string> GetMotd()
|
||||
{
|
||||
var cfg = configService.GetConfig($"{Request.Scheme}://{Request.Host}");
|
||||
return Ok(cfg.MessageOfTheDay);
|
||||
}
|
||||
|
||||
[HttpGet("objectives")]
|
||||
public ActionResult<List<object>> GetObjectives() => Ok(new List<object>());
|
||||
|
||||
// AmplitudeConfig.Deserialize expects key "AmplitudeKey"
|
||||
[HttpGet("amplitude")]
|
||||
public ActionResult<object> GetAmplitude() => Ok(new { AmplitudeKey = string.Empty });
|
||||
|
||||
/// <summary>
|
||||
/// `Config.GetCohortNUXButtonConfigs(cohortId)` — returns the four
|
||||
/// "What would you like to do first?" buttons shown in the OOBE
|
||||
/// (RegistrationSceneNUX → ChooseCohortScreen). Each button maps to
|
||||
/// a room the new player can teleport into.
|
||||
///
|
||||
/// Wire shape per CohortNUXButtonConfig (TypeDefIndex 11516) — list of:
|
||||
/// Version (int)
|
||||
/// ButtonNumber (int, 0..3 → Button1..Button4)
|
||||
/// Override (int, 0=None, 1=Hotlist, 2=Custom)
|
||||
/// CustomRoomName (string)
|
||||
/// CustomTitle (string)
|
||||
/// DefaultRoomName (string)
|
||||
/// DefaultTitle (string)
|
||||
///
|
||||
/// The screen picks `CustomRoomName` if Override=Custom, else the
|
||||
/// `DefaultRoomName` (resolved by Rooms.GetByName). For simplicity all
|
||||
/// four use Override=None and route to Rec Room Original rooms we
|
||||
/// already seeded — picking the most newcomer-friendly ones.
|
||||
/// </summary>
|
||||
[HttpGet("cohortnux/{cohortId:int}")]
|
||||
public IActionResult GetCohortNux(int cohortId) => Ok(new[]
|
||||
{
|
||||
new {
|
||||
Version = 1, ButtonNumber = 0, Override = 0,
|
||||
CustomRoomName = "", CustomTitle = "",
|
||||
DefaultRoomName = "RecCenter",
|
||||
DefaultTitle = "Hang out at the Rec Center",
|
||||
},
|
||||
new {
|
||||
Version = 1, ButtonNumber = 1, Override = 0,
|
||||
CustomRoomName = "", CustomTitle = "",
|
||||
DefaultRoomName = "Paintball",
|
||||
DefaultTitle = "Play Paintball",
|
||||
},
|
||||
new {
|
||||
Version = 1, ButtonNumber = 2, Override = 0,
|
||||
CustomRoomName = "", CustomTitle = "",
|
||||
DefaultRoomName = "Dodgeball",
|
||||
DefaultTitle = "Play Dodgeball",
|
||||
},
|
||||
new {
|
||||
Version = 1, ButtonNumber = 3, Override = 0,
|
||||
CustomRoomName = "", CustomTitle = "",
|
||||
DefaultRoomName = "GoldenTrophy",
|
||||
DefaultTitle = "Quest for the Golden Trophy",
|
||||
},
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using DorkNet.Server.Services;
|
||||
|
||||
namespace DorkNet.Server.Controllers.API.Config.V1;
|
||||
|
||||
/// <summary>
|
||||
/// Returns the full Rec Room service URL map. Some builds fetch this standalone
|
||||
/// at /api/config/v1/services to discover where the other subdomains live.
|
||||
/// Apex comes from <see cref="DomainConfig"/> (DORKNET_DOMAIN), so a single
|
||||
/// env var controls every URL emitted.
|
||||
/// </summary>
|
||||
[ApiController]
|
||||
[Route("api/config/v1")]
|
||||
public class ServiceUrlsController(DomainConfig domain) : ControllerBase
|
||||
{
|
||||
[HttpGet("services")]
|
||||
public ActionResult<Dictionary<string, string>> Get()
|
||||
=> Ok(ConfigService.BuildServiceUrlMap(domain.Apex));
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using DorkNet.Models.Config;
|
||||
using DorkNet.Server.Services;
|
||||
|
||||
namespace DorkNet.Server.Controllers.API.Config.V2;
|
||||
|
||||
[ApiController]
|
||||
[Route("api/[controller]/v2")]
|
||||
public class ConfigController(ConfigService configService) : ControllerBase
|
||||
{
|
||||
[HttpGet]
|
||||
public ActionResult<RecRoomConfig> GetConfig()
|
||||
{
|
||||
var baseUrl = $"{Request.Scheme}://{Request.Host}";
|
||||
return Ok(configService.GetConfig(baseUrl));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user