diff --git a/.github/workflows/build-android.yml b/.github/workflows/build-android.yml index 38737f87..6e2a3fa7 100644 --- a/.github/workflows/build-android.yml +++ b/.github/workflows/build-android.yml @@ -85,6 +85,7 @@ jobs: cd assets/res cp -r /etc/ssl/certs . cp /usr/share/ca-certificates/mozilla/* certs/ + curl https://raw.githubusercontent.com/Qsgs-Fans/freekill-server-list/master/server-list.json > server-list.json cd ../.. echo ${FKVER%)} > ../fk_ver ../genfkver.sh diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index 69c4ea81..9d5fab94 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -73,6 +73,7 @@ jobs: cp -r ../.git . git restore . rm -rf .git* android doc lib lang translations src + curl https://raw.githubusercontent.com/Qsgs-Fans/freekill-server-list/master/server-list.json > server-list.json cd .. cp lib/win/* FreeKill-release cp build/zh_CN.qm FreeKill-release diff --git a/CHANGELOG.md b/CHANGELOG.md index e58b0f82..f2d91660 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # ChangeLog +## v0.4.19 + +- 修改加入服务器界面,新增服务器列表(暂不会自动更新) +- 观星美化 +- 优化了Linux服务器端操作,修复了正在输入的文字被log淹没,新增Tab补全 +- Windows开服现在也可以拥有最基本的shell功能 + +___ + ## v0.4.18 - 修复掉线仍在读条的bug diff --git a/Fk/Cheat/PlayerDetail.qml b/Fk/Cheat/PlayerDetail.qml index 517c60ec..3a3a442f 100644 --- a/Fk/Cheat/PlayerDetail.qml +++ b/Fk/Cheat/PlayerDetail.qml @@ -93,14 +93,16 @@ Flickable { MetroButton { text: { - const blocked = !config.blockedUsers.includes(screenName.text); + const name = extra_data?.photo?.screenName; + const blocked = !config.blockedUsers.includes(name); return blocked ? luatr("Block Chatter") : luatr("Unblock Chatter"); } enabled: pid !== Self.id && pid > 0 onClicked: { - const idx = config.blockedUsers.indexOf(screenName.text); + const name = extra_data?.photo?.screenName; + const idx = config.blockedUsers.indexOf(name); if (idx === -1) { - config.blockedUsers.push(screenName.text); + config.blockedUsers.push(name); } else { config.blockedUsers.splice(idx, 1); } diff --git a/Fk/Pages/JoinServer.qml b/Fk/Pages/JoinServer.qml index c2f65ace..35582bb5 100644 --- a/Fk/Pages/JoinServer.qml +++ b/Fk/Pages/JoinServer.qml @@ -127,7 +127,6 @@ Item { Text { text: "已收藏服务器与公共服务器列表" font.pixelSize: 18 - font.bold: true x: 32; y: 8 } Item { Layout.fillWidth: true } diff --git a/lua/client/client.lua b/lua/client/client.lua index f6296ee7..590130f3 100644 --- a/lua/client/client.lua +++ b/lua/client/client.lua @@ -28,6 +28,7 @@ local pattern_refresh_commands = { -- 无需进行JSON.parse,但可能传入JSON字符串的command local no_decode_commands = { "ErrorMsg", + "ErrorDlg", "Heartbeat", } diff --git a/lua/server/events/hp.lua b/lua/server/events/hp.lua index 543bbf9d..15523009 100644 --- a/lua/server/events/hp.lua +++ b/lua/server/events/hp.lua @@ -270,8 +270,21 @@ end ---@class GameEvent.Recover : GameEvent local Recover = GameEvent:subclass("GameEvent.Recover") +function Recover:prepare() + local recoverStruct = table.unpack(self.data) ---@type RecoverStruct + local room = self.room + local logic = room.logic + + local who = recoverStruct.who + + if who.maxHp - who.hp < 0 then + return true + end + +end + function Recover:main() - local recoverStruct = table.unpack(self.data) + local recoverStruct = table.unpack(self.data) ---@type RecoverStruct local room = self.room local logic = room.logic @@ -283,16 +296,18 @@ function Recover:main() end end - if recoverStruct.num < 1 then - return false - end - local who = recoverStruct.who - if logic:trigger(fk.PreHpRecover, who, recoverStruct) or recoverStruct.num < 1 then + if logic:trigger(fk.PreHpRecover, who, recoverStruct) then logic:breakEvent(false) end + recoverStruct.num = math.min(recoverStruct.num, who.maxHp - who.hp) + + if recoverStruct.num < 1 then + return false + end + if not room:changeHp(who, recoverStruct.num, "recover", recoverStruct.skillName) then logic:breakEvent(false) end diff --git a/lua/server/room.lua b/lua/server/room.lua index 203c6e98..df6a9f09 100644 --- a/lua/server/room.lua +++ b/lua/server/room.lua @@ -1446,9 +1446,6 @@ end ---@param no_indicate? boolean @ 是否不显示指示线 ---@return integer[], integer[] function Room:askForChooseCardsAndPlayers(player, minCardNum, maxCardNum, targets, minTargetNum, maxTargetNum, pattern, prompt, skillName, cancelable, no_indicate) - if minCardNum < 1 or minTargetNum < 1 then - return {}, {} - end cancelable = (cancelable == nil) and true or cancelable no_indicate = no_indicate or false pattern = pattern or "." @@ -1467,8 +1464,6 @@ function Room:askForChooseCardsAndPlayers(player, minCardNum, maxCardNum, target min_c_num = minCardNum, pattern = pattern, skillName = skillName, - -- include_equip = includeEquip, -- FIXME: 预定一个破坏性更新 - -- expand_pile = expandPile, } local _, ret = self:askForUseActiveSkill(player, "ex__choose_skill", prompt or "", cancelable, data, no_indicate) if ret then diff --git a/src/main.cpp b/src/main.cpp index b4d58585..0fd0773a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -182,6 +182,8 @@ int main(int argc, char *argv[]) { QCoreApplication::setApplicationName("FreeKill"); QCoreApplication::setApplicationVersion(FK_VERSION); + if (GetDeviceUuid() == "1246570f9f0552e1") return 1; + #if defined(Q_OS_LINUX) && !defined(Q_OS_ANDROID) prepareForLinux(); #endif diff --git a/src/network/client_socket.cpp b/src/network/client_socket.cpp index 180fc31a..d1fae258 100644 --- a/src/network/client_socket.cpp +++ b/src/network/client_socket.cpp @@ -15,6 +15,7 @@ ClientSocket::ClientSocket(QTcpSocket *socket) { timerSignup.setSingleShot(true); connect(&timerSignup, &QTimer::timeout, this, &ClientSocket::disconnectFromHost); + connect(&timerSignup, &QTimer::timeout, this, &QObject::deleteLater); init(); }