Changelog: v0.4.15

This commit is contained in:
notify 2024-04-20 10:57:07 +08:00
parent b34343317f
commit 766e93378e
8 changed files with 44 additions and 7 deletions

View File

@ -1,9 +1,10 @@
# ChangeLog # ChangeLog
## v0.4.13 & v0.4.14 ## v0.4.13 & 14 & 15
- 优化重连逻辑 - 优化重连逻辑
- 客户端代码大量删除JSON。可能影响部分拓展 - 客户端代码大量删除JSON。可能影响部分拓展
- 各种修bug
___ ___

View File

@ -6,7 +6,7 @@
cmake_minimum_required(VERSION 3.16) cmake_minimum_required(VERSION 3.16)
project(FreeKill VERSION 0.4.14) project(FreeKill VERSION 0.4.15)
add_definitions(-DFK_VERSION=\"${CMAKE_PROJECT_VERSION}\") add_definitions(-DFK_VERSION=\"${CMAKE_PROJECT_VERSION}\")
find_package(Qt6 REQUIRED COMPONENTS find_package(Qt6 REQUIRED COMPONENTS

View File

@ -3,8 +3,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.notify.FreeKill" package="org.notify.FreeKill"
android:installLocation="preferExternal" android:installLocation="preferExternal"
android:versionCode="414" android:versionCode="415"
android:versionName="0.4.14"> android:versionName="0.4.15">
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

View File

@ -1227,3 +1227,7 @@ end
-- Create ClientInstance (used by Lua) -- Create ClientInstance (used by Lua)
ClientInstance = Client:new() ClientInstance = Client:new()
dofile "lua/client/client_util.lua" dofile "lua/client/client_util.lua"
if FileIO.pwd():endsWith("packages/freekill-core") then
FileIO.cd("../..")
end

View File

@ -201,12 +201,24 @@ end
--- 标包和标准卡牌包比较特殊,它们永远会在第一个加载。 --- 标包和标准卡牌包比较特殊,它们永远会在第一个加载。
---@return nil ---@return nil
function Engine:loadPackages() function Engine:loadPackages()
local new_core = false
if FileIO.pwd():endsWith("packages/freekill-core") then
new_core = true
FileIO.cd("../..")
end
local directories = FileIO.ls("packages") local directories = FileIO.ls("packages")
-- load standard & standard_cards first -- load standard & standard_cards first
self:loadPackage(require("packages.standard")) if new_core then
self:loadPackage(require("packages.standard_cards")) self:loadPackage(require("packages.freekill-core.standard"))
self:loadPackage(require("packages.maneuvering")) self:loadPackage(require("packages.freekill-core.standard_cards"))
self:loadPackage(require("packages.freekill-core.maneuvering"))
table.removeOne(directories, "freekill-core")
else
self:loadPackage(require("packages.standard"))
self:loadPackage(require("packages.standard_cards"))
self:loadPackage(require("packages.maneuvering"))
end
table.removeOne(directories, "standard") table.removeOne(directories, "standard")
table.removeOne(directories, "standard_cards") table.removeOne(directories, "standard_cards")
table.removeOne(directories, "maneuvering") table.removeOne(directories, "maneuvering")
@ -235,6 +247,10 @@ function Engine:loadPackages()
end end
end end
end end
if new_core then
FileIO.cd("packages/freekill-core")
end
end end
---@return nil ---@return nil

View File

@ -168,3 +168,7 @@ end
function IsConsoleStart() function IsConsoleStart()
return requestRoom.thread:isConsoleStart() return requestRoom.thread:isConsoleStart()
end end
if FileIO.pwd():endsWith("packages/freekill-core") then
FileIO.cd("../..")
end

View File

@ -27,6 +27,12 @@ Client::Client(QObject *parent) : QObject(parent), callback(0) {
router = new Router(this, socket, Router::TYPE_CLIENT); router = new Router(this, socket, Router::TYPE_CLIENT);
L = CreateLuaState(); L = CreateLuaState();
if (QFile::exists("packages/freekill-core") &&
!GetDisabledPacks().contains("freekill-core")) {
// 危险的cd操作记得在lua中切回游戏根目录
QDir::setCurrent("packages/freekill-core");
}
DoLuaScript(L, "lua/freekill.lua"); DoLuaScript(L, "lua/freekill.lua");
DoLuaScript(L, "lua/client/client.lua"); DoLuaScript(L, "lua/client/client.lua");
} }

View File

@ -17,6 +17,12 @@ RoomThread::RoomThread(Server *m_server) {
md5 = m_server->getMd5(); md5 = m_server->getMd5();
L = CreateLuaState(); L = CreateLuaState();
if (QFile::exists("packages/freekill-core") &&
!GetDisabledPacks().contains("freekill-core")) {
// 危险的cd操作记得在lua中切回游戏根目录
QDir::setCurrent("packages/freekill-core");
}
DoLuaScript(L, "lua/freekill.lua"); DoLuaScript(L, "lua/freekill.lua");
DoLuaScript(L, "lua/server/scheduler.lua"); DoLuaScript(L, "lua/server/scheduler.lua");
start(); start();