diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index 631010a5..052ab74c 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -65,7 +65,7 @@ jobs: run: | mkdir FreeKill-release cp build/FreeKill.exe FreeKill-release - cp -r qml Fk FreeKill-release + cp -r Fk FreeKill-release cd FreeKill-release windeployqt FreeKill.exe cp -r ../.git . diff --git a/CHANGELOG.md b/CHANGELOG.md index 1e3723e0..b7e3add7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,22 @@ # ChangeLog + +___ + +## v0.1.9 + +1. 实现移动场上一张牌 +2. 实现用作记录牌名并可查看的mark +3. 将askForChoice和interaction的文本解析方式改为prompt +4. 新增属性将牌移至牌堆指定索引位置 +5. 修改时机“游戏开始时”至正确位置 +6. 优化衍生牌逻辑 +7. 新增“卡牌展示后”时机 +8. 修改qml文件结构 +9. 新增手气卡机制 +10. 新增大厅表情功能 +11. 新增选将时技能描述查看,以及查看卡牌描述的功能 +12. 查看角色技能描述侧栏新增“送花”和“砸蛋”功能 + ___ ## v0.1.8 diff --git a/CMakeLists.txt b/CMakeLists.txt index e846dbb6..0b5d09b7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.16) -project(FreeKill VERSION 0.1.8) +project(FreeKill VERSION 0.1.9) add_definitions(-DFK_VERSION=\"${CMAKE_PROJECT_VERSION}\") find_package(Qt6 REQUIRED COMPONENTS diff --git a/Fk/PhotoElement/MarkArea.qml b/Fk/PhotoElement/MarkArea.qml index 650d1d13..c3a6d778 100644 --- a/Fk/PhotoElement/MarkArea.qml +++ b/Fk/PhotoElement/MarkArea.qml @@ -89,16 +89,18 @@ Item { let special_value = ''; if (mark.startsWith('@$')) { - special_value = data.length; + special_value += data.length; data = data.join(','); } else { data = data instanceof Array ? data.map((markText) => Backend.translate(markText)).join(' ') : Backend.translate(data); } - if (modelItem) + if (modelItem) { + modelItem.special_value = special_value; modelItem.mark_extra = data; - else + } else { markList.append({ mark_name: mark, mark_extra: data, special_value }); + } arrangeMarks(); } diff --git a/android/AndroidManifest.xml b/android/AndroidManifest.xml index b48b2530..7a50cae2 100644 --- a/android/AndroidManifest.xml +++ b/android/AndroidManifest.xml @@ -3,8 +3,8 @@ + android:versionCode="109" + android:versionName="0.1.9"> diff --git a/android/copy_assets.sh b/android/copy_assets.sh index d75a75a4..4a6f37a5 100755 --- a/android/copy_assets.sh +++ b/android/copy_assets.sh @@ -26,7 +26,6 @@ cp -r ../packages/maneuvering assets/res/packages cp -r ../packages/test assets/res/packages rm assets/res/packages/test/test.lua cp ../packages/init.sql assets/res/packages -cp -r ../qml assets/res cp -r ../Fk assets/res mkdir assets/res/server cp ../server/init.sql assets/res/server diff --git a/lua/client/i18n/zh_CN.lua b/lua/client/i18n/zh_CN.lua index d30d9b24..4c8fae81 100644 --- a/lua/client/i18n/zh_CN.lua +++ b/lua/client/i18n/zh_CN.lua @@ -205,14 +205,18 @@ FreeKill使用的是libgit2的C API,与此同时使用Git完成拓展包的下 ["Back To Lobby"] = "返回大厅", ["Bulletin Info"] = "

更新说明

\ - 1. 实现禁将功能;(在武将一览中,点击查看武将并点击退出按钮下方的“禁将/解禁”进行操作);
\ - 2. 实现转换技,新增发动转换技动画;
\ - 3. 分离觉醒技的觉醒条件;
\ - 4. 封装不同实例卡牌的花色、点数、颜色的比较,用于处理无花色等情况;
\ - 5. 新增mark_enum.lua用于注册通用标记名;
\ - 6. 实现将特定实现列表按结算顺序排序的函数;
\ - 7. 允许UI解析值为数组的标记;
\ - 8. 初步实现不加入牌堆中的衍生卡牌(待改进)。", + 1. 实现移动场上一张牌;
\ + 2. 实现用作记录牌名并可查看的mark;
\ + 3. 将askForChoice和interaction的文本解析方式改为prompt;
\ + 4. 新增属性将牌移至牌堆指定索引位置;
\ + 5. 修改时机“游戏开始时”至正确位置;
\ + 6. 优化衍生牌逻辑;
\ + 7. 新增“卡牌展示后”时机;
\ + 8. 修改qml文件结构;
\ + 9. 新增手气卡机制;
\ + 10. 新增大厅表情功能;
\ + 11. 新增选将时技能描述查看,以及查看卡牌描述的功能;
\ + 12. 查看角色技能描述侧栏新增“送花”和“砸蛋”功能。", } -- Game concepts diff --git a/packages/test/.gitignore b/packages/test/.gitignore deleted file mode 100644 index 17f35263..00000000 --- a/packages/test/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -test.lua -test-error.txt diff --git a/src/core/packman.cpp b/src/core/packman.cpp index 27276716..e9be22fc 100644 --- a/src/core/packman.cpp +++ b/src/core/packman.cpp @@ -32,7 +32,7 @@ QString PackMan::getPackSummary() { } void PackMan::loadSummary(const QString &jsonData, bool useThread) { - static const auto f = [=]() { + auto f = [=]() { // First, disable all packages foreach (auto e, SelectFromDatabase(db, "SELECT name FROM packages;")) { disablePack(e.toObject()["name"].toString()); @@ -50,6 +50,7 @@ void PackMan::loadSummary(const QString &jsonData, bool useThread) { i++; auto obj = e.toObject(); auto name = obj["name"].toString(); + auto url = obj["url"].toString(); #ifndef FK_SERVER_ONLY Backend->showToast(tr("[%1/%2] upgrading package '%3'").arg(i).arg(arr.count()).arg(name)); #endif @@ -57,7 +58,7 @@ void PackMan::loadSummary(const QString &jsonData, bool useThread) { db, QString("SELECT name FROM packages WHERE name='%1';").arg(name)) .isEmpty()) { - downloadNewPack(obj["url"].toString()); + downloadNewPack(url); } ExecSQL(db, QString("UPDATE packages SET hash='%1' WHERE name='%2'") .arg(obj["hash"].toString()) @@ -81,7 +82,7 @@ void PackMan::loadSummary(const QString &jsonData, bool useThread) { } void PackMan::downloadNewPack(const QString &url, bool useThread) { - static const auto threadFunc = [=]() { + auto threadFunc = [=]() { int error = clone(url); if (error < 0) return; diff --git a/src/core/util.cpp b/src/core/util.cpp index a7f6e2be..9a1c52ac 100644 --- a/src/core/util.cpp +++ b/src/core/util.cpp @@ -167,15 +167,7 @@ RSA *InitServerRSA() { #endif static void writeFileMD5(QFile &dest, const QString &fname) { - QString name = fname; - // If the is a corresponding fkp file, check fkp's MD5 instead. - if (name.endsWith(".lua")) { - name.chop(4); - name = name + ".fkp"; - if (!QFile::exists(name)) - name = fname; - } - QFile f(name); + QFile f(fname); if (!f.open(QIODevice::ReadOnly)) { return; } @@ -183,7 +175,7 @@ static void writeFileMD5(QFile &dest, const QString &fname) { auto data = f.readAll(); data.replace(QByteArray("\r\n"), QByteArray("\n")); auto hash = QCryptographicHash::hash(data, QCryptographicHash::Md5).toHex(); - dest.write(name.toUtf8() + '=' + hash + ';'); + dest.write(fname.toUtf8() + '=' + hash + ';'); } static void writeDirMD5(QFile &dest, const QString &dir, @@ -222,7 +214,7 @@ QString calcFileMD5() { flist.close(); flist.open(QIODevice::ReadOnly); auto ret = QCryptographicHash::hash(flist.readAll(), QCryptographicHash::Md5); - flist.remove(); // delete flist.txt + // flist.remove(); // delete flist.txt flist.close(); return ret.toHex(); } diff --git a/src/main.cpp b/src/main.cpp index 0be1ba0e..ac98457f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -69,7 +69,7 @@ static void installFkAssets(const QString &src, const QString &dest) { #ifdef Q_OS_ANDROID copyPath(src, dest); #elif defined(Q_OS_LINUX) - system(QString("cp -r %1 %2").arg(src).arg(dest).toUtf8()); + system(QString("cp -r %1 %2/..").arg(src).arg(dest).toUtf8()); #endif }