diff --git a/Docs/TODO.md b/Docs/TODO.md index b766489..d5e9c15 100644 --- a/Docs/TODO.md +++ b/Docs/TODO.md @@ -3,18 +3,20 @@ ## 计划 -自动更新书本版本 -- 使用lore记录章节和版本号 √ -- 向下兼容(用书名判断版本号) -- 设置手持书本的版本指令 -- 潜行状态打开书,进入下一章 +√ 改良UI,使其能够更好兼容其它模组的特殊UI +指南书更新 √ 更好的自动生成,可以一次性导出所有页面 +√ 使用lore记录章节和版本号 +√ 无法向下兼容,因为旧书和其它成书别无二致 +√ 设置手持书本的版本指令 +- 打开书时检查版本号,和当前版本不一致则更新版本 +- 潜行状态打开书,进入下一章 + NTR工具:开墓碑 隙间 - - 物品隙间:可以放置6个方向的方块隙间 - 方块隙间:放置时原地生成一个实体隙间 - 实体隙间 diff --git a/MemorizableGensokyo/Book.js b/MemorizableGensokyo/Book.js index 5ea36a1..9c45bb4 100644 --- a/MemorizableGensokyo/Book.js +++ b/MemorizableGensokyo/Book.js @@ -32,10 +32,26 @@ export class Book { * * @param {Number} page 页数 * @param {String} value 内容 + * @param {boolean} trim */ - setLang(page, value){ + setLang(page, value, trim=true){ let key = `tlm.${Book.getSeqStr(this.bookId)}${Book.getSeqStr(page)}`; - this.langs.set(key, value); + // 去除末尾的换行和空格 + let res = value; + if(trim){ + while(true){ + if(res.endsWith(' ')){ + res = res.substring(0, res.length - 1); + } + else if(res.endsWith('%1')){ + res = res.substring(0, res.length - 2); + } + else{ + break; + } + } + } + this.langs.set(key, res); return key; } /** @@ -52,13 +68,22 @@ export class Book { /** * 导出所有语言文本 */ - exportLangs(){ + exportLangs(align){ let res = []; for(let [key, value] of this.langs){ res.push(`${key}=${value}`); } return res; } + /** + * 对齐 若页数小于所给值,则在末尾填充空text页面 + * @param {Number} n + */ + align(n){ + while(this.pages.length < n){ + this.addText(' ', false); + } + } /** * 解析一组书籍数据 * @param {Array} book @@ -71,6 +96,7 @@ export class Book { case "craft": this.addCraft(page.content, page.recipe); break; case "altar": this.addAltar(page.content, page.recipe); break; case "double_module": this.addDoubleModule(page.content, page.module1, page.module2); break; + case "placeholder": this. addPlaceholder(); break; default: break; } } @@ -78,10 +104,11 @@ export class Book { /** * 增加一个纯文本页 文本中的 \n 将会单独列出 * @param {String} text + * @param {boolean} [trim=true] */ - addText(text){ + addText(text, trim=true){ let lines = text.replace(new RegExp('\n', 'g'), "%1"); - let key = this.setLang(this.pages.length, lines); + let key = this.setLang(this.pages.length, lines, trim); this.pages.push({"rawtext":[{"translate": key,"with":["\n"]}]}); } /** @@ -147,10 +174,15 @@ export class Book { let key = this.setLang(this.pages.length, res); this.pages.push({"rawtext":[{"translate": key,"with":["\n"]}]}); } + + addPlaceholder(){ + this.addText(' ', false); + } addInvalidItem(name){ this.invalidItems.add(`${this.bookId}-${this.pages.length}-${name}`); } + //// Tools //// static resolveModule(module){ switch(module.type){ diff --git a/MemorizableGensokyo/books/en_US.js b/MemorizableGensokyo/books/en_US.js new file mode 100644 index 0000000..42daa93 --- /dev/null +++ b/MemorizableGensokyo/books/en_US.js @@ -0,0 +1,247 @@ +import {recipeList} from "../../TouHouLittleMaid_BP/scripts/data/recipes/index.js" + +export const book1 = [ +// 前言 +{ type: "text", content: +` §lOverview§r + §7(1/3)§r + A mod about the maid and the touhou project. Thanks 7z for making the UI. Thanks to people like Tartrate and Snownee for making TLM java mod. Thanks to the artists for producing excellent models. Thanks to Verclene, the author of LMM mod.` +// 目录 +}, +{ type: "text", content: +` §lCatalogue§r + +Touhou Project..............3 +Fairy Maid.............................4 +Power Point.........................5 +Gohei & Danmaku..............7 +Altar..........................................9` +}, +{type: "text", content: +`§lTouhou Project§r + The Touhou Project is a Japanese doujin game series by Sole Team Shanghai Alice member ZUN that specializes in Shoot 'em Ups. + + Touhou Wiki: https://en.touhouwiki.net/wiki/Touhou_Wiki` +// 单图 图片位置用 $image$ 表示 +}, +{ type: "img", img: 0x10, content: +`§lFairy Maid§r + The looting of this mob are important crafting ingredient. + $image$ + Spawn on the night and attack the player with danmaku.` +}, +{ type: "img", img: 0x12, content: +`§lPower Point§r + The power point is an important resource for this mod, which is obtained by killing the maid fairy Can be used for altar crafting. + $image$` +}, +{ type: "text", content: +` + You can also find some in the chest of the desert temple. + + When you holds gohei, you can see the power value above the inventory. The maximum power value is 5, and more than this number power point no longer increases.` +}, +// 工作台合成 自动区分有序/无序,但物品贴图要手动添加 $recipe$是合成表插入的位置 +{type: "craft", recipe: "hakurei_gohei.json", content: +`§lGohei and Danmaku§r + The gohei is a long-range weapon that shoots a barrage. + +$recipe$ +` +}, +{ type: "text", content: +` + When you interact with any block in sneaking mode, you can switch types. + + Due to technical limitations, the gohei made by the composite table need to be used by the other block before they can be activated.` +}, +{ type: "img", img: 0x11, content: +`§lAltar§r + The altar is the multi-block structure required for the craft of this mod. The craft also requires player's power point. + $image$` +}, +{ type: "img", img: 0x13, content: +` + Use the gohei to right click on the red wool front left of center of the fourth layer to build an altar. + + $image$` +}, +{ type: "text", content: +` You can right click on the top of each of the six pillars to place items. Jump under the pole and pick it up. When the item is fully placed and the Power value is sufficient, the altar can trigger crafting. + When crafting is interrupted due to lack of Power, replacing any material after obtaining enough Power can ` +}, +{ type: "text", content: +`trigger crafting. + There is no need to worry about forgetting to remove the material, the items on the altar will not automatically disappear.` +} + +] + +////// 第二章 ////// +export const book2 = [ +{ type: "text", content: +` + §lMaid§r + §7(2/3)§r + Introduced the basic functions of the maid.` +}, +// 目录 +{ type: "text", content: +` + §lCatalogue§r + +Spawn Maid.............................3 +Reborn Maid..........................4 +Upgrade Maid.......................5 +Camera & Photo.................7 +Chisel & Statues...............9 +Backpack.................................9 +Princess Hug....................10` +}, +// patchouli.touhou_little_maid:book.entries.maid.spawn_maid.name.name +{ type: "altar", recipe: recipeList.spawn_box, content: +`§lSpawn Maid§r + The way to get a maid is very special and needs to be done through a multi-blocks altar. + +$recipe$` +}, +{type: "text", content: +` + After the maid is successfully spawned in a multi-blocks altar, you will get a cake box wrapped with the maid, just right-click the cake box to open it. You will need a cake to tame the maid. + In the standing state, the master can switch between standby modes. A maid in standby mode` +}, +{type: "text", content: +`does nothing, not even to avoid risk. + In the sneaking state, an attack can open the information panel and interactive can open the backpack interface.` +}, +// patchouli.touhou_little_maid:book.entries.maid.film.pages.0.text.name +{ type: "altar", recipe: recipeList.reborn_maid, content: +`§lReborn Maid§r + The maid will drop a film after death, and the film can be used in altar to reborn the maid. + +$recipe$` +}, +{ type: "altar", recipe: recipeList.maid_upgrade, content: +`§lUpgrade Maid§r + Place maids who have reached 200 kills in the center of the altar and level up with Sakura Gohei and Magic Powder. + + +$recipe$` +}, +{ type: "altar", recipe: recipeList.craft_camera, content: +`§lCamera & Photo§r + Carry a maid across dimensions or at a distance is a hassle, and the camera is designed for this purpose. + +$recipe$` +}, +{ type: "text", content: +` + Just take a photo of your maid with camera and turn it into a photo, then hold the photo and right click on a block to release it. +` +}, +// patchouli.touhou_little_maid:book.entries.other.chisel_and_statues.name.name +{ type: "altar", recipe: recipeList.craft_chisel, content: +`§lChisel & Statues§r + Right-click the clay with a chisel can make statues of different sizes. Currently supports 1x1x1, 1x1x2, 2x2x4, 3x3x6 sizes. + +$recipe$` +}, +{ type: "text", content: +` + Holds a photo in offhand, chisel in mainhand, then right-clicks the lower left corner of the multi-block structure to engrave the maid in the photo. + The fire roasted 1x1 size statue can be converted into Garage Kit.` +}, +{ type: "img", img: 0x14, content: +` +$image$` +}, +{ type: "altar", recipe: recipeList.craft_maid_backpack_small, content: +`§lBackpack§r + The backpack can be used to expand the inventory of the maid. It can be applied by holding the backpack, sneaking, and right-click on the maid. + Use the shears to remove the maid's backpack.` +}, +{ type: "double_module", module1: {type: "altar", recipe: recipeList.craft_maid_backpack_small}, +module2: {type: "altar", recipe: recipeList.craft_maid_backpack_middle}, content: +`$module1$ +$module2$` +}, +{ type: "altar", recipe: recipeList.craft_maid_backpack_big, content: +` +$recipe$` +}, +{ type: "img", img: 0x15, content: +`§lPrincess Hug§r + Hold the saddle, interact with the maid, you can pick her up, interact again, you can put her down. +$image$ +` +} +] + + +////// 第三章 ////// +export const book3 = [ +{ type: "text", content: +` + §lOthers§r + §7(3/3)§r + Introduce some miscellaneous content. +` +}, +{ type: "text", content: +` + §lCatalogue§r + +Memorizable Gensokyo..1 +Gohei............................................2 +Lighting......................................3 +Gold Microwave Oven.....4` +}, +{ type: "craft", recipe: "memorizable_gensokyo.json", content: +`§lMemorizable Gensokyo§r + Book, cake. + + +$recipe$` +}, +{ type: "altar", recipe: recipeList.craft_hakurei_gohei, content: +`§lGohei (Crafting)§r + Gohei can be made at the altar at a much lower cost. + + + $recipe$` +}, +{ type: "altar", recipe: recipeList.repair_hakurei_gohei, content: +`§lGohei (repairing)§r + Gohei cannot be repaired by mending, but here's a better way without repair punishment. + +$recipe$` +}, +{ type: "altar", recipe: recipeList.gohei_cherry, content: +`§lSakura gohei§r + Gohei, sakura saplings, buckets, dirt. + + + +$recipe$` +}, +{ type: "altar", recipe: recipeList.spawn_lightning_bolt, content: +`§lLighting§r + Summon a lightning bolt. + + +$recipe$` +}, +{ type: "craft", recipe: "gold_microwaver.json", content: +`§lGold microwave oven§r + Bell, blaze powder, yellow glass, gold ingot, Ender crystal. + + +$recipe$` +}, +{ type: "craft", recipe: "dragon_skull.json", content: +`§lDragon skull§r + Lapis lazis, lightning rod, amethyst, dragon skull, chorus flower. + +$recipe$` +} +] diff --git a/MemorizableGensokyo/books/zh_CN.js b/MemorizableGensokyo/books/zh_CN.js index 4f2fb94..c7c7d33 100644 --- a/MemorizableGensokyo/books/zh_CN.js +++ b/MemorizableGensokyo/books/zh_CN.js @@ -6,48 +6,57 @@ export const book1 = [ ` §l总览§r §7(1/3)§r - 一个与女仆和东方 Project 有关的模组。 感谢酒石酸菌和雪尼等人制作的java版TouhouLittleMaid。 感谢酒石酸菌、琥珀酸、帕金伊、天顶乌、天幂、Paulzzh、尤里的猫以及其他美工制作了如此优秀的模型和材质。 感谢 Little Maid Mob 的作者 Verclene。` - - // 目录 -},{ type: "text", content: + 一个与女仆和东方 Project 有关的模组。 + 感谢7z制作的UI。感谢酒石酸菌和雪尼等人制作的java版TouhouLittleMaid。 + 感谢酒石酸菌、琥珀酸、帕金伊、天顶乌、天幂、Paulzzh、尤里的猫以及其他美工制作了如此优秀的模型和材质。 + 感谢 Little Maid Mob 的作者 Verclene。` +}, +// 目录 +{ type: "text", content: ` §l目录§r - 东方 Project____________3 女仆妖精_______________4 Power道具______________5 御币与弹幕_____________7 多方块祭坛_____________9` - -},{type: "text", content: +东方 Project.................................3 +女仆妖精........................................4 +Power道具......................................5 +御币与弹幕....................................7 +多方块祭坛....................................9` +}, +{type: "text", content: ` §l东方Project§r - 东方 Project 是日本同人社团上海爱丽丝幻乐团制作的一系列同人作品,系列以清版弹幕射击游戏为主。 + 东方 Project 是日本同人社团上海爱丽丝幻乐团制作的一系列同人作品,系列以清版弹幕射击游戏为主。 Touhou 百科: https://en.touhouwiki.net/wiki/Touhou_Wiki` // 单图 图片位置用 $image$ 表示 -},{ type: "img", img: 0x10, content: +}, +{ type: "img", img: 0x10, content: ` §l女仆妖精§r - 这个模组添加了一种怪物,怪物的掉落物是重要的合成材料。 + 这个模组添加了一种怪物,怪物的掉落物是重要的合成材料。 $image$ 在任意群系的夜晚生成,会以弹幕攻击玩家。` -},{ type: "img", img: 0x12, content: +}, +{ type: "img", img: 0x12, content: ` §lPower 道具§r - Power道具是本模组重要的资 源, 通过杀死女仆妖精来获取。 能够用于祭坛合成。 + Power道具是本模组重要的资 源, 通过杀死女仆妖精来获取。 能够用于祭坛合成。 $image$` },{ type: "text", content: ` - 也可以在沙漠神殿的箱子里找 到得点道具, 砸在地上可以爆出大 量P点。 + 也可以在沙漠神殿的箱子里找 到得点道具, 砸在地上可以爆出大 量P点。 - 当你手持御币时, 在物品栏上 方就能看到Power值。 Power值最 大为5, 超过此数值不再增长。` + 当你手持御币时, 在物品栏上 方就能看到Power值。 Power值最 大为5, 超过此数值不再增长。` // 工作台合成 自动区分有序/无序,但物品贴图要手动添加 $recipe$是合成表插入的位置 },{type: "craft", recipe: "hakurei_gohei.json", content: ` §l御币与弹幕§r - 御币是一个普通的远程武器。可以射出弹幕。 + 御币是一个普通的远程武器。可以射出弹幕。 $recipe$ ` @@ -55,17 +64,17 @@ $recipe$ },{ type: "text", content: ` - 潜行状态下与任意方块交互, + 潜行状态下与任意方块交互, 即可切换弹种。同时会收到当前弹 种的提示。 - 因技术限制, 由合成台制作的御 + 因技术限制, 由合成台制作的御 币需要先对方块使用一下才能激 活。` },{ type: "img", img: 0x11, content: ` §l多方块祭坛§r - 祭坛是本模组用于合成所必需的多方块结构,合成同时还需要玩家的power值。 + 祭坛是本模组用于合成所必需的多方块结构,合成同时还需要玩家的power值。 $image$` },{ type: "img", img: 0x13, content: @@ -77,89 +86,41 @@ $recipe$ },{ type: "text", content: ` -你可以右击六个柱子的顶端来放置物品。在柱子下跳起捡回。当物品完全放置且Power值足够,祭坛就能触发合成。 + 你可以右击六个柱子的顶端来放置物品。在柱子下跳起捡回。当物品完全放置且Power值足够,祭坛就能触发合成。 -因为缺少Power而导致的合成中断,获取足够Power后重新放置任意材料可以触发合成。 + 因为缺少Power而导致的合成中断,获取足够Power后重新放置任意材料可以触发合成。 -无需担心忘记取下材料,祭坛上的物品是不会自动消失的。` -} + 无需担心忘记取下材料,祭坛上的物品是不会自动消失的。` +}, +{ type: "placeholder"}, +{ type: "placeholder"}, +{ type: "placeholder"}, +{ type: "placeholder"}, +{ type: "placeholder"} ] + ////// 第二章 ////// export const book2 = [ -{ type: "text", content: -` - §l合成§r - §7(2/3)§r +{ type: "text", content: ` + §l女仆§r + §7(2/3)§r + 介绍女仆的基本内容。` }, +// 目录 { type: "text", content: ` §l目录§r - §7因配方较多,仅给出顺序。§r -御币(合成) 御币(修复) -落雷 樱之御币 - 《记忆中的幻想乡》 -黄金微波炉 龙头` -}, -{ type: "altar", recipe: recipeList.craft_hakurei_gohei, content: -` -§l御币 (合成)§r - 御币可以在祭坛以更低的代价合成。 - - - $recipe$` -}, -{ type: "altar", recipe: recipeList.repair_hakurei_gohei, content: -` -§l御币 (修复)§r - 御币无法被附魔经验修补,但可以消耗P点和纸回满耐久,这种修复没有惩罚。 - -$recipe$` -}, -{ type: "altar", recipe: recipeList.spawn_lightning_bolt, content: -` -§l落雷§r - 召唤一道雷电。 - - -$recipe$` -}, -{ type: "altar", recipe: recipeList.gohei_cherry, content: -` -§l樱之御币§r - 御币、樱花树苗、水桶、泥土。 - - -$recipe$` -}, -{ type: "craft", recipe: "memorizable_gensokyo.json", content: -` -§l《记忆中的幻想乡》§r - 书、蛋糕。 - - -$recipe$` -}, -{ type: "craft", recipe: "gold_microwaver.json", content: -` -§l黄金微波炉§r - 钟、烈焰粉、黄色玻璃、金锭、末影水晶。 - -$recipe$` +生成女仆........................................3 +复活女仆........................................5 +升级女仆........................................6 +相机与照片....................................7 +凿子................................................9 +女仆背包.......................................11 +公主抱..........................................13` }, -{ type: "craft", recipe: "dragon_skull.json", content: -` -§l龙头§r - 青金石、雷霆之杖、紫水晶、龙首、紫颂花。放在黄金微波炉加热获得神秘尘。 - -$recipe$` -} -] - -////// 第三章 ////// -export const book3 = [ // patchouli.touhou_little_maid:book.entries.maid.spawn_maid.name.name { type: "altar", recipe: recipeList.spawn_box, content: ` @@ -214,14 +175,14 @@ $recipe$ // patchouli.touhou_little_maid:book.entries.other.chisel_and_statues.name.name { type: "altar", recipe: recipeList.craft_chisel, content: ` -§l雕刻刀§r - 雕刻刀右击粘土可以做成不同尺寸的雕像,目前支持 1x1x1 1x1x2 2x2x4 3x3x6 +§l凿子§r + 凿子右击粘土可以做成不同尺寸的雕像,目前支持 1x1x1 1x1x2 2x2x4 3x3x6。 $recipe$` }, { type: "img", img: 0x14, content: ` - 副手持照片,主手持雕刻刀,右击多方块结构的左下角,即可雕刻出照片中的女仆。 + 副手持照片,主手持凿子,右击多方块结构的左下角,即可雕刻出照片中的女仆。 $image$ 火烤1x1大小的雕像可以转换成手办。` }, @@ -238,18 +199,98 @@ module2: {type: "altar", recipe: recipeList.craft_maid_backpack_big}, content: `$module1$ $module2$` }, -{ type: "double_module", module1: {type: "altar", recipe: recipeList.craft_maid_backpack_middle}, -module2: {type: "altar", recipe: recipeList.craft_maid_backpack_big}, content: -`$module1$ -$module2$` -}, - { type: "img", img: 0x15, content: ` -§l抱起女仆§r - 手持鞍和女仆交互即可抱起,再次交互即可放下 +§l公主抱§r + 手持鞍和女仆交互即可抱起,再次交互即可放下。 $image$ ` -} -] \ No newline at end of file +}, +{ type: "placeholder"}, +{ type: "placeholder"}, +{ type: "placeholder"}, +{ type: "placeholder"}, +{ type: "placeholder"}, +{ type: "placeholder"}, +{ type: "placeholder"} +] + +////// 第三章 ////// +export const book3 = [ +{ type: "text", content: +` + §l杂项§r + §7(3/3)§r + 介绍一些其它内容。 +` +}, +{ type: "text", content: +` + §l目录§r + +记忆中的幻想乡.............................3 +御币................................................4 +落雷................................................7 +黄金微波炉...................................8` +}, +{ type: "craft", recipe: "memorizable_gensokyo.json", content: +` +§l《记忆中的幻想乡》§r + 书、蛋糕。 + + +$recipe$` +}, +{ type: "altar", recipe: recipeList.craft_hakurei_gohei, content: +` +§l御币 (合成)§r + 御币可以在祭坛以更低的代价合成。 + + + $recipe$` +}, +{ type: "altar", recipe: recipeList.repair_hakurei_gohei, content: +` +§l御币 (修复)§r + 御币无法被附魔经验修补,但可以消耗P点和纸回满耐久,这种修复没有惩罚。 + +$recipe$` +}, +{ type: "altar", recipe: recipeList.gohei_cherry, content: +` +§l樱之御币§r + 御币、樱花树苗、水桶、泥土。 + + +$recipe$` +}, +{ type: "altar", recipe: recipeList.spawn_lightning_bolt, content: +` +§l落雷§r + 召唤一道雷电。 + + +$recipe$` +}, +{ type: "craft", recipe: "gold_microwaver.json", content: +` +§l黄金微波炉§r + 钟、烈焰粉、黄色玻璃、金锭、末影水晶。 + + +$recipe$` +}, +{ type: "craft", recipe: "dragon_skull.json", content: +` +§l龙头§r + 青金石、雷霆之杖、紫水晶、龙首、紫颂花。放在黄金微波炉加热获得神秘尘。 + +$recipe$` +}, +{ type: "placeholder"}, +{ type: "placeholder"}, +{ type: "placeholder"}, +{ type: "placeholder"}, +{ type: "placeholder"} +] diff --git a/MemorizableGensokyo/main.js b/MemorizableGensokyo/main.js index b2acec9..85c62e9 100644 --- a/MemorizableGensokyo/main.js +++ b/MemorizableGensokyo/main.js @@ -21,27 +21,94 @@ * 1. 换行使用 translate 的 %n 实现,图片则直接嵌入文本中,最大程度缩减rawtext的长度 */ -const fs = require('fs'); -const path = require('path'); +import * as fs from "fs" +import { Book } from "./Book.js"; +const key = ["book1", "book2", "book3"]; +const TEXT_PATH = "../TouHouLittleMaid_RP/texts/" +const TEXT_STARTER = "### MG_AUTO_GENERATE_START ###"; +const TEXT_ENDER = "### MG_AUTO_GENERATE_END ###"; -// 定义文件路径 -const filePathA = path.join(__dirname, 'a.json'); -const filePathB = path.join(__dirname, 'b.json'); +/** + * 写入语言文件 + * @param {String} name 如 zh_CN + * @param {String} str 语言字符串 + */ +function writeLang(name, str){ + var path = TEXT_PATH + name + ".lang"; + let res = fs.readFileSync(path, "utf-8"); -// 读取a.json文件 -fs.readFile(filePathA, 'utf8', (err, data) => { - if (err) { - console.error('读取a.json文件时发生错误:', err); - return; + let starter = res.indexOf(TEXT_STARTER); + let ender = res.indexOf(TEXT_ENDER); + if(starter >= 0 && ender >= 0){ + res = res.substring(0, starter) + TEXT_STARTER + '\n' + str + res.substring(ender); } - - // 将读取到的数据写入到b.json文件中 - fs.writeFile(filePathB, data, 'utf8', (err) => { + else{ + res += TEXT_STARTER + "\n"; + res += str + "\n"; + res += TEXT_ENDER + "\n"; + } + + fs.writeFile(path, res, 'utf8', (err) => { if (err) { - console.error('写入b.json文件时发生错误:', err); + console.error(`写入${path}.lang文件时发生错误: `, err); return; } - - console.log('文件写入成功,b.json已创建并包含a.json的内容。'); }); -}); \ No newline at end of file +} + +// 读取books/xxx.js文件 +let files = fs.readdirSync("./books"); +let books = {}; +for (let index = 0; index < files.length; index++) { + const element = files[index]; + + console.log(element); + // import 加载 + books[element] = await import(`./books/${element}`); +} + +// 获取最大page数 +let maxPage = new Array(key.length).fill(0); + +for(let i = 0; i < key.length; i++){ + for(let lang in books){ + maxPage[i] = Math.max(maxPage[i], books[lang][key[i]].length); + } +} + +/** + * 处理 + * page和lang对齐最长的,页数少的语言补空格 + * page输出最长的,lang分语言输出到对应的mc text文件中 + * pages.txt + * zh_CN.lang + * en_US.lang + */ +let pageStr = ""; +let pageExported = false; +for(let name in books){// 对每本书 + let langStr = ""; + for(let i = 0; i < 3; i++){ // 的每种语言 + // 解析 + let k = key[i]; + let book = books[name]; + let b = new Book(i); + b.resolve(book[k]); + b.align(maxPage[i]); + + // 输出 + langStr += b.exportLangs().join('\n') + '\n\n'; + if(!pageExported) pageStr += b.exportPages().join('\n') + "\n\n"; + } + // 写入lang文件 + writeLang(name.replace('.js', ''), langStr); + pageExported = true; +} + +// 写入page文件 +fs.writeFile("./output/pages.txt", pageStr, 'utf8', (err) => { + if (err) { + console.error('写入pages.txt文件时发生错误:', err); + return; + } +}); diff --git a/MemorizableGensokyo/output/pages.txt b/MemorizableGensokyo/output/pages.txt new file mode 100644 index 0000000..1a3baf4 --- /dev/null +++ b/MemorizableGensokyo/output/pages.txt @@ -0,0 +1,53 @@ +{"rawtext":[{"translate":"tlm.00","with":["\n"]}]} +{"rawtext":[{"translate":"tlm.01","with":["\n"]}]} +{"rawtext":[{"translate":"tlm.02","with":["\n"]}]} +{"rawtext":[{"translate":"tlm.03","with":["\n"]}]} +{"rawtext":[{"translate":"tlm.04","with":["\n"]}]} +{"rawtext":[{"translate":"tlm.05","with":["\n"]}]} +{"rawtext":[{"translate":"tlm.06","with":["\n"]}]} +{"rawtext":[{"translate":"tlm.07","with":["\n"]}]} +{"rawtext":[{"translate":"tlm.08","with":["\n"]}]} +{"rawtext":[{"translate":"tlm.09","with":["\n"]}]} +{"rawtext":[{"translate":"tlm.0a","with":["\n"]}]} +{"rawtext":[{"translate":"tlm.0b","with":["\n"]}]} +{"rawtext":[{"translate":"tlm.0c","with":["\n"]}]} +{"rawtext":[{"translate":"tlm.0d","with":["\n"]}]} +{"rawtext":[{"translate":"tlm.0e","with":["\n"]}]} +{"rawtext":[{"translate":"tlm.0f","with":["\n"]}]} + +{"rawtext":[{"translate":"tlm.10","with":["\n"]}]} +{"rawtext":[{"translate":"tlm.11","with":["\n"]}]} +{"rawtext":[{"translate":"tlm.12","with":["\n"]}]} +{"rawtext":[{"translate":"tlm.13","with":["\n"]}]} +{"rawtext":[{"translate":"tlm.14","with":["\n"]}]} +{"rawtext":[{"translate":"tlm.15","with":["\n"]}]} +{"rawtext":[{"translate":"tlm.16","with":["\n"]}]} +{"rawtext":[{"translate":"tlm.17","with":["\n"]}]} +{"rawtext":[{"translate":"tlm.18","with":["\n"]}]} +{"rawtext":[{"translate":"tlm.19","with":["\n"]}]} +{"rawtext":[{"translate":"tlm.1a","with":["\n"]}]} +{"rawtext":[{"translate":"tlm.1b","with":["\n"]}]} +{"rawtext":[{"translate":"tlm.1c","with":["\n"]}]} +{"rawtext":[{"translate":"tlm.1d","with":["\n"]}]} +{"rawtext":[{"translate":"tlm.1e","with":["\n"]}]} +{"rawtext":[{"translate":"tlm.1f","with":["\n"]}]} +{"rawtext":[{"translate":"tlm.1g","with":["\n"]}]} +{"rawtext":[{"translate":"tlm.1h","with":["\n"]}]} +{"rawtext":[{"translate":"tlm.1i","with":["\n"]}]} +{"rawtext":[{"translate":"tlm.1j","with":["\n"]}]} + +{"rawtext":[{"translate":"tlm.20","with":["\n"]}]} +{"rawtext":[{"translate":"tlm.21","with":["\n"]}]} +{"rawtext":[{"translate":"tlm.22","with":["\n"]}]} +{"rawtext":[{"translate":"tlm.23","with":["\n"]}]} +{"rawtext":[{"translate":"tlm.24","with":["\n"]}]} +{"rawtext":[{"translate":"tlm.25","with":["\n"]}]} +{"rawtext":[{"translate":"tlm.26","with":["\n"]}]} +{"rawtext":[{"translate":"tlm.27","with":["\n"]}]} +{"rawtext":[{"translate":"tlm.28","with":["\n"]}]} +{"rawtext":[{"translate":"tlm.29","with":["\n"]}]} +{"rawtext":[{"translate":"tlm.2a","with":["\n"]}]} +{"rawtext":[{"translate":"tlm.2b","with":["\n"]}]} +{"rawtext":[{"translate":"tlm.2c","with":["\n"]}]} +{"rawtext":[{"translate":"tlm.2d","with":["\n"]}]} + diff --git a/TouHouLittleMaid_BP/scripts/index.js b/TouHouLittleMaid_BP/scripts/index.js index a130275..6c71fce 100644 --- a/TouHouLittleMaid_BP/scripts/index.js +++ b/TouHouLittleMaid_BP/scripts/index.js @@ -14,6 +14,7 @@ import { MaidTarget } from "./src/maid/MaidTarget" import { CommandManager } from './src/controller/Command' import { GarageKit } from "./src/blocks/GarageKit"; +import { MemorizableGensokyo } from "./src/book/MemorizableGensokyoUI"; if(true){ @@ -191,29 +192,45 @@ class thlm { CustomSpellCardManger.onSpellCardUseEvent(event); } else if(item.typeId.substring(0, 9) === "minecraft"){ - return; switch(item.typeId.substring(10)){ + // 指南书更新 case "written_book":{ let lore = item.getLore(); - if(lore !== undefined){ - let version = lore[0]; - if(version.substring(0, 3) === "MG_"){ - version = version.substring(3); - version = version.split('.'); // 章节.版本,如 0.1 : 总览第一版 - if(config.memorizable_gensokyo[parseInt(version[0])] > parseInt(version[1])){ - Tool.setPlayerMainHand(event.source); - event.source.runCommand(`structure load memorizable_gensokyo_${parseInt(version[0])} ~~~`); - Tool.ActionbarMessage.translate("message.touhou_little_maid.mg.update"); // 指南书版本已更新 + if(lore !== undefined && lore.length===1){ + lore = lore[0]; + if(lore.substring(0, 10) === "§t§l§m§m§g"){ + lore = lore.substring(10).replace(new RegExp('§', 'g'), ''); + lore = lore.split('_'); + + let chapter = parseInt(lore[0]); + let pl = event.source; + // 下一章 + if(pl.isSneaking){ + if(item.amount===1) Tool.setPlayerMainHand(pl); + else{ + item.amount--; + Tool.setPlayerMainHand(pl, item); + } + pl.runCommand(`structure load tlm_mg${chapter===3 ? 1 : chapter+1} ~-0.5~1~-0.5`); } - } - } - else{ - // 旧版本的书 - if(item.nameTag.substring(0, 7) === "记忆中的幻想乡"){ + // 版本检测 + else{ + let version = parseInt(lore[1]); + if(config.memorizable_gensokyo[chapter-1] > parseInt(version)){ + if(item.amount===1) Tool.setPlayerMainHand(pl); + else{ + item.amount--; + Tool.setPlayerMainHand(pl, item); + } + pl.runCommand(`structure load tlm_mg${chapter} ~-0.5~1~-0.5`); + Tool.ActionbarMessage.translate(pl, "message.touhou_little_maid.mg.update"); // 指南书版本已更新 + } + } } } }; break; + case "splash_potion": MemorizableGensokyo.sendForm(event.source); break; default: break; } } diff --git a/TouHouLittleMaid_BP/scripts/src/book/MemorizableGensokyoUI.js b/TouHouLittleMaid_BP/scripts/src/book/MemorizableGensokyoUI.js index 61d2bc4..31ee6a1 100644 --- a/TouHouLittleMaid_BP/scripts/src/book/MemorizableGensokyoUI.js +++ b/TouHouLittleMaid_BP/scripts/src/book/MemorizableGensokyoUI.js @@ -1,104 +1,39 @@ import { ItemStack, Player } from "@minecraft/server"; import { config } from "../controller/Config"; import { getPlayerMainHand, lore2Str, str2Lore } from "../libs/ScarletToolKit"; - -const glyph1 = config.glyph * 0x100; -const glyph2 = glyph1 + 0x100; -const bookItem = "touhou_little_maid:memorizable_gensokyo" -/** - * 语言切换 - * 跳页 - * 再次打开时的阅读位置记录(记在lore里) - */ +import * as mcui from '@minecraft/server-ui'; export class MemorizableGensokyo{ /** - * @param {Player} player - */ - constructor(player){ - this.player = player; - - let book = this.getBook(); - if(book===undefined) return false; - - // 使用物品初始化数据 - let lore = book.getLore(); - if(lore.length === 0){ - this.config = new BookConfig(); - } - else{ - this.config = new BookConfig(lore2Str(lore)); - } - - return true; - } - /** - * 将当前设置写入书本物品 - * @returns {ItemStack|undefined} - */ - writeItem(){ - let book = this.getBook(); - if(book===undefined) return false; - book.setLore(str2Lore(this.config.toString())); - return book; - } - /** - * 获取玩家主手的书本物品,若不是书本则返回 undefined - * @returns {ItemStack|undefined} - */ - getBook(){ - let bookItem = getPlayerMainHand(this.player); - if(bookItem === undefined || bookItem.typeId !== bookItem) return undefined; - return bookItem; - } - /** - * 展示一页 - * @param {Object} pageData - */ - showPage(pageData){ - - } - /** - * 主目录 + * + * @param {Player} pl */ - main(){ - - } - - general(){ - - } - - maid(){ - - } - - others(){ - - } -} - -class BookConfig{ - values = { - "l": 0, // language - "c": 0, // chapter - "p": 0 // page - } - constructor(){} - constructor(str){ - this.values = JSON.parse(str); - } - toString(){ - return JSON.stringify(this.values); - } - - setLanguage(value){ - this.values["l"] = value; - } - setChapter(value){ - this.values["c"] = value; - } - setPage(value){ - this.values["p"] = value; + static sendForm(pl){ + const form = new mcui.ActionFormData() + .title('/TLM_B A') + .body('12') + .button("Chapter1") + .button("Chapter2") + .button({"rawtext":[{"translate":"tlm.00","with":["\n"]}]}) + .button({"rawtext":[{"translate":"tlm.01","with":["\n"]}]}) + .button({"rawtext":[{"translate":"tlm.02","with":["\n"]}]}) + .button({"rawtext":[{"translate":"tlm.03","with":["\n"]}]}) + .button({"rawtext":[{"translate":"tlm.04","with":["\n"]}]}) + .button({"rawtext":[{"translate":"tlm.05","with":["\n"]}]}) + .button({"rawtext":[{"translate":"tlm.06","with":["\n"]}]}) + .button({"rawtext":[{"translate":"tlm.07","with":["\n"]}]}) + form.show(pl).then((response)=>{ + + }); + + // const form2 = new mcui.ModalFormData() + // .title('/TLM_B A') + // .dropdown("a", ["a", "b"]) + // .submitButton("确 认") + + // form2.show(pl).then((response)=>{ + + // }); + } } \ No newline at end of file diff --git a/TouHouLittleMaid_BP/scripts/src/book/pages/general.js b/TouHouLittleMaid_BP/scripts/src/book/pages/general.js deleted file mode 100644 index f2e874d..0000000 --- a/TouHouLittleMaid_BP/scripts/src/book/pages/general.js +++ /dev/null @@ -1,106 +0,0 @@ -import { recipeList } from "../../../data/recipes/index" - -/** - * 在 rawtext 中提供 font 图片接口,只需要输入后两位编号即可自动生成图片字符 - * 键名: "font" - */ - -export const chapter = { - "id": "general", - "title": "General", - "pages":[ - // 首页 总览 - { - "title": "me.chapter1.page1.title", - "content": [ - { - "type": "rawtext", - "rawtext":[ - {"text":"\n"}, - {"translate":"me.chapter1.page1.title"}, {"text":"\n"}, - {"translate":"me.chapter1.title.page"}, {"text":"\n"}, - {"translate":"me.chapter1.page1.text"} - ] - } - ] - }, - // 目录 - { - "title": "me.chapter1.page2.title", - "content": [ - { // 东方project - "type": "button", - "text": {"rawtext": [{"translate": ""}]}, - "on_click":{ "type": "page", "chapter": "general", "index": 2 } - }, - { // 女仆妖精 - "type": "button", - "text": {"rawtext": [{"translate": ""}]}, - "on_click":{ "type": "page", "chapter": "general", "index": 3 } - }, - { // Power 道具 - "type": "button", - "text": {"rawtext": [{"translate": ""}]}, - "on_click":{ "type": "page", "chapter": "general", "index": 4 } - }, - { // 御币与弹幕 - "type": "button", - "text": {"rawtext": [{"translate": ""}]}, - "on_click":{ "type": "page", "chapter": "general", "index": 5 } - }, - { // 多方块祭坛 - "type": "button", - "text": {"rawtext": [{"translate": ""}]}, - "on_click":{ "type": "page", "chapter": "general", "index": 6 } - } - ] - }, - // 东方 Project - { - "title": "me.chapter1.page3.title", - "content": [ - { - "type": "rawtext", - "rawtext":[ - {"text":"\n"}, - {"translate":"me.chapter1.page3.title"},{"text":"\n"}, - {"translate":"me.chapter1.page3.text1"},{"text":"\n\n"}, - {"translate":"me.chapter1.page3.text2"} - ] - } - ] - }, - // 女仆妖精 - { - "title": "me.c1.p4.ti", - "type": "rawtext", - "content":[ - {"text":"\n"},{"translate":"me.c1.p4.t1"}, - {"text":"\n\n\n\n"},{"translate":"me.c1.p4.t2"}, - {"text":"\n\n\n\n"},{"translate":"me.c1.p4.t3"} - ] - }, - // Power 道具 - // 御币与弹幕 - // 多方块祭坛 - - { - "title": "祭坛合成", - "type": "altar", - "desc_pre" : {}, // 前置 rawtext - "recipe" : recipeList.spawn_lightning_bolt, // 合成表 - "desc_tail": {} // 后置 rawtext - }, - { - "title": "工作台合成", - "type": "craft", - "desc_pre" : {}, // 前置 rawtext - "recipe" : [ - [0,0,0], - [0,0,0], - [0,0,0] - ], // 合成表 - "desc_tail": {} // 后置 rawtext - } - ] -} diff --git a/TouHouLittleMaid_BP/scripts/src/controller/Command.js b/TouHouLittleMaid_BP/scripts/src/controller/Command.js index 91db363..65e2bbb 100644 --- a/TouHouLittleMaid_BP/scripts/src/controller/Command.js +++ b/TouHouLittleMaid_BP/scripts/src/controller/Command.js @@ -19,10 +19,38 @@ export class CommandManager{ case "thlm:admin" : this.admin(event) ; break; case "thlm:test" : this.test(event) ; break; case "thlm:info" : this.info(event) ; break; + case "thlm:mg" : this.memorizableGensokyo(event) ; break; + case "thlm:mg_get" : this.memorizableGensokyo_get(event); break; case "thlm:debug" : this.debug(event) ; break; default: break; } } + /** + * 设置书本版本 + * @param {ScriptEventCommandMessageAfterEvent} event + */ + static memorizableGensokyo(event){ + let pl = event.sourceEntity; + let version = "" + for(let i = 0; i < event.message.length; i++){ + version += "§" + event.message[i]; + } + let item = Tool.getPlayerMainHand(pl); + // [tlmmg] + let versionStr = `§t§l§m§m§g${version}`; + item.setLore([versionStr]); + Tool.setPlayerMainHand(pl, item); + pl.sendMessage(versionStr.replace(new RegExp('§', 'g'), '*')); + } + /** + * 设置书本版本 + * @param {ScriptEventCommandMessageAfterEvent} event + */ + static memorizableGensokyo_get(event){ + let pl = event.sourceEntity; + let item = Tool.getPlayerMainHand(pl); + pl.sendMessage(item.getLore()[0].replace(new RegExp('§', 'g'), '')); + } /** * 设置皮肤包 * scriptevent thlm:skin_set 6,19,20 diff --git a/TouHouLittleMaid_BP/structures/MG_1_edit.mcstructure b/TouHouLittleMaid_BP/structures/MG_1_edit.mcstructure deleted file mode 100644 index 46e25a3..0000000 Binary files a/TouHouLittleMaid_BP/structures/MG_1_edit.mcstructure and /dev/null differ diff --git a/TouHouLittleMaid_BP/structures/MG_2_edit.mcstructure b/TouHouLittleMaid_BP/structures/MG_2_edit.mcstructure deleted file mode 100644 index 03b7173..0000000 Binary files a/TouHouLittleMaid_BP/structures/MG_2_edit.mcstructure and /dev/null differ diff --git a/TouHouLittleMaid_BP/structures/MG_edit.mcstructure b/TouHouLittleMaid_BP/structures/MG_edit.mcstructure new file mode 100644 index 0000000..3e3070b Binary files /dev/null and b/TouHouLittleMaid_BP/structures/MG_edit.mcstructure differ diff --git a/TouHouLittleMaid_BP/structures/memorizable_gensokyo_1.mcstructure b/TouHouLittleMaid_BP/structures/memorizable_gensokyo_1.mcstructure deleted file mode 100644 index 476faad..0000000 Binary files a/TouHouLittleMaid_BP/structures/memorizable_gensokyo_1.mcstructure and /dev/null differ diff --git a/TouHouLittleMaid_BP/structures/memorizable_gensokyo_2.mcstructure b/TouHouLittleMaid_BP/structures/memorizable_gensokyo_2.mcstructure deleted file mode 100644 index 9adb47b..0000000 Binary files a/TouHouLittleMaid_BP/structures/memorizable_gensokyo_2.mcstructure and /dev/null differ diff --git a/TouHouLittleMaid_BP/structures/tlm_mg1.mcstructure b/TouHouLittleMaid_BP/structures/tlm_mg1.mcstructure new file mode 100644 index 0000000..0ac5055 Binary files /dev/null and b/TouHouLittleMaid_BP/structures/tlm_mg1.mcstructure differ diff --git a/TouHouLittleMaid_BP/structures/tlm_mg2.mcstructure b/TouHouLittleMaid_BP/structures/tlm_mg2.mcstructure new file mode 100644 index 0000000..3e89bbe Binary files /dev/null and b/TouHouLittleMaid_BP/structures/tlm_mg2.mcstructure differ diff --git a/TouHouLittleMaid_BP/structures/tlm_mg3.mcstructure b/TouHouLittleMaid_BP/structures/tlm_mg3.mcstructure new file mode 100644 index 0000000..0f95e4b Binary files /dev/null and b/TouHouLittleMaid_BP/structures/tlm_mg3.mcstructure differ diff --git a/TouHouLittleMaid_RP/texts/en_us.lang b/TouHouLittleMaid_RP/texts/en_us.lang index 0473aa4..8d164f2 100644 --- a/TouHouLittleMaid_RP/texts/en_us.lang +++ b/TouHouLittleMaid_RP/texts/en_us.lang @@ -888,3 +888,62 @@ chat_bubble.touhou_little_maid.cold.1=So Cold... chat_bubble.touhou_little_maid.rain.1=Raining chat_bubble.touhou_little_maid.snow.1=Snowing chat_bubble.touhou_little_maid.hurt.1=OUCH! + +tlm.mg1=Memorizable Gensokyo +tlm.mg2=Memorizable Gensokyo +tlm.mg3=Memorizable Gensokyo +### MG_AUTO_GENERATE_START ### +tlm.00= §lOverview§r%1 §7(1/3)§r%1 A mod about the maid and the touhou project. Thanks 7z for making the UI. Thanks to people like Tartrate and Snownee for making TLM java mod. Thanks to the artists for producing excellent models. Thanks to Verclene, the author of LMM mod. +tlm.01= §lCatalogue§r%1%1Touhou Project..............3%1Fairy Maid.............................4%1Power Point.........................5%1Gohei & Danmaku..............7%1Altar..........................................9 +tlm.02=§lTouhou Project§r%1 The Touhou Project is a Japanese doujin game series by Sole Team Shanghai Alice member ZUN that specializes in Shoot 'em Ups.%1%1 Touhou Wiki: https://en.touhouwiki.net/wiki/Touhou_Wiki +tlm.03=§lFairy Maid§r%1 The looting of this mob are important crafting ingredient.%1 %1%1%1 %1%1%1%1 Spawn on the night and attack the player with danmaku. +tlm.04=§lPower Point§r%1 The power point is an important resource for this mod, which is obtained by killing the maid fairy Can be used for altar crafting.%1 %1%1%1  +tlm.05=%1 You can also find some in the chest of the desert temple.%1%1 When you holds gohei, you can see the power value above the inventory. The maximum power value is 5, and more than this number power point no longer increases. +tlm.06=§lGohei and Danmaku§r%1 The gohei is a long-range weapon that shoots a barrage.%1%1%1   %1  %1     %1%1    +tlm.07=%1 When you interact with any block in sneaking mode, you can switch types.%1%1 Due to technical limitations, the gohei made by the composite table need to be used by the other block before they can be activated. +tlm.08=§lAltar§r%1 The altar is the multi-block structure required for the craft of this mod. The craft also requires player's power point.%1 %1%1%1  +tlm.09=%1 Use the gohei to right click on the red wool front left of center of the fourth layer to build an altar.%1%1 %1%1%1  +tlm.0a= You can right click on the top of each of the six pillars to place items. Jump under the pole and pick it up. When the item is fully placed and the Power value is sufficient, the altar can trigger crafting.%1 When crafting is interrupted due to lack of Power, replacing any material after obtaining enough Power can +tlm.0b=trigger crafting.%1 There is no need to worry about forgetting to remove the material, the items on the altar will not automatically disappear. +tlm.0c= +tlm.0d= +tlm.0e= +tlm.0f= + +tlm.10=%1 §lMaid§r%1 §7(2/3)§r%1 Introduced the basic functions of the maid. +tlm.11=%1 §lCatalogue§r%1%1Spawn Maid.............................3%1Reborn Maid..........................4%1Upgrade Maid.......................5%1Camera & Photo.................7%1Chisel & Statues...............9%1Backpack.................................9%1Princess Hug....................10 +tlm.12=§lSpawn Maid§r%1 The way to get a maid is very special and needs to be done through a multi-blocks altar.%1%1%1 %1     %1%1   §cP:0.50§r +tlm.13=%1 After the maid is successfully spawned in a multi-blocks altar, you will get a cake box wrapped with the maid, just right-click the cake box to open it. You will need a cake to tame the maid.%1 In the standing state, the master can switch between standby modes. A maid in standby mode +tlm.14=does nothing, not even to avoid risk.%1 In the sneaking state, an attack can open the information panel and interactive can open the backpack interface. +tlm.15=§lReborn Maid§r%1 The maid will drop a film after death, and the film can be used in altar to reborn the maid.%1%1%1 %1     %1%1   §cP:0.50§r +tlm.16=§lUpgrade Maid§r%1 Place maids who have reached 200 kills in the center of the altar and level up with Sakura Gohei and Magic Powder.%1%1%1%1 %1     %1%1   §cP:0.50§r +tlm.17=§lCamera & Photo§r%1 Carry a maid across dimensions or at a distance is a hassle, and the camera is designed for this purpose. %1%1%1 %1     %1%1   §cP:0.20§r +tlm.18=%1 Just take a photo of your maid with camera and turn it into a photo, then hold the photo and right click on a block to release it. +tlm.19=§lChisel & Statues§r%1 Right-click the clay with a chisel can make statues of different sizes. Currently supports 1x1x1, 1x1x2, 2x2x4, 3x3x6 sizes.%1%1%1 %1     %1%1   §cP:0.20§r +tlm.1a=%1 Holds a photo in offhand, chisel in mainhand, then right-clicks the lower left corner of the multi-block structure to engrave the maid in the photo.%1 The fire roasted 1x1 size statue can be converted into Garage Kit. +tlm.1b=%1%1%1%1  +tlm.1c=§lBackpack§r%1 The backpack can be used to expand the inventory of the maid. It can be applied by holding the backpack, sneaking, and right-click on the maid.%1 Use the shears to remove the maid's backpack. +tlm.1d=%1 %1     %1%1   §cP:0.10§r%1%1%1 %1     %1%1   §cP:0.20§r +tlm.1e=%1%1 %1     %1%1   §cP:0.30§r +tlm.1f=§lPrincess Hug§r%1 Hold the saddle, interact with the maid, you can pick her up, interact again, you can put her down.%1%1%1%1  +tlm.1g= +tlm.1h= +tlm.1i= +tlm.1j= + +tlm.20=%1 §lOthers§r%1 §7(3/3)§r%1 Introduce some miscellaneous content. +tlm.21=%1 §lCatalogue§r%1%1Memorizable Gensokyo..1%1Gohei............................................2%1Lighting......................................3%1Gold Microwave Oven.....4 +tlm.22=§lMemorizable Gensokyo§r%1 Book, cake.%1%1%1%1   %1  %1     %1%1    +tlm.23=§lGohei (Crafting)§r%1 Gohei can be made at the altar at a much lower cost.%1%1%1 %1 %1     %1%1   §cP:0.15§r +tlm.24=§lGohei (repairing)§r%1 Gohei cannot be repaired by mending, but here's a better way without repair punishment.%1%1%1 %1     %1%1   §cP:0.10§r +tlm.25=§lSakura gohei§r%1 Gohei, sakura saplings, buckets, dirt.%1%1%1%1%1 %1     %1%1   §cP:2.00§r +tlm.26=§lLighting§r%1 Summon a lightning bolt.%1%1%1%1 %1     %1%1   §cP:0.20§r +tlm.27=§lGold microwave oven§r%1 Bell, blaze powder, yellow glass, gold ingot, Ender crystal.%1%1%1%1   %1  %1     %1%1    +tlm.28=§lDragon skull§r%1 Lapis lazis, lightning rod, amethyst, dragon skull, chorus flower.%1%1%1   %1  %1     %1%1    +tlm.29= +tlm.2a= +tlm.2b= +tlm.2c= +tlm.2d= + +### MG_AUTO_GENERATE_END ### diff --git a/TouHouLittleMaid_RP/texts/zh_CN.lang b/TouHouLittleMaid_RP/texts/zh_CN.lang index c37a9d6..109183a 100644 --- a/TouHouLittleMaid_RP/texts/zh_CN.lang +++ b/TouHouLittleMaid_RP/texts/zh_CN.lang @@ -656,6 +656,7 @@ top.touhou_little_maid:entity_maid.task.name=模式: top.touhou_little_maid:entity_maid.invulnerable.name=无敌 patchouli.touhou_little_maid:book.name.name=记忆中的幻想乡 patchouli.touhou_little_maid:book.landing_text.name=一个与女仆和东方 Project 有关的模组。$(br2)感谢雪尼在代码方面的帮助。$(br)感谢琥珀酸、帕金伊、天顶乌、天幂、Paulzzh、尤里的猫以及其他美工制作了如此优秀的模型和材质。$(br)感谢 Little Maid Mob 的作者 Verclene。 + patchouli.touhou_little_maid:book.categories.maid.name.name=女仆概览 patchouli.touhou_little_maid:book.categories.maid.description.name=介绍女仆的基本内容 patchouli.touhou_little_maid:book.categories.other.name.name=其他内容 @@ -728,35 +729,62 @@ patchouli.touhou_little_maid:book.entries.other.power_point.pages.0.text.name= patchouli.touhou_little_maid:book.entries.other.camera_and_photo.name.name=相机与照片 patchouli.touhou_little_maid:book.entries.other.camera_and_photo.pages.0.text.name=在跨维度或者远距离携带女仆是一个麻烦的事情,相机就是为此设计的。$(br2)只需要用相机对着自己的女仆拍摄就能将其变成照片,之后拿着照片对着方块右击又可以将其释放出来。 -tlm.00=%1 §l总览§r%1 §7(1/3)§r%1 一个与女仆和东方 Project 有关的模组。 感谢酒石酸菌和雪尼等人制作的java版TouhouLittleMaid。 感谢酒石酸菌、琥珀酸、帕金伊、天顶乌、天幂、Paulzzh、尤里的猫以及其他美工制作了如此优秀的模型和材质。 感谢 Little Maid Mob 的作者 Verclene。 -tlm.01=%1 §l目录§r%1%1 东方 Project____________3 女仆妖精_______________4 Power道具______________5 御币与弹幕_____________7 多方块祭坛_____________9 -tlm.02=%1§l东方Project§r%1 东方 Project 是日本同人社团上海爱丽丝幻乐团制作的一系列同人作品,系列以清版弹幕射击游戏为主。%1%1 Touhou 百科: https://en.touhouwiki.net/wiki/Touhou_Wiki -tlm.03=%1§l女仆妖精§r%1 这个模组添加了一种怪物,怪物的掉落物是重要的合成材料。%1 %1%1%1 %1%1%1%1 在任意群系的夜晚生成,会以弹幕攻击玩家。 -tlm.04=%1§lPower 道具§r%1 Power道具是本模组重要的资 源, 通过杀死女仆妖精来获取。 能够用于祭坛合成。%1 %1%1%1 %1%1%1 -tlm.05=%1%1 也可以在沙漠神殿的箱子里找 到得点道具, 砸在地上可以爆出大 量P点。%1%1 当你手持御币时, 在物品栏上 方就能看到Power值。 Power值最 大为5, 超过此数值不再增长。 -tlm.06=%1§l御币与弹幕§r%1 御币是一个普通的远程武器。可以射出弹幕。%1%1%1   %1  %1     %1%1   %1%1 -tlm.07=%1%1 潜行状态下与任意方块交互,%1即可切换弹种。同时会收到当前弹%1种的提示。%1%1 因技术限制, 由合成台制作的御%1币需要先对方块使用一下才能激%1活。 -tlm.08=%1§l多方块祭坛§r%1 祭坛是本模组用于合成所必需的多方块结构,合成同时还需要玩家的power值。%1 %1%1%1 %1%1%1 -tlm.09=%1%1 使用御币右击第四层中间偏左的红色羊毛正面,能够构建祭坛。%1%1 %1%1%1 %1%1%1 -tlm.0a=%1你可以右击六个柱子的顶端来放置物品。在柱子下跳起捡回。当物品完全放置且Power值足够,祭坛就能触发合成。%1%1因为缺少Power而导致的合成中断,获取足够Power后重新放置任意材料可以触发合成。%1%1无需担心忘记取下材料,祭坛上的物品是不会自动消失的。 - -tlm.10=%1 §l合成§r%1 §7(2/3)§r%1 -tlm.11=%1 §l目录§r%1 §7因配方较多,仅给出顺序。§r %1御币(合成) 御币(修复)%1落雷 樱之御币%1 《记忆中的幻想乡》%1黄金微波炉 龙头 -tlm.12=%1§l御币 (合成)§r%1 御币可以在祭坛以更低的代价合成。%1%1%1 %1 %1     %1%1   §cP:0.15§r%1 -tlm.13=%1§l御币 (修复)§r%1 御币无法被附魔经验修补,但可以消耗P点和纸回满耐久,这种修复没有惩罚。%1%1%1 %1     %1%1   §cP:0.10§r%1 -tlm.14=%1§l落雷§r%1 召唤一道雷电。%1%1%1%1 %1     %1%1   §cP:0.20§r%1 -tlm.15=%1§l樱之御币§r%1 御币、樱花树苗、水桶、泥土。%1%1%1%1 %1     %1%1   §cP:2.00§r%1 -tlm.16=%1§l《记忆中的幻想乡》§r%1 书、蛋糕。%1%1%1%1   %1  %1     %1%1   %1 -tlm.17=%1§l黄金微波炉§r%1 钟、烈焰粉、黄色玻璃、金锭、末影水晶。%1%1%1%1   %1  %1     %1%1   %1 -tlm.18=%1§l龙头§r%1 青金石、雷霆之杖、紫水晶、龙首、紫颂花。放在黄金微波炉加热获得神秘尘。%1%1%1   %1  %1     %1%1   %1 - -tlm.20=%1§l生成女仆§r%1 获取女仆的方式非常特殊,而且必须通过多方块祭坛。%1%1%1 %1     %1%1   §cP:0.50§r%1 -tlm.21=%1 成功生成女仆后,会得到一个包装着女仆的蛋糕盒。%1%1 右击蛋糕盒即可将女仆释放出来,你需要一块蛋糕才能驯服她。%1%1 主人在站立状态下交互能够切换待命模式。待命模式下的女仆什么也不会做,哪怕是规避风险。%1 在潜行状态下攻击即可打开信息面板,交互则是打开背包界面。%1 -tlm.22=%1§l复活女仆§r%1 女仆会在阵亡后掉落胶片,胶片可在祭坛中合成来复活女仆。%1%1%1%1 %1     %1%1   §cP:0.50§r%1 -tlm.23=%1§l升级女仆§r%1 将击杀数到达200的女仆放在祭坛中央,放上樱之御币和神秘尘即可升级。%1%1%1 %1     %1%1   §cP:0.50§r%1 -tlm.24=%1§l相机与照片§r%1 跨维度或远距离携带女仆是一件麻烦的事情,相机应运而生。%1%1%1%1 %1     %1%1   §cP:0.20§r%1%1 -tlm.25=%1%1 用相机对着自己的女仆拍摄就能将其变成照片,之后拿着照片对方块右击,又可以将其释放出来。%1 -tlm.26=%1§l雕刻刀§r%1 雕刻刀右击粘土可以做成不同尺寸的雕像,目前支持 1x1x1 1x1x2 2x2x4 3x3x6%1%1%1 %1     %1%1   §cP:0.20§r%1 -tlm.27=%1 副手持照片,主手持雕刻刀,右击多方块结构的左下角,即可雕刻出照片中的女仆。%1%1%1%1 %1%1%1%1 火烤1x1大小的雕像可以转换成手办。 -tlm.28=%1§l女仆背包§r%1 背包能够拓展女仆的物品栏。只需要在潜行双胎下手持背包右击女仆,即可装备上对应的背包。%1 使用剪刀来移除女仆的背包。%1%1%1 %1     %1%1   §cP:0.10§r%1 -tlm.29=%1 %1     %1%1   §cP:0.20§r%1%1%1 %1     %1%1   §cP:0.30§r%1 \ No newline at end of file + +tlm.mg1=记忆中的幻想乡 +tlm.mg2=记忆中的幻想乡 +tlm.mg3=记忆中的幻想乡 +### MG_AUTO_GENERATE_START ### +tlm.00=%1 §l总览§r%1 §7(1/3)§r%1 一个与女仆和东方 Project 有关的模组。 %1 感谢7z制作的UI。感谢酒石酸菌和雪尼等人制作的java版TouhouLittleMaid。 %1 感谢酒石酸菌、琥珀酸、帕金伊、天顶乌、天幂、Paulzzh、尤里的猫以及其他美工制作了如此优秀的模型和材质。%1 感谢 Little Maid Mob 的作者 Verclene。 +tlm.01=%1 §l目录§r%1%1东方 Project.................................3%1女仆妖精........................................4%1Power道具......................................5%1御币与弹幕....................................7%1多方块祭坛....................................9 +tlm.02=%1§l东方Project§r%1 东方 Project 是日本同人社团上海爱丽丝幻乐团制作的一系列同人作品,系列以清版弹幕射击游戏为主。%1%1 Touhou 百科: https://en.touhouwiki.net/wiki/Touhou_Wiki +tlm.03=%1§l女仆妖精§r%1 这个模组添加了一种怪物,怪物的掉落物是重要的合成材料。%1 %1%1%1 %1%1%1%1 在任意群系的夜晚生成,会以弹幕攻击玩家。 +tlm.04=%1§lPower 道具§r%1 Power道具是本模组重要的资 源, 通过杀死女仆妖精来获取。 能够用于祭坛合成。%1 %1%1%1  +tlm.05=%1%1 也可以在沙漠神殿的箱子里找 到得点道具, 砸在地上可以爆出大 量P点。%1%1 当你手持御币时, 在物品栏上 方就能看到Power值。 Power值最 大为5, 超过此数值不再增长。 +tlm.06=%1§l御币与弹幕§r%1 御币是一个普通的远程武器。可以射出弹幕。%1%1%1   %1  %1     %1%1    +tlm.07=%1%1 潜行状态下与任意方块交互,%1即可切换弹种。同时会收到当前弹%1种的提示。%1%1 因技术限制, 由合成台制作的御%1币需要先对方块使用一下才能激%1活。 +tlm.08=%1§l多方块祭坛§r%1 祭坛是本模组用于合成所必需的多方块结构,合成同时还需要玩家的power值。%1 %1%1%1  +tlm.09=%1%1 使用御币右击第四层中间偏左的红色羊毛正面,能够构建祭坛。%1%1 %1%1%1  +tlm.0a=%1 你可以右击六个柱子的顶端来放置物品。在柱子下跳起捡回。当物品完全放置且Power值足够,祭坛就能触发合成。%1%1 因为缺少Power而导致的合成中断,获取足够Power后重新放置任意材料可以触发合成。%1%1 无需担心忘记取下材料,祭坛上的物品是不会自动消失的。 +tlm.0b= +tlm.0c= +tlm.0d= +tlm.0e= +tlm.0f= + +tlm.10=%1 §l女仆§r%1 §7(2/3)§r%1 介绍女仆的基本内容。 +tlm.11=%1 §l目录§r%1%1生成女仆........................................3%1复活女仆........................................5%1升级女仆........................................6%1相机与照片....................................7%1凿子................................................9%1女仆背包.......................................11%1公主抱..........................................13 +tlm.12=%1§l生成女仆§r%1 获取女仆的方式非常特殊,而且必须通过多方块祭坛。%1%1%1 %1     %1%1   §cP:0.50§r +tlm.13=%1 成功生成女仆后,会得到一个包装着女仆的蛋糕盒。%1%1 右击蛋糕盒即可将女仆释放出来,你需要一块蛋糕才能驯服她。%1%1 主人在站立状态下交互能够切换待命模式。待命模式下的女仆什么也不会做,哪怕是规避风险。%1 在潜行状态下攻击即可打开信息面板,交互则是打开背包界面。 +tlm.14=%1§l复活女仆§r%1 女仆会在阵亡后掉落胶片,胶片可在祭坛中合成来复活女仆。%1%1%1%1 %1     %1%1   §cP:0.50§r +tlm.15=%1§l升级女仆§r%1 将击杀数到达200的女仆放在祭坛中央,放上樱之御币和神秘尘即可升级。%1%1%1 %1     %1%1   §cP:0.50§r +tlm.16=%1§l相机与照片§r%1 跨维度或远距离携带女仆是一件麻烦的事情,相机应运而生。%1%1%1%1 %1     %1%1   §cP:0.20§r +tlm.17=%1%1 用相机对着自己的女仆拍摄就能将其变成照片,之后拿着照片对方块右击,又可以将其释放出来。 +tlm.18=%1§l凿子§r%1 凿子右击粘土可以做成不同尺寸的雕像,目前支持 1x1x1 1x1x2 2x2x4 3x3x6。%1%1%1 %1     %1%1   §cP:0.20§r +tlm.19=%1 副手持照片,主手持凿子,右击多方块结构的左下角,即可雕刻出照片中的女仆。%1%1%1%1 %1%1%1%1 火烤1x1大小的雕像可以转换成手办。 +tlm.1a=%1§l女仆背包§r%1 背包能够拓展女仆的物品栏。只需要在潜行双胎下手持背包右击女仆,即可装备上对应的背包。%1 使用剪刀来移除女仆的背包。%1%1%1 %1     %1%1   §cP:0.10§r +tlm.1b=%1 %1     %1%1   §cP:0.20§r%1%1%1 %1     %1%1   §cP:0.30§r +tlm.1c=%1§l公主抱§r%1 手持鞍和女仆交互即可抱起,再次交互即可放下。%1%1%1%1%1  +tlm.1d= +tlm.1e= +tlm.1f= +tlm.1g= +tlm.1h= +tlm.1i= +tlm.1j= + +tlm.20=%1 §l杂项§r%1 §7(3/3)§r%1 介绍一些其它内容。 +tlm.21=%1 §l目录§r%1%1记忆中的幻想乡.............................3%1御币................................................4%1落雷................................................7%1黄金微波炉...................................8 +tlm.22=%1§l《记忆中的幻想乡》§r%1 书、蛋糕。%1%1%1%1   %1  %1     %1%1    +tlm.23=%1§l御币 (合成)§r%1 御币可以在祭坛以更低的代价合成。%1%1%1 %1 %1     %1%1   §cP:0.15§r +tlm.24=%1§l御币 (修复)§r%1 御币无法被附魔经验修补,但可以消耗P点和纸回满耐久,这种修复没有惩罚。%1%1%1 %1     %1%1   §cP:0.10§r +tlm.25=%1§l樱之御币§r%1 御币、樱花树苗、水桶、泥土。%1%1%1%1 %1     %1%1   §cP:2.00§r +tlm.26=%1§l落雷§r%1 召唤一道雷电。%1%1%1%1 %1     %1%1   §cP:0.20§r +tlm.27=%1§l黄金微波炉§r%1 钟、烈焰粉、黄色玻璃、金锭、末影水晶。%1%1%1%1   %1  %1     %1%1    +tlm.28=%1§l龙头§r%1 青金石、雷霆之杖、紫水晶、龙首、紫颂花。放在黄金微波炉加热获得神秘尘。%1%1%1   %1  %1     %1%1    +tlm.29= +tlm.2a= +tlm.2b= +tlm.2c= +tlm.2d= + +### MG_AUTO_GENERATE_END ### \ No newline at end of file diff --git a/TouHouLittleMaid_RP/ui/_ui_defs.json b/TouHouLittleMaid_RP/ui/_ui_defs.json index ed8e43e..aeadb05 100644 --- a/TouHouLittleMaid_RP/ui/_ui_defs.json +++ b/TouHouLittleMaid_RP/ui/_ui_defs.json @@ -2,6 +2,8 @@ "ui_defs": [ "ui/form/thlm_menu.json", "ui/form/header.json", - "ui/container/maid_backpack.json" + "ui/container/maid_backpack.json", + "ui/form/tlm_book_screen.json", + "ui/form/index.json" ] } diff --git a/TouHouLittleMaid_RP/ui/form/index.json b/TouHouLittleMaid_RP/ui/form/index.json new file mode 100644 index 0000000..7d90486 --- /dev/null +++ b/TouHouLittleMaid_RP/ui/form/index.json @@ -0,0 +1,28 @@ +{ + "namespace": "tlm_server_form", + + "long_form_replacement": { + "type": "panel", + "size": [0, 0], + "controls": [ + { "thlm_main@form_type": { "$min": "/M ", "$max": "/M 􀐏", "$content": "thlm_menu.main" } }, + { "thlm_book@form_type": { "$min": "/TLM_B ", "$max": "/TLM_B 􀐏", "$content": "thlm_book.book_screen" } } + ] + }, + "form_type": { + "type": "panel", + "size": [ 480, 240], + "anchor_from": "center", + "anchor_to": "center", + "controls": [{ "content@$content": {} }], + "bindings": [ + { "binding_name": "#title_text" }, + { + "binding_type": "view", + "source_property_name": "(#title_text = $min) or (#title_text > $min and #title_text < $max)", + "target_property_name": "#visible" + }, + { "binding_type": "view", "source_property_name": "(#title_text - $min)", "target_property_name": "#title" } + ] + } +} \ No newline at end of file diff --git a/TouHouLittleMaid_RP/ui/form/tlm_book_screen.json b/TouHouLittleMaid_RP/ui/form/tlm_book_screen.json new file mode 100644 index 0000000..0aa09ac --- /dev/null +++ b/TouHouLittleMaid_RP/ui/form/tlm_book_screen.json @@ -0,0 +1,1119 @@ +/******************************************************** +* (c) Mojang. All rights reserved * +* (c) Microsoft. All rights reserved. * +*********************************************************/ + +{ + "namespace": "thlm_book", + + // ----------------------------------------------- + // EDU + // ----------------------------------------------- + + "screenshot": { + "type": "image", + "texture_file_system": "$screenshot_file_system", + "layer": 3, + + "$screenshot_binding|default": [ + { + "binding_name": "#screenshot_path", + "binding_name_override": "#texture", + "binding_type": "collection", + "binding_collection_name": "book_pages" + } + ], + "bindings": "$screenshot_binding" + }, + + "screenshot_frame": { + "type": "image", + "texture": "$screenshot_frame_texture", + "layer": 1, + "$caption_enabled|default": true, + + "controls": [ + { + "caption_edit@thlm_book.page_caption": { + "layer": 3, + "visible": "$caption_enabled" + } + } + ] + }, + + "photo_corner": { + "type": "image", + "size": [ 19, 19 ], + "layer": 1 + }, + + "photo_corner_bl@thlm_book.photo_corner": { + "texture": "textures/ui/photo_corner_bl", + "offset": [ -1, 1 ], + "anchor_to": "bottom_left", + "anchor_from": "bottom_left" + }, + + "photo_corner_br@thlm_book.photo_corner": { + "texture": "textures/ui/photo_corner_br", + "offset": [ 1, 1 ], + "anchor_to": "bottom_right", + "anchor_from": "bottom_right" + }, + + "photo_corner_tr@thlm_book.photo_corner": { + "texture": "textures/ui/photo_corner_tr", + "offset": [ 1, -1 ], + "anchor_to": "top_right", + "anchor_from": "top_right" + }, + + "photo_corner_tl@thlm_book.photo_corner": { + "texture": "textures/ui/photo_corner_tl", + "offset": [ -1, -1 ], + "anchor_to": "top_left", + "anchor_from": "top_left" + }, + + "page_caption@thlm_book.page_text_edit": { + "size": [ "100%-20px", 22 ], + "offset": [ 0, 0 ], + "anchor_from": "bottom_middle", + "anchor_to": "bottom_middle", + + "$text_alignment": "center" + }, + + "page_photo": { + "type": "panel", + "layer": 1, + // Photos are square, so use x for y size + "size": [ "100%-32px", "100%x" ], + "offset": [ 0, -2 ], + "controls": [ + { "screenshot@thlm_book.screenshot": {} }, + { "screenshot_frame@thlm_book.screenshot_frame": { "layer": 4 } }, + { "photo_corner_bl@thlm_book.photo_corner_bl": { "layer": 5 } }, + { "photo_corner_br@thlm_book.photo_corner_br": { "layer": 5 } }, + { "photo_corner_tl@thlm_book.photo_corner_tl": { "layer": 5 } }, + { "photo_corner_tr@thlm_book.photo_corner_tr": { "layer": 5 } } + ] + }, + + // An individual photo in the From Portfolio grid on the add photo screen + "pick_item@common.empty_panel": { + "type": "panel", + "size": [ 100, 100 ], + "$screenshot_binding": [ + { + "binding_name": "#item_screenshot_path", + "binding_name_override": "#texture", + "binding_type": "global" + }, + { + "binding_type": "collection_details", + "binding_collection_name": "pick_item_column_collection", + "binding_collection_prefix": "pick_item_column" + }, + { + "binding_type": "collection_details", + "binding_collection_name": "pick_item_row_collection", + "binding_collection_prefix": "pick_item_row" + } + ], + "controls": [ + { + "photo@thlm_book.page_photo": { + "size": [ "100% - 8px", "100% - 8px" ], + "bindings": [], + "$caption_enabled": false + } + }, + { + "button": { + "type": "button", + "size": [ "100% - 8px", "100% - 8px" ], + "bindings": [ + { + "binding_type": "collection_details", + "binding_collection_name": "pick_item_column_collection", + "binding_collection_prefix": "pick_item_column" + }, + { + "binding_type": "collection_details", + "binding_collection_name": "pick_item_row_collection", + "binding_collection_prefix": "pick_item_row" + } + ], + "button_mappings": [ + { + "from_button_id": "button.menu_select", + "to_button_id": "button.picked", + "mapping_type": "pressed" + } + ] + } + } + ] + }, + + // An individual photo in the From Inventory grid on the add photo screen + "pick_item_inventory": { + "type": "panel", + "size": [ 100, 100 ], + "$screenshot_binding": [ + { + "binding_name": "#inventory_screenshot_path", + "binding_name_override": "#texture", + "binding_type": "global" + }, + { + "binding_type": "collection_details", + "binding_collection_name": "pick_inventory_column_collection", + "binding_collection_prefix": "pick_inventory_column" + }, + { + "binding_type": "collection_details", + "binding_collection_name": "pick_inventory_row_collection", + "binding_collection_prefix": "pick_inventory_row" + } + ], + "controls": [ + { + "photo@thlm_book.page_photo": { + "size": [ "100% - 8px", "100% - 8px" ], + "bindings": [], + "$caption_enabled": false + } + }, + { + "button": { + "type": "button", + "size": [ "100% - 8px", "100% - 8px" ], + "bindings": [ + { + "binding_type": "collection_details", + "binding_collection_name": "pick_inventory_column_collection", + "binding_collection_prefix": "pick_inventory_column" + }, + { + "binding_type": "collection_details", + "binding_collection_name": "pick_inventory_row_collection", + "binding_collection_prefix": "pick_inventory_row" + } + ], + "button_mappings": [ + { + "from_button_id": "button.menu_select", + "to_button_id": "button.picked_inventory", + "mapping_type": "pressed" + }, + { + "from_button_id": "button.menu_ok", + "to_button_id": "button.picked_inventory", + "mapping_type": "focused" + } + ] + } + } + ] + }, + + "header": { + "type": "label", + "max_size": [ "100%", "default" ], + "size": [ "default", "default" ], + "color": "$book_page_number_color", + "text": "$header_text" + }, + + "text_centering_panel_inventory": { + "type": "panel", + "size": [ "100%", "100%c" ], + "controls": [ + { + "inventory_header@thlm_book.header": { + "$header_text": "thlm_book.headerInventory" + } + } + ] + }, + + "text_centering_panel_portfolio": { + "type": "panel", + "size": [ "100%", "100%c" ], + "controls": [ + { + "portfolio_header@thlm_book.header": { + "$header_text": "thlm_book.headerPortfolio" + } + } + ] + }, + + // From Inventory and From Portfolio headers and photo grids on the add photo screen + "pick_scrolling_content": { + "type": "stack_panel", + "controls": [ + { + "inventory_header@thlm_book.text_centering_panel_inventory": { + } + }, + { + "inventory_grid@edu_common.stack_panel_grid": { + "$grid_collection_prefix": "pick_inventory", + "$stack_grid_item": "thlm_book.pick_item_inventory" + } + }, + { + "portfolio_header@thlm_book.text_centering_panel_portfolio": { + } + }, + { + "portfolio_grid@edu_common.stack_panel_grid": { + "$grid_collection_prefix": "pick_item", + "$stack_grid_item": "thlm_book.pick_item" + } + } + ] + }, + + // Background, scrollbar, and close button for the add photo screen + "pick_panel": { + "type": "image", + "texture": "textures/ui/book_frame", + "size": [ 225, 231 ], + + "controls": [ + { + "scroll@common.scrolling_panel": { + "$show_background": false, + "$scrolling_pane_size": [ "100% - 16px", "100% - 30px" ], + "$scrolling_pane_offset": [ 8, 21 ], + "$scrolling_content": "thlm_book.pick_scrolling_content" + } + }, + { + "close_button@thlm_book.close_button": { + "offset": [ -7, 7 ] + } + } + ] + }, + + // ----------------------------------------------- + // Background + // ----------------------------------------------- + + "blank": { + "type": "image", + "layer": 4 + }, + "book_spine_image": { + "type": "image", + "layer": 1, + "texture": "textures/ui/book_spine" + }, + + "page_crease_left_image": { + "type": "image", + "layer": 3, + "anchor_from": "right_middle", + "anchor_to": "right_middle", + "texture": "textures/ui/book_pagecrease_left" + }, + + "page_crease_right_image": { + "type": "image", + "layer": 3, + "anchor_from": "left_middle", + "anchor_to": "left_middle", + "texture": "textures/ui/book_pagecrease_right" + }, + + "page_edge_left_image": { + "type": "image", + "layer": 2, + "anchor_from": "left_middle", + "anchor_to": "left_middle", + "texture": "textures/ui/book_pageedge_left" + }, + + "page_edge_right_image": { + "type": "image", + "layer": 2, + "anchor_from": "right_middle", + "anchor_to": "right_middle", + "texture": "textures/ui/book_pageedge_right" + }, + + "text_edit_hover_image": { + "type": "image", + "layer": 4, + "texture": "textures/ui/book_texteditbox_hover" + }, + + // ----------------------------------------------- + // Button + // ----------------------------------------------- + + "book_buttons_panel": { + "type": "panel", + "controls": [ + { + "sign_button@common_buttons.light_text_form_fitting_button": { + "$form_fitting_min_size": [ 100, 0 ], + "$pressed_button_name": "button.sign_book", + "$button_text": "thlm_book.signButton", + + "bindings": [ + { + "binding_name": "#editable", + "binding_name_override": "#visible" + } + ] + } + }, + { + "export_button@common_buttons.light_text_form_fitting_button": { + "ignored": "(not $education_edition)", + + "$form_fitting_min_size": [ 100, 0 ], + "$pressed_button_name": "button.export_book", + "$button_text": "thlm_book.export", + + "bindings": [ + { + "binding_name": "(not #editable)", + "binding_name_override": "#visible" + } + ] + } + }, + { + "im_content_button@im_reader.reader_button": { + "ignored": "(not $education_edition)", + + "size": [ "100%y", "100%sm" ], + "anchor_from": "bottom_right", + "anchor_to": "bottom_right" + } + } + ] + }, + + "cover_buttons_stack_panel_holder": { + "type": "panel", + "size": [ "100%", "100%c" ], + "controls": [ + { + "cover_buttons_stack_panel": { + "type": "stack_panel", + "orientation": "horizontal", + "size": [ "100%c", 20 ], + "controls": [ + { + "finalize_button@common_buttons.light_text_form_fitting_button": { + "$form_fitting_min_size": [ 100, 0 ], + "$pressed_button_name": "button.finalize", + "$button_text": "thlm_book.finalizeButton", + + "bindings": [ + { + "binding_name": "#finalize_button_enabled", + "binding_name_override": "#enabled" + } + ] + } + }, + { + "padding_1": { + "type": "panel", + "size": [ 10, "100%" ] + } + }, + { + "cancel_sign_button@common_buttons.light_text_form_fitting_button": { + "$form_fitting_min_size": [ 100, 0 ], + "$pressed_button_name": "button.book_exit", + "$button_text": "gui.cancel" + } + } + ] + } + } + ] + }, + + "close_button_default": { + "type": "image", + "texture": "textures/ui/close_button_default", + "color": "$portfolio_close_color" + }, + + "close_button_hover": { + "type": "image", + "texture": "textures/ui/close_button_hover" + }, + + "close_button_pressed": { + "type": "image", + "texture": "textures/ui/close_button_pressed" + }, + + + // ----------------------------------------------- + // Content + // ----------------------------------------------- + + "page_text_edit@common.multiline_text_edit_box": { + "layer": 4, + "$text_box_text_color": "$book_page_text_color", + "$color": "$book_page_text_color", + "$disabled_alpha": 1.0, + + "constrain_to_rect": true, + + "$text_edit_box_content_binding_type": "collection", + "$text_edit_box_grid_collection_name": "book_pages", + "$text_box_enabled_binding_name": "#editable", + "$text_box_name": "#page_text_box", + "$text_background_default": "thlm_book.blank", + "$text_edit_box_content_binding_name": "#text_box_item_name", + + "$text_background_hover": "thlm_book.text_edit_hover_image", + "$text_edit_box_focusable_binding_name": "#editable", + + "$enable_profanity_filter": true + }, + + "page_text@thlm_book.page_text_edit": { + "size": [ "100%-32px", "100%-58px" ], + "offset": [ 0, 23 ], + "anchor_from": "top_middle", + "anchor_to": "top_middle", + "$text_edit_box_focusable_binding_name": "#editable", + + "$text_edit_visible_binding_name": "#is_text_page", + "$text_edit_visible_binding_collection_name": "book_pages", + "$text_edit_visible_binding_type|default": "collection", + + "$enable_profanity_filter": true + }, + + "page_number_label": { + "type": "label", + "offset": [ 0, 13 ], + "layer": 5, + "color": "$book_page_number_color", + "anchor_from": "top_middle", + "anchor_to": "top_middle", + + "localize": false, + "text": "#page_number", + + "bindings": [ + { + "binding_name": "#page_number", + "binding_type": "collection", + "binding_collection_name": "book_pages" + }, + { + "binding_type": "collection_details", + "binding_collection_name": "book_pages" + } + ] + }, + + // Padded button for edit panel, as when the button disappears, its padding needs to as well + "padded_button": { + "type": "panel", + "size": [ "100%c + 2px", "100%c" ], + "$button_bind_type": "global", + "controls": [ + { + "button@thlm_book.base_button": { + "size": "$button_size" + } + } + ], + "bindings": [ + { + "binding_name": "$button_active", + "binding_name_override": "#visible", + "binding_type": "$button_bind_type", + "binding_collection_name": "book_pages" + }, + { + "binding_type": "collection_details", + "binding_collection_name": "book_pages" + } + ] + }, + "title_label": { + "type": "label", + "offset": [ 0, 30 ], + "layer": 2, + "anchor_to": "top_middle", + "anchor_from": "top_middle", + "text": "thlm_book.editTitle", + "color": "$book_title_label_color", + + "bindings": [ + { + "binding_name": "#editable", + "binding_name_override": "#visible" + } + ] + }, + + "title_text_box@common.text_edit_box": { + "size": [ "100% - 20px", 14 ], + "offset": [ 0, 46 ], + "layer": 2, + "anchor_to": "top_middle", + "anchor_from": "top_middle", + + "max_length": "$max_title_length", + + "$text_alignment": "center", + "$place_holder_text": "thlm_book.titleHere", + "$text_box_text_color": "$book_title_color", + "$place_holder_text_color": "$book_title_placeholder_color", + "$color": "$book_title_color", + "$text_box_name": "#title_text_box", + "$text_box_enabled_binding_name": "#editable", + + "$text_edit_box_content_binding_name": "#title_text_box_item_name", + "$text_background_default": "thlm_book.blank", + "$text_background_hover": "thlm_book.text_edit_hover_image", + + "$enable_profanity_filter": true + }, + + "author_label": { + "type": "label", + "size": [ "default", 18 ], + "offset": [ 0, 4 ], + + "text": "thlm_book.byAuthor", + "color": "$book_author_label_color" + }, + + "author_text_box@common.text_edit_box": { + "size": [ "100% - 1px", "100%" ], + "offset": [ 1, 0 ], + "layer": 3, + + "constrain_to_rect": true, + + "$text_alignment": "left", + "$text_box_text_color": "$book_author_color", + "$color": "$book_author_color", + "$text_box_name": "#author_text_box", + "$text_box_enabled_binding_name": "#author_editable", + "$text_edit_box_content_binding_name": "#author_text_box_item_name", + + "$text_background_default": "thlm_book.blank", + "$text_background_hover": "thlm_book.text_edit_hover_image", + + "$enable_profanity_filter": true + }, + + "author_stack_panel": { + "type": "stack_panel", + "size": [ "100% - 26px", 0 ], + "offset": [ 0, 62 ], + "layer": 2, + "anchor_to": "top_middle", + "anchor_from": "top_middle", + + "orientation": "horizontal", + + "controls": [ + { + "author_label_panel": { + "type": "panel", + "size": [ "100%c", "100%c" ], + + "controls": [ + { "author_label@thlm_book.author_label": {} } + ] + } + }, + { + "author_text_panel": { + "type": "panel", + "size": [ "fill", 18 ], + "controls": [ + { "author_text_box@thlm_book.author_text_box": {} } + ] + } + } + ] + }, + + "warning_label": { + "type": "label", + "offset": [ 0, 86 ], + "size": [ "100%-30px", "100%" ], + "layer": 2, + "anchor_to": "top_middle", + "anchor_from": "top_middle", + + "text": "thlm_book.finalizeWarning", + "text_alignment": "left", + "color": "$book_warning_color", + + "bindings": [ + { + "binding_name": "#editable", + "binding_name_override": "#visible" + } + ] + }, + + "cover_content_panel": { + "type": "panel", + + "controls": [ + { "title_label@thlm_book.title_label": {} }, + { "title_text_box@thlm_book.title_text_box": {} }, + { "author_stack_panel@thlm_book.author_stack_panel": {} }, + { "warning_label@thlm_book.warning_label": {} } + ] + }, + + // ----------------------------------------------- + // Screen + // ----------------------------------------------- + + "cover_and_buttons_panel": { + "type": "panel", + "size": [ "100%", "100%" ], + "max_size": [ "100%", 231 ], + + "controls": [ + { + "cover_panel": { + "type": "panel", + "size": "$page_size", + "max_size": [ 320, "100% - 20px" ], + "anchor_from": "top_middle", + "anchor_to": "top_middle", + + "$book_background_image|default": "textures/ui/book_cover", + "controls": [ + { "cover_content_panel@thlm_book.cover_content_panel": {} }, + { + "book_background": { + "type": "image", + "layer": 1, + "texture": "$book_background_image" + } + }, + { + "close_button@thlm_book.close_button": { + "offset": [ -5, 5 ] + } + } + ] + } + }, + { + "cover_buttons_stack_panel_holder@thlm_book.cover_buttons_stack_panel_holder": { + "anchor_from": "bottom_middle", + "anchor_to": "bottom_middle" + } + } + ] + }, + + + //// 根部 //// + "root_panel": { + "type": "panel", + "layer": 1 + }, + "book_screen@common.base_screen": { + "$close_on_player_hurt|default": true, + "close_on_player_hurt": "$close_on_player_hurt", + "button_mappings": [ + { + "from_button_id": "button.menu_exit", + "to_button_id": "button.book_exit", + "mapping_type": "global" + }, + { + "from_button_id": "button.menu_cancel", + "to_button_id": "button.book_exit", + "mapping_type": "global" + }, + { + "from_button_id": "button.menu_tab_left", + "to_button_id": "button.prev_page", + "mapping_type": "global" + }, + { + "from_button_id": "button.menu_tab_right", + "to_button_id": "button.next_page", + "mapping_type": "global" + } + ], + "$screen_content": "thlm_book.book_screen_content" + }, + "book_screen_content": { + "type": "panel", + "controls": [ + { + "root_panel@thlm_book.root_panel": { + "$book_size": [ 320, 207 ], + "$page_size": [ 160, 207 ], + + "controls": [ + { + "book_and_buttons_panel@thlm_book.book_and_buttons_panel": { + "bindings": [ + { + "binding_name": "#viewing", + "binding_name_override": "#visible" + } + ] + } + } + ] + } + } + ] + }, + + //// 根内容 //// + "book_and_buttons_panel": { + "type": "panel", + "size": [ "100%cm", "100%" ], + "max_size": [ "100%", 231 ], + + "$p1": 2, + "$p2": 3, + "$p1_text": "1", + "$p2_text": "2", + "variables":[ + { "requires": "(#form_text = '12')", "$p2": 5 } + ], + "bindings":[ + ], + "controls": [ + { + "book_panel": { + "type": "panel", + "size": "$book_size", + "anchor_from": "center", + "anchor_to": "center", + // 用 前三个 button 显示章节按钮 + // 用后续按钮传递显示值,页码数量记录在 global_value 中 + // 跳转按钮可以切换页数显示 + // rawtext以文本形式传入,这里用不了 "{\"rawtext\":[{\"translate\":\"tlm.00\",\"with\":[\"\\n\"]}]}", + + "controls": [ + // 内容 + { "book_grid@thlm_book.book_grid": { + "size": "$book_size", + "layer": 4 + } }, + // 边框 + { "book_background@thlm_book.book_background": { "size": "$book_size" } }, + // 关闭 | 注:名称为 "close" 的按钮是关闭按钮 + { + "close": { + "type": "button", + "offset": [ -14, 7 ], + "anchor_from": "top_right", + "anchor_to": "top_right", + "size": [ 14, 14 ], + "layer": 10, + "default_control": "default", + "hover_control": "hover", + "pressed_control": "pressed", + "focus_enabled": false, + "button_mappings": [ + { + "from_button_id": "button.menu_select", + "to_button_id": "button.menu_exit", + "mapping_type": "pressed" + }, + { + "from_button_id": "button.menu_cancel", + "to_button_id": "button.menu_exit", + "mapping_type": "global" + } + ], + "controls": [ + { "default@thlm_book.close_button_default": {} }, + { "hover@thlm_book.close_button_hover": {} }, + { "pressed@thlm_book.close_button_pressed": {} } + ] + } + }, + // 上一页 + { + "prev_button@thlm_book.base_button": { + "size": [ 24, 24 ], + "layer": 10, + "offset": [ 7, -9 ], + "anchor_from": "bottom_left", + "anchor_to": "bottom_left", + "sound_name": "item.thlm_book.page_turn", + "sound_volume": 4.0, + "sound_pitch": 1.0, + "$pressed_button_name": "button.prev_page", + "$default_texture": "textures/ui/book_pageleft_default", + "$hover_texture": "textures/ui/book_pageleft_hover", + "$pressed_texture": "textures/ui/book_pageleft_pressed", + // 行为 + "$button_active": "#prev_page_button_active" + } + }, + // 下一页 + { + "next_button@thlm_book.base_button": { + "size": [ 24, 24 ], + "offset": [ -7, -9 ], + "layer": 10, + "anchor_from": "bottom_right", + "anchor_to": "bottom_right", + "sound_name": "item.thlm_book.page_turn", + "sound_volume": 4.0, + "sound_pitch": 1.0, + + "$pressed_button_name": "button.next_page", + "$default_texture": "textures/ui/book_pageright_default", + "$hover_texture": "textures/ui/book_pageright_hover", + "$pressed_texture": "textures/ui/book_pageright_pressed", + // 行为 + "$button_active": "#next_page_button_active" + } + } + ] + } + } + ] + }, + //// 书本内容 //// + // 可以存储一个临时变量,在玩家进入世界时被初始化,储存章节和页码信息 + "book_grid": { + "type": "grid", + "grid_dimensions": [ 2, 1 ], + "layer": 4, + "controls": [ + { + "page_panel_left": { // @thlm_book.page_panel + "grid_position": [ 0, 0 ], + "type": "panel", + + "size": "$page_size", + "offset": [ 11, 24 ], + "layer": 4, + "$page_content_offset": [ 5, 0 ], + "$page_crease_image": "book.page_crease_left_image", + "$page_edge_image": "book.page_edge_left_image", + "$page_edge_offset": [ 7, -1 ], + "controls":[ + { + "page_content_root":{ + "type": "panel", + "size": [ + "100%", + "100%" + ], + "offset": [19,25], + "layer": 4, + "controls":[ + { + "page_content@page_content_panel": {"$index": "$p1"} + } + ] + } + + }, + { + "$page_crease_image@$page_crease_image": { + "size": [ "100% - 40px", "100% - 14px" ], + "offset": [ 0, -2 ] + } + }, + { + "$page_edge_image@$page_edge_image": { + "size": [ "100% - 7px", "100% - 16px" ], + "offset": "$page_edge_offset" + } + } + ] + } + }, + { + "page_panel_right": { // @thlm_book.page_panel + "grid_position": [ 1, 0 ], + "type": "panel", + + "size": "$page_size", + "offset": [ 11, 24 ], + "layer": 4, + "$page_content_offset": [ -5, 0 ], + "$page_crease_image": "thlm_book.page_crease_right_image", + "$page_edge_image": "thlm_book.page_edge_right_image", + "$page_edge_offset": [ -7, -1 ], + "controls":[ + { + "page_content_root":{ + "type": "panel", + "size": [ + "100%", + "100%" + ], + "offset": [19,25], + "layer": 4, + "controls":[ + { + "page_content@page_content_panel": {"$index": "$p2"} + } + ] + } + + }, + { + "$page_crease_image@$page_crease_image": { + "size": [ "100% - 40px", "100% - 14px" ], + "offset": [ 0, -2 ] + } + }, + { + "$page_edge_image@$page_edge_image": { + "size": [ "100% - 7px", "100% - 16px" ], + "offset": "$page_edge_offset" + } + } + ] + } + } + ] + }, + //// 文本框 //// + "page_content_panel":{ + "type": "stack_panel", + "$index|default": 0, + "size": [ + "100%", + "100%" + ], + "collection_name": "form_buttons", + "$content": "maid_info", + "offset": "$page_content_offset", + "layer": 4, + "controls":[ + { + "page_text": { + "collection_index": "$index", + "bindings": [ + { "binding_type": "view", "source_property_name": "#form_text", + "target_property_name": "#text", "binding_condition": "always" }, + // { + // "binding_name": "#form_button_text", + // "binding_name_override": "#text", + // "binding_type": "collection", + // "binding_collection_name": "form_buttons" + // }, + { + "binding_type": "view", + "source_property_name": "(('' + #text) - '$')", + "target_property_name": "#texture" + } + ], + "type": "label", + "text": "#text", + "layer": 4, + "size": [ "100%-32px", "100%-58px" ], + "offset": [ 0, 23 ], + "anchor_from": "top_middle", + "anchor_to": "top_middle", + "color": "$book_page_text_color" + } + } + ] + }, + "page_panel": { + "type": "panel", + "size": "$page_size", + "max_size": [ "100%", "100%" ], + "$page_content_offset|default": [ 0, 0 ], + "$page_crease_image|default": "thlm_book.page_crease_left_image", + "$page_edge_image|default": "thlm_book.page_edge_left_image", + "$page_edge_offset|default": [ 7, -1 ], + + "controls": [ + { + "page_content_panel": { + "type": "panel", + "offset": "$page_content_offset", + + "controls": [ + { "page_text@thlm_book.page_text": {} }, + { "page_number_label@thlm_book.page_number_label": {} } + ], + "bindings": [ + { + "binding_name": "#page_visible", + "binding_name_override": "#visible", + "binding_type": "collection", + "binding_collection_name": "book_pages" + } + ] + } + }, + { + "$page_crease_image@$page_crease_image": { + "size": [ "100% - 40px", "100% - 14px" ], + "offset": [ 0, -2 ] + } + }, + { + "$page_edge_image@$page_edge_image": { + "size": [ "100% - 7px", "100% - 16px" ], + "offset": "$page_edge_offset" + } + } + ] + }, + //// 翻页按钮 //// + "base_button@common.button": { + "layer": 5, + "$default_texture|default": "", + "$hover_texture|default": "", + "$pressed_texture|default": "", + "$button_bind_type": "global", + "$pressed_button_name": "button.menu_settings", + "bindings": [ + { + "binding_name": "$button_active", + "binding_name_override": "#visible", + "binding_type": "$button_bind_type", + "binding_collection_name": "book_pages" + }, + { + "binding_type": "collection_details", + "binding_collection_name": "book_pages" + } + ], + "controls": [ + { "default": { "type": "image", "texture": "$default_texture" } }, + { "hover": { "type": "image", "texture": "$hover_texture" } }, + { "pressed": { "type": "image", "texture": "$pressed_texture" } } + ] + }, + // 边框 + "book_background": { + "type": "image", + "layer": 0, + "texture": "textures/ui/book_back" + } +} diff --git a/TouHouLittleMaid_RP/ui/server_form.json b/TouHouLittleMaid_RP/ui/server_form.json index ca80d93..7623437 100644 --- a/TouHouLittleMaid_RP/ui/server_form.json +++ b/TouHouLittleMaid_RP/ui/server_form.json @@ -1,45 +1,42 @@ { - "namespace": "server_form", - "main_screen_content/server_form_factory": { - "type": "factory", - "control_ids": { "long_form": "@server_form.form_selector", "custom_form": "@server_form.custom_form" } - }, - "form_selector": { - "type": "panel", - "anchor_from": "center", - "anchor_to": "center", - "controls": [ - { "thlm_main@form_type": { "$min": "/M ", "$max": "/M 􀐏", "$content": "thlm_menu.main" } }, - { "doge_main@form_type": { "$min": "/D ", "$max":"/D 􀐏", "$content": "form_main.main" } }, - { "doge_ad@form_type": { "$min": "/A ", "$max":"/A 􀐏", "$content": "ad_p1.main" } }, - // { "thlm_skin@form_type": { "$min": "/S ", "$max": "/S 􀐏", "$content": "thlm_skin.main" } }, - { "vanilla@vanilla_form": {} } + "namespace": "server_form", + "main_screen_content": { + "modifications": [{ + "array_name": "controls", + "operation": "insert_front", + "value": [{ + "server_form_factory": { + "type": "factory", + "control_ids": { + "long_form": "@tlm_server_form.long_form_replacement" + } + } + }] + }] + }, + "long_form": { + "modifications": [ + { + "array_name": "bindings", + "operation": "insert_front", + "value": [ + { "binding_name": "#title_text" }, + { + "binding_type": "view", + "source_property_name": "(#title_text < '/' or #title_text > '/􀐏')", + "target_property_name": "#visible" + } ] - }, - "form_type": { - "type": "panel", - "controls": [{ "content@$content": {} }], - "bindings": [ - { "binding_name": "#title_text" }, - { - "binding_type": "view", - "source_property_name": "(#title_text = $min) or (#title_text > $min and #title_text < $max)", - "target_property_name": "#visible" - }, - { "binding_type": "view", "source_property_name": "(#title_text - $min)", "target_property_name": "#title" } - ] - }, - "vanilla_form@server_form.long_form": { - "bindings": [ - { "binding_name": "#title_text" }, - { - "binding_type": "view", - "source_property_name": "(#title_text < '/' or #title_text > '/􀐏')", - "target_property_name": "#visible" - } - ] - }, - "third_party_server_screen": { - "button_mappings": [] - } + } + ] + }, + "long_form_panel": { + "bindings": [ + { + "binding_type": "view", + "source_property_name": "(#title_text < '/' or #title_text > '/􀐏')", + "target_property_name": "#visible" + } + ] + } } \ No newline at end of file diff --git "a/TouHouLittleMaid_RP/ui/\344\270\273\350\217\234\345\215\225\350\256\276\350\256\241.png" "b/TouHouLittleMaid_RP/ui/\344\270\273\350\217\234\345\215\225\350\256\276\350\256\241.png" deleted file mode 100644 index 61a5fa5..0000000 Binary files "a/TouHouLittleMaid_RP/ui/\344\270\273\350\217\234\345\215\225\350\256\276\350\256\241.png" and /dev/null differ