using Microsoft.AspNetCore.Mvc; namespace DorkNet.Server.Controllers.Strings; /// /// strings.rec.net — game localisation strings. /// Returns an empty table so the client falls back to its bundled defaults. /// [ApiController] public class StringsController : ControllerBase { [HttpGet("/strings/v1")] public ActionResult> GetStrings() => Ok(new Dictionary()); [HttpGet("/strings/v1/{locale}")] public ActionResult> GetLocale(string locale) => Ok(new Dictionary()); /// The 2023 client's server-string download (RecNet.Runtime/NHILNDLLLHH.txt). /// Two GETs share the path /strings on the strings host: /// /// ?locale=&scopePrefix=client.&eTag= (FMLBOAOBKPM, :531) → /// Dictionary<string, Dictionary<long,string>>, scope → id → text; /// ?locale=&scope=client.{name}&eTag= (BNEELKAKCEN, :3) → /// Dictionary<long,string>. /// /// The localisation service stores the first answer /// (RecRoom.Localization.Runtime/IBAJDNIMADI.txt BICKHBAJPIG) and its scope lookup /// (NHLKEJLGGIE) null-derefs when the download never succeeded but returns an empty /// table for a scope the server did not send. DorkNet keeps no server-side string /// overrides, so the truthful answer is an empty JSON object for either query — /// the lookups then fall back to the bundled text. The path used to 404. [HttpGet("/strings")] public IActionResult GetServerStrings() => Content("{}", "application/json"); }