Skip to content

Commit

Permalink
指南书更新
Browse files Browse the repository at this point in the history
√ 特殊UI
√ 更好的自动生成,可以一次性导出所有页面
√ 使用lore记录章节和版本号
√ 加入新的指南书物品与名称,移除旧书
√ 首次进入世界的书改为新的指南书
√ 旧书第一页改为:这本书已经过时了,请用蛋糕和书合成新的指南书。
  • Loading branch information
ENIACJushi committed Aug 14, 2024
1 parent 294e45e commit 4b52574
Show file tree
Hide file tree
Showing 13 changed files with 44 additions and 309 deletions.
24 changes: 0 additions & 24 deletions .old/removed/waiting/memorizable_gensokyo.json

This file was deleted.

42 changes: 31 additions & 11 deletions Docs/TODO.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,42 @@

## 更新日志

1.3.2
新增
- 【重要】为模型增加root骨骼,解决了坐下动画异常等动画问题。先前的模型包需要重新生成
- 为 _ 开头的骨骼设置发光特效,因为子骨骼不会跟随发光,增加了一个自动给子骨骼加_的脚本
- 为芙兰的翅膀和眼睛、蕾米的眼睛设置发光效果
- 抱起(鞍右键抱起,再次右键放下)
- 全新指南书

修复
- 靠近浆果丛会发出受伤声

调整
- 改良女仆面板UI,使其能够更好兼容其它模组的特殊UI

## 计划

√ 改良UI,使其能够更好兼容其它模组的特殊UI
加入管理员专属章节
:标题图标:命令方块
:本章介绍一些拥有管理员权限才能接触到的内容。
- NPC工具
* 世界选项设置 - 提供一个直接打开设置表单的按钮
* NTR工具
- 符卡

指南书更新
√ 更好的自动生成,可以一次性导出所有页面
√ 使用lore记录章节和版本号
√ 无法向下兼容,因为旧书和其它成书别无二致
√ 设置手持书本的版本指令
- 打开书时检查版本号,和当前版本不一致则更新版本
- 潜行状态打开书,进入下一章
* 取消指南书显示前摇并延长后摇
指南书前置库
- 利用全局变量内一个记录模组uuid的量,并在factory设置ignore,区分不同模组提供的库,保证只有一个库在UI被计算
- 调整binding条件
- 按钮 旧状态记录可能可以删除,因为引入旧状态只是缩短了上升段,而上升段已经被最大值限制住了,在置0段才会赋值
- 图片显示功能

去除假日创造者 https://feedback.minecraft.net/hc/en-us/articles/28486285876237-Minecraft-Beta-Preview-1-21-20-23

NTR工具:开墓碑

补充微波炉的音效

隙间
- 物品隙间:可以放置6个方向的方块隙间
- 方块隙间:放置时原地生成一个实体隙间
Expand All @@ -30,8 +50,8 @@ NTR工具:开墓碑
配置项的表单修改

一键打包脚本,包含版本号修改、json文件压缩功能

去除假日创造者 https://feedback.minecraft.net/hc/en-us/articles/28486285876237-Minecraft-Beta-Preview-1-21-20-23
多方块引导
- 在御币点击点贴上御币的贴图

- 为祭坛合成的 tag 匹配补充原版的组件 tag,原 tag 方案改为 group 以作区分
- 庭灯:可以存储P点、为附近的女仆提供buff,打掉之后P点会以lore的形式存储在物品之中(需要测试lore中是否能包含translate文本)
Expand Down
1 change: 0 additions & 1 deletion MemorizableGensokyo/ItemList.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ const itemFont = {
"minecraft:book": 0x2D,
"minecraft:cake": 0x2E,
"touhou_little_maid:memorizable_gensokyo": 0x2F,
"touhou_little_maid:memorizable_gensokyo_1": 0x2F,

// 龙头
"minecraft:amethyst_shard": 0x30,
Expand Down
22 changes: 0 additions & 22 deletions TouHouLittleMaid_BP/items/memorizable_gensokyo_1.json

This file was deleted.

22 changes: 0 additions & 22 deletions TouHouLittleMaid_BP/items/memorizable_gensokyo_2.json

This file was deleted.

4 changes: 2 additions & 2 deletions TouHouLittleMaid_BP/recipes/memorizable_gensokyo.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"format_version": "1.12.10",
"minecraft:recipe_shapeless": {
"description": {
"identifier": "touhou_little_maid:memorizable_gensokyo_1"
"identifier": "touhou_little_maid:memorizable_gensokyo"
},
"tags": [ "crafting_table" ],
"ingredients": [
Expand All @@ -14,7 +14,7 @@
}
],
"result": {
"item": "touhou_little_maid:memorizable_gensokyo_1"
"item": "touhou_little_maid:memorizable_gensokyo"
}
}
}
20 changes: 0 additions & 20 deletions TouHouLittleMaid_BP/recipes/memorizable_gensokyo_2.json

This file was deleted.

45 changes: 1 addition & 44 deletions TouHouLittleMaid_BP/scripts/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,7 @@ class thlm {
// 初始化p点计分板
PowerPoint.set_power_number(player.name, 0);
// 给书
player.dimension.runCommand(`give ${playerName} touhou_little_maid:memorizable_gensokyo_1 1`);
player.dimension.runCommand(`give ${playerName} touhou_little_maid:memorizable_gensokyo_2 1`);
player.dimension.runCommand(`give ${playerName} touhou_little_maid:memorizable_gensokyo 1`);
// 给魂符
player.dimension.runCommand(`give ${playerName} touhou_little_maid:smart_slab_has_maid 1`);
// say something
Expand Down Expand Up @@ -192,48 +191,6 @@ class thlm {
// 符卡释放
CustomSpellCardManger.onSpellCardUseEvent(event);
}
else if(item.typeId.substring(0, 9) === "minecraft"){
switch(item.typeId.substring(10)){
// 指南书更新
case "written_book":{
let lore = item.getLore();
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{
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;
default: break;
}
}
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ export class MemorizableGensokyo{
.button({"rawtext":[{"translate":"tlm.book.chapter2"}]}, "textures/ui/chapter_maid")
.button({"rawtext":[{"translate":"tlm.book.chapter3"}]}, "textures/items/microwaver/magic_powder")
.button("placeholder")
.button("一行文字,可以被动态定义")
// 章节内容
for(let i = 0; i < BOOK.length; i++){
for(let i2 = 0; i2 < BOOK[i]; i2++){
Expand Down
3 changes: 1 addition & 2 deletions TouHouLittleMaid_BP/scripts/src/controller/Command.js
Original file line number Diff line number Diff line change
Expand Up @@ -327,8 +327,7 @@ export class CommandManager{
"touhou_little_maid:dragon_skull",
"touhou_little_maid:gold_microwaver_item",
"touhou_little_maid:magic_powder",
"touhou_little_maid:memorizable_gensokyo_1",
"touhou_little_maid:memorizable_gensokyo_2"
"touhou_little_maid:memorizable_gensokyo"
]

for(let item of itemList){
Expand Down
8 changes: 1 addition & 7 deletions TouHouLittleMaid_BP/scripts/src/controller/Config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { world, system, Entity } from "@minecraft/server";
import * as Tool from "../libs/ScarletToolKit"


const config_lock = 2;// 锁定的配置项数量,锁定配置项总放在最前
const config_lock = 1;// 锁定的配置项数量,锁定配置项总放在最前
export var config={
/**
* 已弃用
Expand All @@ -11,12 +11,6 @@ export var config={
* 建议多人游戏时设为true
*/
"maid_death_bag": false,
// 指南书版本
"memorizable_gensokyo":[
1, // 第一章
1, // 第二章
1 // 第三章
],
// 公开的配置项 只能为 整数 或 布尔值
"ui_enable" : 1, // 是否启用特殊UI
"fairy_damage" : 100, // 妖精女仆弹幕攻击力的倍数因子,伤害最后会乘上(这个数/100)
Expand Down
Loading

0 comments on commit 4b52574

Please sign in to comment.