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 GetBalanceHandler(WorldService worldService) : EndpointWithoutRequest
public sealed class GetBalanceHandler(IBalanceService balanceService) : EndpointWithoutRequest
{
public override void Configure()
{
@@ -12,5 +12,5 @@ public sealed class GetBalanceHandler(WorldService worldService) : EndpointWitho
}
public override Task HandleAsync(CancellationToken cancellationToken) =>
SendOkAsync(worldService.GetBalance(), cancellationToken);
SendOkAsync(balanceService.GetCurrent(), cancellationToken);
}