v1.3.0: per-player money & reputation in engine + actions (ISS-110)
CI / build + unit + e2e (pull_request) Successful in 13m20s
CI / build + unit + e2e (pull_request) Successful in 13m20s
This commit is contained in:
+2
-1
@@ -411,7 +411,8 @@ export async function performAction(req: Request, fn: (inst: GameDb, playerId: s
|
||||
if (!auth.ok) return auth.response;
|
||||
try {
|
||||
await runAction((inst) => fn(inst, auth.player.id));
|
||||
return Response.json(await getStateSnapshot());
|
||||
// v1.3.0 (ISS-110): the response snapshot carries the ACTING player's economy in `account`.
|
||||
return Response.json(await getStateSnapshot(auth.player.id));
|
||||
} catch (err) {
|
||||
if (err instanceof GameActionError) {
|
||||
return Response.json({ error: err.message }, { status: err.status });
|
||||
|
||||
Reference in New Issue
Block a user