Refactor world bootstrap and allow empty startup worlds

This commit is contained in:
2026-03-29 13:22:48 -04:00
parent 640e147ea8
commit 0bb72bee35
79 changed files with 173146 additions and 9235 deletions

View File

@@ -3,7 +3,7 @@ using SpaceGame.Api.Universe.Simulation;
namespace SpaceGame.Api.Universe.Api;
public sealed class UpdateBalanceHandler(WorldService worldService) : Endpoint<BalanceOptions>
public sealed class UpdateBalanceHandler(IBalanceService balanceService) : Endpoint<BalanceOptions>
{
public override void Configure()
{
@@ -13,7 +13,7 @@ public sealed class UpdateBalanceHandler(WorldService worldService) : Endpoint<B
public override Task HandleAsync(BalanceOptions req, CancellationToken cancellationToken)
{
var applied = worldService.UpdateBalance(req);
var applied = balanceService.Update(req);
return SendOkAsync(applied, cancellationToken);
}
}