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

SpaceNinjaServer

A simple server for a small space ninja game

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

XFEstudio/SpaceNinjaServer

fix: align dojo component DestructionTime to full seconds (#1394)

not doing this causes the client to spam requests and have some UI bugs Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/1394 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>

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

代码差异

1 个文件 +1 -1
Modified src/controllers/api/queueDojoComponentDestructionController.ts +1 -1
@@ -16,7 +16,7 @@ export const queueDojoComponentDestructionController: RequestHandler = async (re
16 16 const componentId = req.query.componentId as string;
17 17
18 18 guild.DojoComponents.id(componentId)!.DestructionTime = new Date(
19 Date.now() + (config.fastDojoRoomDestruction ? 5_000 : 2 * 3600_000)
19 (Math.trunc(Date.now() / 1000) + (config.fastDojoRoomDestruction ? 5 : 2 * 3600)) * 1000
20 20 );
21 21
22 22 await guild.save();