From 4d94ee8a938e030e5caa0b836ce1e99613254b0d Mon Sep 17 00:00:00 2001 From: Ho-spair <62695577+Ho-spair@users.noreply.github.com> Date: Tue, 27 Feb 2024 16:32:14 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=9E=E6=9D=A5=E5=90=A7=E6=88=91=E7=9A=84?= =?UTF-8?q?=E5=8D=81=E5=B8=B8=E4=BE=8D=20(#324)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 回来吧我的十常侍,我最骄傲的信仰,历历在目的休整,投降莫名在平局。 --- Fk/RoomElement/Photo.qml | 6 ++++-- lua/core/game_mode.lua | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Fk/RoomElement/Photo.qml b/Fk/RoomElement/Photo.qml index c77d0ed3..40bc5c58 100644 --- a/Fk/RoomElement/Photo.qml +++ b/Fk/RoomElement/Photo.qml @@ -442,10 +442,12 @@ Item { // id: saveme visible: (root.dead && !root.rest) || root.dying || root.surrendered source: { - if (root.dead) { + if (root.surrendered) { + return SkinBank.DEATH_DIR + "surrender"; + } else if (root.dead) { return SkinBank.getRoleDeathPic(root.role); } - return SkinBank.DEATH_DIR + (root.surrendered ? "surrender" : "saveme") + return SkinBank.DEATH_DIR + "saveme"; } anchors.centerIn: photoMask } diff --git a/lua/core/game_mode.lua b/lua/core/game_mode.lua index d8480b98..2062a1ff 100644 --- a/lua/core/game_mode.lua +++ b/lua/core/game_mode.lua @@ -27,7 +27,7 @@ end ---@param victim ServerPlayer @ 死者 ---@return string @ 胜者阵营 function GameMode:getWinner(victim) - if victim.rest > 0 then + if not victim.surrendered and victim.rest > 0 then return "" end