diff --git a/CHANGELOG.md b/CHANGELOG.md index e0c90953..76550506 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ ___ +## v0.3.8 + +为国战添加专属ui,修复一些bug。 + +___ + ## v0.3.7 新老bug一起修复! diff --git a/CMakeLists.txt b/CMakeLists.txt index c61172b8..ce6eb7c9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.16) -project(FreeKill VERSION 0.3.7) +project(FreeKill VERSION 0.3.8) add_definitions(-DFK_VERSION=\"${CMAKE_PROJECT_VERSION}\") find_package(Qt6 REQUIRED COMPONENTS diff --git a/android/AndroidManifest.xml b/android/AndroidManifest.xml index ef04c5d4..f196d8e8 100644 --- a/android/AndroidManifest.xml +++ b/android/AndroidManifest.xml @@ -3,8 +3,8 @@ + android:versionCode="308" + android:versionName="0.3.8"> diff --git a/lua/client/i18n/zh_CN.lua b/lua/client/i18n/zh_CN.lua index a6568bf3..14137fb5 100644 --- a/lua/client/i18n/zh_CN.lua +++ b/lua/client/i18n/zh_CN.lua @@ -288,11 +288,10 @@ FreeKill使用的是libgit2的C API,与此同时使用Git完成拓展包的下 ["Resume"] = "继续", ["Bulletin Info"] = [==[ - ## v0.3.7 + ## v0.3.8 - 0.3.7版本,修复bug,下载拓展不会闪退(但愿如此)。 + 为国战添加专属ui,修复一些bug。 - 移除了谋徐盛。 ]==], } diff --git a/lua/server/request.lua b/lua/server/request.lua index ecb421d6..54d20a2c 100644 --- a/lua/server/request.lua +++ b/lua/server/request.lua @@ -27,15 +27,6 @@ local function tellRoomToObserver(self, player) end player:doNotify("ArrangeSeats", json.encode(player_circle)) - for _, p in ipairs(self.players) do - self:notifyProperty(player, p, "general") - self:notifyProperty(player, p, "deputyGeneral") - p:marshal(player, true) - end - - player:doNotify("UpdateDrawPile", #self.draw_pile) - player:doNotify("UpdateRoundNum", self:getTag("RoundCount") or 0) - -- send printed_cards for i = -2, -math.huge, -1 do local c = Fk.printed_cards[i] @@ -44,12 +35,21 @@ local function tellRoomToObserver(self, player) end -- send card marks - for id, marks in pairs(room.card_marks) do + for id, marks in pairs(self.card_marks) do for k, v in pairs(marks) do player:doNotify("SetCardMark", json.encode{ id, k, v }) end end + for _, p in ipairs(self.players) do + self:notifyProperty(player, p, "general") + self:notifyProperty(player, p, "deputyGeneral") + p:marshal(player, true) + end + + player:doNotify("UpdateDrawPile", #self.draw_pile) + player:doNotify("UpdateRoundNum", self:getTag("RoundCount") or 0) + table.insert(self.observers, {observee.id, player, player:getId()}) end diff --git a/lua/server/serverplayer.lua b/lua/server/serverplayer.lua index 0fde879f..e07d2b90 100644 --- a/lua/server/serverplayer.lua +++ b/lua/server/serverplayer.lua @@ -346,15 +346,6 @@ function ServerPlayer:reconnect() end self:doNotify("ArrangeSeats", json.encode(player_circle)) - for _, p in ipairs(room.players) do - room:notifyProperty(self, p, "general") - room:notifyProperty(self, p, "deputyGeneral") - p:marshal(self) - end - - self:doNotify("UpdateDrawPile", #room.draw_pile) - self:doNotify("UpdateRoundNum", room:getTag("RoundCount") or 0) - -- send printed_cards for i = -2, -math.huge, -1 do local c = Fk.printed_cards[i] @@ -369,6 +360,15 @@ function ServerPlayer:reconnect() end end + for _, p in ipairs(room.players) do + room:notifyProperty(self, p, "general") + room:notifyProperty(self, p, "deputyGeneral") + p:marshal(self) + end + + self:doNotify("UpdateDrawPile", #room.draw_pile) + self:doNotify("UpdateRoundNum", room:getTag("RoundCount") or 0) + -- send fake skills for _, s in ipairs(self._manually_fake_skills) do self:doNotify("AddSkill", json.encode{ self.id, s.name, true })