Skip to content
This repository was archived by the owner on Jan 20, 2025. It is now read-only.

Commit 4673acf

Browse files
authored
upgrade: 0.1.4优化界面 (#2)
upgrade: 0.1.4 优化actionbar显示风格
1 parent 6a7315d commit 4673acf

File tree

4 files changed

+21
-13
lines changed

4 files changed

+21
-13
lines changed

NavigationAPI.js

+9-9
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ function formatPos(pos) {
3939
}
4040
})();
4141
return (
42-
`${Green}${x.toFixed(2)} ` +
43-
`${Red}${y.toFixed(2)} ` +
44-
`${Aqua}${z.toFixed(2)}` +
45-
`${White}${LightPurple}${dim}`
42+
`${White}${x.toFixed(0)}, ` +
43+
`${y.toFixed(0)}, ` +
44+
`${z.toFixed(0)}, ` +
45+
`${LightPurple}${dim}`
4646
);
4747
}
4848

@@ -93,7 +93,7 @@ function newNavigationTask(xuid, warp) {
9393
* @returns {string}
9494
*/
9595
function formatXZPos(x, z) {
96-
return `${Green}${x.toFixed()} ${Red}~ ${Aqua}${z.toFixed()}`;
96+
return `${Green}${x.toFixed()}, ~, ${z.toFixed()}`;
9797
}
9898

9999
if (hasNavigationTask(xuid)) {
@@ -114,16 +114,16 @@ function newNavigationTask(xuid, warp) {
114114

115115
let msg =
116116
`${Green}${name}${Clear} | ` +
117-
`${MinecoinGold}目标位置${formatPos(pos)}${Clear} | `;
117+
`${MinecoinGold}目标位置: ${formatPos(pos)}${Clear} | `;
118118
if (dimId !== dDim) {
119119
msg += (() => {
120120
if (dimId === 2 || dDim === 2) return `${Red}维度不匹配`;
121121
if (dDim === 1)
122122
// warp点在地狱
123-
return `${MinecoinGold}主世界坐标${formatXZPos(dx * 8, dz * 8)}`;
123+
return `${MinecoinGold}主世界坐标: ${formatXZPos(dx * 8, dz * 8)}`;
124124
if (dDim === 0)
125125
// warp点在主世界
126-
return `${MinecoinGold}地狱坐标${formatXZPos(dx / 8, dz / 8)}`;
126+
return `${MinecoinGold}地狱坐标: ${formatXZPos(dx / 8, dz / 8)}`;
127127
return `${Red}非法导航`;
128128
})();
129129
} else {
@@ -169,7 +169,7 @@ ll.exports(newNavigationTask, `${exportNamespace}_newTask`);
169169
ll.exports(clearNavigationTask, `${exportNamespace}_clearTask`);
170170
ll.exports(hasNavigationTask, `${exportNamespace}_hasTask`);
171171

172-
ll.registerPlugin(pluginName, '导航API', [0, 1, 3], {
172+
ll.registerPlugin(pluginName, '导航API', [0, 1, 4], {
173173
Author: 'student_2333',
174174
License: 'Apache-2.0',
175175
});

README.md

+8-3
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const hasNavigationTask = ll.import('NavAPI_hasTask');
5555
* "x": 39.43924331665039,
5656
* "y": 65.62001037597656,
5757
* "z": 92.11305236816406,
58-
* "dimId": 0
58+
* "dimid": 0
5959
* },
6060
* "name": "岩浆池"
6161
* }
@@ -124,15 +124,20 @@ QQ:3076823485
124124
感谢大家的赞助!你们的赞助将是我继续创作的动力!
125125

126126
- [爱发电](https://afdian.net/@lgc2333)
127+
127128
- <details>
128129
<summary>赞助二维码(点击展开)</summary>
129-
130+
130131
![讨饭](https://raw.githubusercontents.com/lgc2333/ShigureBotMenu/master/src/imgs/sponsor.png)
131-
132+
132133
</details>
133134

134135
## 更新日志
135136

137+
### 0.1.4
138+
139+
- 优化actionbar的显示风格,坐标保留整数,统一xyz颜色
140+
136141
### 0.1.2
137142

138143
- 修复坐标换算显示错误的 Bug

manifest.json

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
{
22
"entry": "NavigationAPI.js",
33
"name": "NavigationAPI",
4+
"author": "student_2333",
5+
"description": "其他插件可对接的导航 API",
6+
"version": "0.1.4",
47
"type": "lse-quickjs",
58
"dependencies": [
69
{

tooth.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema": "https://raw.githubusercontent.com/lippkg/lip/main/schemas/tooth.v2.schema.json",
33
"format_version": 2,
44
"tooth": "github.com/lgc-LLDev/NavigationAPI",
5-
"version": "0.1.3",
5+
"version": "0.1.4",
66
"info": {
77
"name": "NavigationAPI",
88
"description": "A navigation library",

0 commit comments

Comments
 (0)