From a6f9e903904f8116ff0fff7df1abb8f15ea1cebb Mon Sep 17 00:00:00 2001 From: Spmario233 Date: Thu, 2 May 2024 00:19:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8B=B7=E6=89=93=E7=8B=82=E7=A5=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- character/key/index.js | 11 ++--------- character/key/voices.js | 10 ++++++++++ character/key/voices.json | 10 ---------- noname/library/element/character.js | 6 ++++-- 4 files changed, 16 insertions(+), 21 deletions(-) create mode 100644 character/key/voices.js delete mode 100644 character/key/voices.json diff --git a/character/key/index.js b/character/key/index.js index 02bb6493b..a47fb31a1 100644 --- a/character/key/index.js +++ b/character/key/index.js @@ -4,7 +4,7 @@ import cards from "./card.js"; import pinyins from "./pinyin.js"; import skills from "./skill.js"; import translates from "./translate.js"; -import voices from "./voices.json"; +import voices from "./voices.js"; game.import("character", function () { return { @@ -15,14 +15,7 @@ game.import("character", function () { return mode == "chess" || mode == "tafang"; }, key_yuu(mode) { - return ( - mode == "identity" || - mode == "doudizhu" || - mode == "single" || - (mode == "versus" && - _status.mode != "standard" && - _status.mode != "three") - ); + return mode == "identity" || mode == "doudizhu" || mode == "single" || (mode == "versus" && _status.mode != "standard" && _status.mode != "three"); }, key_tomoya(mode) { return mode != "chess" && mode != "tafang" && mode != "stone"; diff --git a/character/key/voices.js b/character/key/voices.js new file mode 100644 index 000000000..412e49203 --- /dev/null +++ b/character/key/voices.js @@ -0,0 +1,10 @@ +export default { + "#yuri_xingdong1": "では、オペレーション・スターーート!!", + "#yuri_xingdong2": "では、オペレーション・スタート!", + "#yuri_xingdong3": "では、オペレーションスタート!", + "#yuri_xingdong_gain1": "…さすがね、あたしの勘。", + "#yuri_xingdong_gain2": "あたしの予想ではね。", + "#yuri_wangxi1": "賢明ね。これでようやくあなたにも戦線で戦う目的が生まれたってわけね。", + "#yuri_wangxi2": "落ち着いて…ここは地獄なんかじゃないわ。", + "#key_yuri:die": "ひどい…リーダーね。", +}; \ No newline at end of file diff --git a/character/key/voices.json b/character/key/voices.json deleted file mode 100644 index 9ac69dce4..000000000 --- a/character/key/voices.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "#yuri_xingdong1": "では、オペレーション・スターーート!!", - "#yuri_xingdong2": "では、オペレーション・スタート!", - "#yuri_xingdong3": "では、オペレーションスタート!", - "#yuri_xingdong_gain1": "…さすがね、あたしの勘。", - "#yuri_xingdong_gain2": "あたしの予想ではね。", - "#yuri_wangxi1": "賢明ね。これでようやくあなたにも戦線で戦う目的が生まれたってわけね。", - "#yuri_wangxi2": "落ち着いて…ここは地獄なんかじゃないわ。", - "#key_yuri:die": "ひどい…リーダーね。" -} \ No newline at end of file diff --git a/noname/library/element/character.js b/noname/library/element/character.js index 31cfacb86..86566ae0f 100644 --- a/noname/library/element/character.js +++ b/noname/library/element/character.js @@ -196,7 +196,6 @@ export class Character { * @param { any[] } trash */ setPropertiesFromTrash(trash) { - this.initializeTrashProperties(); const keptTrashes = [], clans = []; for (let i = 0; i < trash.length; i++) { @@ -370,18 +369,21 @@ export class Character { return new Proxy(trashes.concat(character.trashBin), { set(target, prop, newValue) { const result = Reflect.set(target, prop, newValue); + character.initializeTrashProperties(); character.setPropertiesFromTrash(target); return result; }, deleteProperty(target, prop) { const result = Reflect.deleteProperty(target, prop); + character.initializeTrashProperties(); character.setPropertiesFromTrash(target); return result; } }); } set 4(trashBin) { - console.warn("你set你🐎的废弃属性"); + this.initializeTrashProperties(); + this.setPropertiesFromTrash(trashBin); } get 5() {