From 755b836a350fba9a7d6ec614729e54cff2b6509a Mon Sep 17 00:00:00 2001 From: waterfast <1301917161@qq.com> Date: Sat, 18 Oct 2025 14:53:12 +0800 Subject: [PATCH 1/3] =?UTF-8?q?10/18/=E7=BB=A7=E7=BB=AD=E6=88=98=E6=96=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Fk/Base/command.mjs | 3 +++ Fk/Pages/Common/RoomPage.qml | 9 +++++++++ Fk/Pages/Common/WaitingRoom.qml | 12 ++++++++++++ Fk/Pages/LunarLTK/GameOverBox.qml | 10 ++++++++++ lua/client/i18n/zh_CN.lua | 1 + 5 files changed, 35 insertions(+) diff --git a/Fk/Base/command.mjs b/Fk/Base/command.mjs index 2b42b03..b0738e5 100644 --- a/Fk/Base/command.mjs +++ b/Fk/Base/command.mjs @@ -39,12 +39,15 @@ export const PackageTransferProgress = "PackageTransferProgress"; // RoomPage 房间基底页 export const ChangeRoomPage = "ChangeRoomPage"; export const ResetRoomPage = "ResetRoomPage"; +export const ContinueGame = "ContinueGame"; export const BackToRoom = "BackToRoom"; +export const RestartGame = "RestartGame"; export const IWantToQuitRoom = "IWantToQuitRoom"; export const IWantToSaveRecord = "IWantToSaveRecord"; export const IWantToBookmarkRecord = "IWantToBookmarkRecord"; export const IWantToChat = "IWantToChat"; + // Misc export const Chat = "Chat"; diff --git a/Fk/Pages/Common/RoomPage.qml b/Fk/Pages/Common/RoomPage.qml index 903655e..40161df 100644 --- a/Fk/Pages/Common/RoomPage.qml +++ b/Fk/Pages/Common/RoomPage.qml @@ -717,6 +717,14 @@ Item { Mediator.notify(this, Command.BackToRoom); } + function continueGame() { + Lua.call("ResetClientLua"); + gameLoader.sourceComponent = Qt.createComponent("Fk.Pages.Common", "WaitingRoom"); + log.clear(); + chat.clear(); + Mediator.notify(this, Command.RestartGame); + } + function tryQuitRoom() { if (Config.replaying) { App.quitPage(); @@ -748,6 +756,7 @@ Item { overlay.addCallback(Command.ReplyToServer, replyToServer); overlay.addCallback(Command.ChangeRoomPage, changeRoomPage); overlay.addCallback(Command.ResetRoomPage, resetRoomPage); + overlay.addCallback(Command.ContinueGame, continueGame); overlay.addCallback(Command.IWantToQuitRoom, tryQuitRoom); overlay.addCallback(Command.IWantToSaveRecord, trySaveRecord); diff --git a/Fk/Pages/Common/WaitingRoom.qml b/Fk/Pages/Common/WaitingRoom.qml index 26e4ade..de9f7dd 100644 --- a/Fk/Pages/Common/WaitingRoom.qml +++ b/Fk/Pages/Common/WaitingRoom.qml @@ -540,6 +540,17 @@ W.PageBase { } } + function restartGame(sender) { + loadPlayerData(sender); + //有人走了自动用机器人填充 + for (let i = 0; i < playerNum; i++) { + if (!isFull) { + Cpp.notifyServer("AddRobot", ""); + } + } + Cpp.notifyServer("StartGame", ""); + } + function startGame() { canKickOwner = false; kickOwnerTimer.stop(); @@ -566,6 +577,7 @@ W.PageBase { addCallback(Command.StartGame, startGame); addCallback(Command.BackToRoom, loadPlayerData); + addCallback(Command.RestartGame, restartGame); App.showToast(Lua.tr("$EnterRoom")); playerNum = Config.roomCapacity; diff --git a/Fk/Pages/LunarLTK/GameOverBox.qml b/Fk/Pages/LunarLTK/GameOverBox.qml index 96d17f7..52fae47 100644 --- a/Fk/Pages/LunarLTK/GameOverBox.qml +++ b/Fk/Pages/LunarLTK/GameOverBox.qml @@ -95,6 +95,16 @@ GraphicsBox { spacing: 15 Item { Layout.fillWidth: true } + MetroButton { + text: Lua.tr("Continue Game") + visible: !Config.observing && Config.serverEnableBot && canAddRobot + + onClicked: { + Mediator.notify(root, Command.ContinueGame); + finished(); + } + } + MetroButton { text: Lua.tr("Back To Room") visible: !Config.observing diff --git a/lua/client/i18n/zh_CN.lua b/lua/client/i18n/zh_CN.lua index c1c3fd0..15293f5 100644 --- a/lua/client/i18n/zh_CN.lua +++ b/lua/client/i18n/zh_CN.lua @@ -489,6 +489,7 @@ FreeKill使用的是libgit2的C API,与此同时使用Git完成拓展包的下 ["Impasse Strike"] = "绝境逆袭", ["Back To Room"] = "回到房间", + ["Continue Game"] = "继续游戏", ["Back To Lobby"] = "返回大厅", ["Save Replay"] = "保存录像", -- Gitee From 4e2f33fba23b8fbc97531a9d6420f47251d40630 Mon Sep 17 00:00:00 2001 From: waterfast <1301917161@qq.com> Date: Sat, 18 Oct 2025 16:20:49 +0800 Subject: [PATCH 2/3] =?UTF-8?q?10/18/=E5=9B=9E=E6=94=BE=E7=A6=81=E6=AD=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Fk/Pages/LunarLTK/GameOverBox.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Fk/Pages/LunarLTK/GameOverBox.qml b/Fk/Pages/LunarLTK/GameOverBox.qml index 52fae47..05b481f 100644 --- a/Fk/Pages/LunarLTK/GameOverBox.qml +++ b/Fk/Pages/LunarLTK/GameOverBox.qml @@ -97,14 +97,14 @@ GraphicsBox { Item { Layout.fillWidth: true } MetroButton { text: Lua.tr("Continue Game") - visible: !Config.observing && Config.serverEnableBot && canAddRobot + visible: !Config.observing && !Config.replaying && Config.serverEnableBot && canAddRobot onClicked: { Mediator.notify(root, Command.ContinueGame); finished(); } } - + MetroButton { text: Lua.tr("Back To Room") visible: !Config.observing -- Gitee From 6d71f7a8e8f8aa27218f8e814519d3ee5578b092 Mon Sep 17 00:00:00 2001 From: waterfast <1301917161@qq.com> Date: Sat, 18 Oct 2025 16:59:05 +0800 Subject: [PATCH 3/3] =?UTF-8?q?10/18/=E5=A5=87=E6=80=AAbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Fk/Pages/LunarLTK/GameOverBox.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Fk/Pages/LunarLTK/GameOverBox.qml b/Fk/Pages/LunarLTK/GameOverBox.qml index 05b481f..9d4076f 100644 --- a/Fk/Pages/LunarLTK/GameOverBox.qml +++ b/Fk/Pages/LunarLTK/GameOverBox.qml @@ -97,7 +97,7 @@ GraphicsBox { Item { Layout.fillWidth: true } MetroButton { text: Lua.tr("Continue Game") - visible: !Config.observing && !Config.replaying && Config.serverEnableBot && canAddRobot + visible: !Config.observing && !Config.replaying && Config.serverEnableBot onClicked: { Mediator.notify(root, Command.ContinueGame); -- Gitee