namespace NeonSprawl.Server.Game.Gathering; /// Dev-only route to reset prototype resource-node gathers for Bruno and manual QA. public static class ResourceNodeFixtureApi { public static WebApplication MapResourceNodeFixtureApi(this WebApplication app) { app.MapPost( "/game/__dev/resource-node-fixture", (ResourceNodeFixtureRequest? body, IResourceNodeDefinitionRegistry nodeRegistry, IResourceNodeInstanceStore instanceStore) => { if (body is null || body.SchemaVersion != ResourceNodeFixtureRequest.CurrentSchemaVersion) { return Results.BadRequest(); } if (!ResourceNodeFixtureOperations.TryApply(nodeRegistry, instanceStore)) { return Results.NotFound(); } return Results.Json(new ResourceNodeFixtureResponse { Applied = true }); }); return app; } }