XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

XFESpaceNinjaServer

A simple server for a small space ninja game

公开
关注 0 Fork 0 Star 0
返回提交历史

XFEstudio/XFESpaceNinjaServer

fix: provide a response to setPlacedDecoInfo (#1632)

This seems to be needed for the client when refreshing the ship after loading into a mission as it does not resync the ship otherwise. Closes #1629 Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/1632 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>

bd837381
Sainan <63328889+Sainan@users.noreply.github.com>
提交于

代码差异

1 个文件 +14 -2
Modified src/controllers/api/setPlacedDecoInfoController.ts +14 -2
@@ -1,5 +1,5 @@
1 1 import { getAccountIdForRequest } from "@/src/services/loginService";
2 import { ISetPlacedDecoInfoRequest } from "@/src/types/shipTypes";
2 import { IPictureFrameInfo, ISetPlacedDecoInfoRequest } from "@/src/types/shipTypes";
3 3 import { RequestHandler } from "express";
4 4 import { handleSetPlacedDecoInfo } from "@/src/services/shipCustomizationsService";
5 5
@@ -7,5 +7,17 @@ export const setPlacedDecoInfoController: RequestHandler = async (req, res) => {
7 7 const accountId = await getAccountIdForRequest(req);
8 8 const payload = JSON.parse(req.body as string) as ISetPlacedDecoInfoRequest;
9 9 await handleSetPlacedDecoInfo(accountId, payload);
10 res.end();
10 res.json({
11 DecoId: payload.DecoId,
12 IsPicture: true,
13 PictureFrameInfo: payload.PictureFrameInfo,
14 BootLocation: payload.BootLocation
15 } satisfies ISetPlacedDecoInfoResponse);
11 16 };
17
18 interface ISetPlacedDecoInfoResponse {
19 DecoId: string;
20 IsPicture: boolean;
21 PictureFrameInfo?: IPictureFrameInfo;
22 BootLocation?: string;
23 }