diff --git a/CHANGELOG.md b/CHANGELOG.md index 3414ae7..046b0f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +# 1.0.6 +*兼容`体力模板2`可自定义css以及背景icon等 + * 模板内容需要具体参考**/dailyNote/Template/temp** + * 推荐英文命名文件夹 +*优化正则匹配不至于一直输出 +*修复模板一无派遣的bug +*优化部分别名 + # 1.0.5 * 新增了一个体力模板 * 设置功能新增模板切换`图鉴设置模板(0-2)` diff --git a/apps/Note.js b/apps/Note.js index 60ff390..9d99684 100644 --- a/apps/Note.js +++ b/apps/Note.js @@ -150,18 +150,11 @@ export async function Note(e, { val.remained_mb2 = "今天" + Time_day + moment(remainedDate).format("hh:mm"); val.remained_time = ` ${val.remained_time}`; } - val.mb2_icon=val.avatar_side_icon + val.mb2_icon = val.avatar_side_icon } } - for (var i = 0; i < 5-data.expeditions.length; i++) { - data.expeditions.push({ - remained_time:0, - remained_mb2:0, - percentage:0, - mb2_icon:"" - }) - } - + + let remained_time = ""; if (data.expeditions && data.expeditions.length >= 1) { remained_time = lodash.map(data.expeditions, "remained_time"); @@ -227,6 +220,27 @@ export async function Note(e, { if (mb < 0) { mb = lodash.random(0, path_url.length - 1); } + if (mb == 1) { + for (var i = 0; i < 5 - data.expeditions.length; i++) { + data.expeditions.push({ + remained_time: 0, + remained_mb2: 0, + percentage: 0, + mb2_icon: "" + }) + } + } + var urlFile = fs.readdirSync(`./plugins/xiaoyao-cvs-plugin/resources/dailyNote/Template/`); + var urlType = []; + for (let val of urlFile) { + if (val.includes(".")) continue; + urlType.push(val) + } + // console.log(urlType) + if (urlType.length > 0) { + urlType = urlType[lodash.random(0, urlType.length - 1)] + } + // console.log(urlType) var image = fs.readdirSync(`./plugins/xiaoyao-cvs-plugin/resources/dailyNote/${path_img[mb]}`); var list_img = []; for (let val of image) { @@ -238,6 +252,7 @@ export async function Note(e, { uid: uid, coinTime_mb2Day, coinTime_mb2, + urlType, resinMaxTime_mb2Day, resinMaxTime, resinMaxTime_mb2, diff --git a/index.js b/index.js index 104cf6e..ff4c03a 100644 --- a/index.js +++ b/index.js @@ -40,7 +40,7 @@ let rule = { describe: "查看插件的功能", }, AtlasAlias: { - reg: "#*(.*)$", + reg: "^(#(.*)|.*图鉴)$", describe: "角色、食物、怪物、武器信息图鉴", }, Note: { diff --git a/resources/Atlas_alias/Atlas_list.json b/resources/Atlas_alias/Atlas_list.json index 184dc68..bc55a5e 100644 --- a/resources/Atlas_alias/Atlas_list.json +++ b/resources/Atlas_alias/Atlas_list.json @@ -1,5 +1,5 @@ { - "图鉴列表|图鉴|图鉴目录": ["#角色图鉴", "#武器图鉴", "#原魔图鉴", "#圣遗物图鉴", "#食物图鉴", "#秘境图鉴"], + "图鉴列表|图鉴|图鉴目录": ["#角色图鉴", "#武器图鉴", "#原魔图鉴(怪物图鉴)", "#圣遗物图鉴", "#食物图鉴", "#秘境图鉴"], "角色图鉴|人物图鉴|英雄图鉴": ["角色星级:", "#五星角色图鉴", "#四星角色图鉴", "角色地区:", "#蒙德角色图鉴", "#璃月角色图鉴", "#稻妻角色图鉴", "#至冬角色图鉴", "#未知地区角色图鉴", "角色元素:", "#风系角色图鉴", "#火系角色图鉴", "#水系角色图鉴", "#冰系角色图鉴", "#雷系角色图鉴", "#岩系角色图鉴", "#草系角色图鉴", "角色武器:", "#单手剑角色图鉴", "#双手剑角色图鉴", "#弓系角色图鉴", "#长柄武器角色图鉴", "#法器角色图鉴" @@ -152,7 +152,7 @@ "活动武器图鉴|免费武器图鉴|赠送武器图鉴": ["#落霞图鉴", "#证誓之明瞳图鉴", "#辰砂之纺锤图鉴", "#掠食者图鉴", "#衔珠海皇图鉴", "#降临之剑图鉴", "#腐殖之剑图鉴", "#风花之颂图鉴", "#嘟嘟可故事集图鉴" ], - "原魔图鉴|圆魔图鉴": ["#史莱姆图鉴", "#无相图鉴", "#飘浮灵图鉴", "#丘丘人图鉴", "#丘丘暴徒图鉴", "#丘丘王图鉴", "#萨满图鉴", "#深渊法师图鉴", "#深渊使徒图鉴", "#兽境猎犬图鉴", + "原魔图鉴|圆魔图鉴|怪物图鉴": ["#史莱姆图鉴", "#无相图鉴", "#飘浮灵图鉴", "#丘丘人图鉴", "#丘丘暴徒图鉴", "#丘丘王图鉴", "#萨满图鉴", "#深渊法师图鉴", "#深渊使徒图鉴", "#兽境猎犬图鉴", "#黯色空壳图鉴", "#愚人众图鉴", "#自律机关图鉴", "#盗宝团图鉴", "#野伏众图鉴", "#骗骗花图鉴", "#龙蜥图鉴", "#飞萤图鉴", "#boss图鉴", "#其他图鉴" ], "其他图鉴": ["#狂风之核图鉴", "#浮游水蕈兽图鉴"], @@ -185,7 +185,7 @@ "龙蜥图鉴": ["#幼岩龙蜥图鉴", "#岩龙蜥图鉴", "#古岩龙蜥图鉴", "#深海龙蜥原种图鉴", "#深海龙蜥啮冰图鉴", "#深海龙蜥吞雷图鉴", "#深海龙蜥之群图鉴"], "萤虫图鉴|蚊子图鉴|飞萤图鉴": ["#雷萤图鉴", "#冰萤图鉴", "#水萤图鉴"], "boss图鉴|BOSS图鉴|Boss图鉴|周本图鉴|世界boss图鉴": ["#无相图鉴", "#纯水精灵图鉴", "#雷音权限图鉴", "#黄金王兽图鉴", "#遗迹巨蛇图鉴", "#恒常机关阵列图鉴", "#魔偶剑鬼图鉴", - "#爆炎树图鉴", "#急冻树图鉴", "#古岩龙蜥图鉴", "#深海龙蜥群图鉴", "#裂空的魔龙图鉴", "#北风的狼王奔狼的领主图鉴", "#公子原魔图鉴", "#若陀龙王图鉴", "#女士图鉴", + "#爆炎树图鉴", "#急冻树图鉴", "#古岩龙蜥图鉴", "#深海龙蜥群图鉴", "#裂空的魔龙图鉴", "#北风的王狼奔狼的领主图鉴", "#公子原魔图鉴", "#若陀龙王图鉴", "#女士图鉴", "#祸津御建鸣神命图鉴" ], "圣遗物图鉴|遗物图鉴": ["#五星圣遗物图鉴", "#四星圣遗物图鉴"], diff --git a/resources/Atlas_alias/yuanmo_tujian.json b/resources/Atlas_alias/yuanmo_tujian.json index 5d801fe..50de0c0 100644 --- a/resources/Atlas_alias/yuanmo_tujian.json +++ b/resources/Atlas_alias/yuanmo_tujian.json @@ -1,7 +1,7 @@ { "公子": ["周本公子","愚人众公子", "公子周本", "原魔公子", "原魔达达利亚", "周本达达利亚", "达达利亚周本", "公子", "玩具销售员"], "女士": ["女士", "周本女士", "女士周本", "愚人众女士", "火之魔女", "火魔女"], - "北风的王狼奔狼的领主": ["奔狼的领主", "北风狼", "狼王", "周本狼王", "狼王周本", "二哈", "安德琉斯", "北风的狼王", "北风守护"], + "北风的王狼奔狼的领主": ["北风的狼王奔狼的领主","奔狼的领主", "北风狼", "狼王", "周本狼王", "狼王周本", "二哈", "安德琉斯", "北风的狼王", "北风守护"], "祸津御建鸣神命": ["原魔雷神", "原魔雷电将军", "周本雷电将军", "雷电将军周本", "周本雷神", "雷神周本", "御建所大人", "雷军", "原魔雷军"], "若陀龙王": ["肥坨", "龙王", "若陀", "肥宅", "钟离坐骑","坨子哥", "坨坨"], "裂空的魔龙": ["风魔龙", "风龙", "特瓦林", "温迪坐骑"], diff --git a/resources/dailyNote/Template/temp/css/xiaoyao_Note.css b/resources/dailyNote/Template/temp/css/xiaoyao_Note.css new file mode 100644 index 0000000..7ab4120 --- /dev/null +++ b/resources/dailyNote/Template/temp/css/xiaoyao_Note.css @@ -0,0 +1,268 @@ +@font-face { + font-family: HYWenHei; + src: url(../../../../font/HYWenHei.ttf); +} + +@font-face { + font-family: MiSans-Regular; + src: url(../../../../font/MiSans-Regular.ttf); +} + +@font-face { + font-family: MiSans-Medium; + src: url(../../../../font/MiSans-Medium.ttf); +} + +@font-face { + font-family: HYWenHei-HEW; + src: url(../../../../font/HYWenHei-HEW.ttf); +} + +#container { + min-height: 627px; + height: auto; + width: 1137px; + background-color: rgba(0, 0, 0, 0.5); +} + +.left_model { + width: calc(50% - 136px); + padding: 75px 0; + padding-left: 136px; + display: inline-block; + float: left; +} + +.left_model img { + width: 40px; + height: 40px; + vertical-align: middle; + +} + +.div { + display: inline-block; + vertical-align: middle; +} + +.left_model .div:nth-child(2) { + margin-left: 22px; + width: 190px; +} + +.title { + font-size: 24px; + font-family: "MiSans-Regular"; + color: #444444; + display: block; + text-align: left; + src: url("{{_res_path}}font/MiSans-Regular.ttf"); +} + +.bottom { + text-align: left; + color: #a9834f; + font-family: "MiSans-Regular"; +} + +.time { + border-radius: 15px; + background-color: #a9834f; + color: #fff; + text-align: center; + padding: 4px 10px; + margin: 0 6px; + font-family: "HYWenHei"; +} + +.kb { + height: 10px; +} + +.list { + margin-bottom: 42px; +} + +.list:last-child { + margin-bottom: 0; +} + +.sumCount { + font-size: 30px; + font-family: "HYWenHei"; + text-align: center; + color: #a9843f; + /* float: right; */ + width: 170px; + /* margin-top: 10px; */ + background-image: url(../icon/矩形.png); +} + +.right_model { + display: inline-block; + width: calc(50% - 135px); + padding: 80px 58px 45px; + float: left; +} + +.uId { + text-align: center; + background-image: url(../icon/圆角矩形.png); + text-align: center; + width: 364px; + height: 50px; + line-height: 50px; + color: #a9843f; + font-size: 24px; + font-family: 'HYWenHei'; +} + +.head_image { + margin-top: 45px; +} + +.icon { + vertical-align: middle; + display: inline-block; + position: absolute; + margin-left: -5px; + top: -20px; + left: -5px; +} + +.icon img { + width: 78px; + height: 78px; +} + +.text { + vertical-align: middle; + display: inline-block; + width: calc(80px); + font-size: 16px; + text-align: center; + color: #a9843f; + position: absolute; + font-family: "MiSans-Medium"; + top: 20%; + margin-left: 25px; +} + +.li { + width: 44%; + display: inline-block; + position: relative; + margin-bottom: 42px; +} + +.circleProgress_wrapper { + width: 64px; + height: 64px; + /* margin: 50px auto; */ + position: relative; + display: inline-block; + /* border:1px solid #ddd; */ +} + +.wrapper { + width: 32px; + height: 64px; + position: absolute; + top: 0; + overflow: hidden; +} + +.right { + right: 0; + /* border: solid 1px black; */ +} + +.left { + left: 0; + /* border: solid 1px red; */ +} + +.circleProgress { + width: 58px; + height: 58px; + border: 3px solid rgb(172, 172, 172); + position: absolute; + top: 0; + border-radius: 50%; + transform: rotate(-135deg); +} + +.rightcircle { + border-top: 3px solid rgb(218, 252, 24); + border-right: 3px solid rgb(218, 252, 24); + right: 0; + animation: circleProgressLoad_right; +} + +.leftcircle { + border-bottom: 3px solid rgb(218, 252, 24); + border-left: 3px solid rgb(218, 252, 24); + left: 0; + animation: circleProgressLoad_right 0.1ms linear 0ms normal forwards; +} + +@keyframes circleProgressLoad_right { + 0% { + -webkit-transform: rotate(-135deg); + } + + 50%, + 100% { + -webkit-transform: rotate(45deg); + } +} + +@keyframes circleProgressLoad_left { + + 0%, + 50% { + -webkit-transform: rotate(-135deg); + } + + 100% { + -webkit-transform: rotate(45deg); + } +} + +.bottom_time { + display: flex; + font-size: 20px; + color: #d9766c; + font-family: "HYWenHei"; + text-align: center; + width: 200px; +} + +.bottom_image { + width: 212px; + height: 163px; + display: inline-block; + +} + +.bottom_image img { + width: 100%; + height: 100%; +} + +.jdt { + display: inline-flex; +} + +.red { + color: #d9766c; +} + +.user_null { + vertical-align: middle; + display: inline-block; + position: absolute; + margin-left: -5px; + top: -3px; + left: 7px; +} diff --git a/resources/dailyNote/Template/temp/icon/圆角矩形.png b/resources/dailyNote/Template/temp/icon/圆角矩形.png new file mode 100644 index 0000000..2e2a557 Binary files /dev/null and b/resources/dailyNote/Template/temp/icon/圆角矩形.png differ diff --git a/resources/dailyNote/Template/temp/icon/矩形.png b/resources/dailyNote/Template/temp/icon/矩形.png new file mode 100644 index 0000000..1c59d6a Binary files /dev/null and b/resources/dailyNote/Template/temp/icon/矩形.png differ diff --git a/resources/dailyNote/Template/temp/icon/背景.png b/resources/dailyNote/Template/temp/icon/背景.png new file mode 100644 index 0000000..d81e260 Binary files /dev/null and b/resources/dailyNote/Template/temp/icon/背景.png differ diff --git a/resources/dailyNote/speed/0.png b/resources/dailyNote/Template/temp/speed/0.png similarity index 100% rename from resources/dailyNote/speed/0.png rename to resources/dailyNote/Template/temp/speed/0.png diff --git a/resources/dailyNote/speed/10.png b/resources/dailyNote/Template/temp/speed/10.png similarity index 100% rename from resources/dailyNote/speed/10.png rename to resources/dailyNote/Template/temp/speed/10.png diff --git a/resources/dailyNote/speed/100.png b/resources/dailyNote/Template/temp/speed/100.png similarity index 100% rename from resources/dailyNote/speed/100.png rename to resources/dailyNote/Template/temp/speed/100.png diff --git a/resources/dailyNote/speed/20.png b/resources/dailyNote/Template/temp/speed/20.png similarity index 100% rename from resources/dailyNote/speed/20.png rename to resources/dailyNote/Template/temp/speed/20.png diff --git a/resources/dailyNote/speed/30.png b/resources/dailyNote/Template/temp/speed/30.png similarity index 100% rename from resources/dailyNote/speed/30.png rename to resources/dailyNote/Template/temp/speed/30.png diff --git a/resources/dailyNote/speed/40.png b/resources/dailyNote/Template/temp/speed/40.png similarity index 100% rename from resources/dailyNote/speed/40.png rename to resources/dailyNote/Template/temp/speed/40.png diff --git a/resources/dailyNote/speed/50.png b/resources/dailyNote/Template/temp/speed/50.png similarity index 100% rename from resources/dailyNote/speed/50.png rename to resources/dailyNote/Template/temp/speed/50.png diff --git a/resources/dailyNote/speed/60.png b/resources/dailyNote/Template/temp/speed/60.png similarity index 100% rename from resources/dailyNote/speed/60.png rename to resources/dailyNote/Template/temp/speed/60.png diff --git a/resources/dailyNote/speed/70.png b/resources/dailyNote/Template/temp/speed/70.png similarity index 100% rename from resources/dailyNote/speed/70.png rename to resources/dailyNote/Template/temp/speed/70.png diff --git a/resources/dailyNote/speed/80.png b/resources/dailyNote/Template/temp/speed/80.png similarity index 100% rename from resources/dailyNote/speed/80.png rename to resources/dailyNote/Template/temp/speed/80.png diff --git a/resources/dailyNote/speed/90.png b/resources/dailyNote/Template/temp/speed/90.png similarity index 100% rename from resources/dailyNote/speed/90.png rename to resources/dailyNote/Template/temp/speed/90.png diff --git a/resources/dailyNote/xiaoyao_Note.html b/resources/dailyNote/xiaoyao_Note.html index 6ab8247..b24656b 100644 --- a/resources/dailyNote/xiaoyao_Note.html +++ b/resources/dailyNote/xiaoyao_Note.html @@ -3,20 +3,20 @@ - + -
+
- 原粹树脂 + 原粹树脂
{{if resinMaxTime}} {{resinMaxTime_mb2Day}}{{resinMaxTime_mb2}}恢复 @@ -31,7 +31,7 @@
- 洞天宝钱 + 洞天宝钱
{{if coinTime}} @@ -49,7 +49,7 @@
- 每日委托 + 每日委托
今日委托奖励{{if is_extra_task_reward_received==1}}已{{else}}未{{/if}}领取
@@ -62,7 +62,7 @@
- 值得铭记的强敌 + 值得铭记的强敌
本周剩余消耗减半次数
@@ -75,7 +75,7 @@
- 参量质变仪 + 参量质变仪
{{if transformer.obtained }} @@ -94,7 +94,7 @@
-
+
UID:{{uid}}
@@ -109,7 +109,7 @@
-->
- +
{{if list.mb2_icon==''}} @@ -129,7 +129,7 @@
-
+
{{day_mb2}}