koishi-plugin-ets2-tools-tmp 1.3.1 → 1.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +4 -5
- package/lib/resource/position.html +4 -4
- package/lib/resource/traffic.html +9 -6
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -66,15 +66,14 @@ exports.Config = koishi_1.Schema.intersect([
|
|
|
66
66
|
tmpQuery: koishi_1.Schema.boolean().default(true).description('是否启用查询功能'),
|
|
67
67
|
tmpTraffic: koishi_1.Schema.boolean().default(true).description('是否启用路况查询'),
|
|
68
68
|
tmpServer: koishi_1.Schema.boolean().default(true).description('是否启用服务器查询'),
|
|
69
|
-
tmpBind: koishi_1.Schema.boolean().default(true).description('是否启用绑定功能'),
|
|
70
69
|
tmpPosition: koishi_1.Schema.boolean().default(true).description('是否启用定位功能'),
|
|
71
70
|
tmpVersion: koishi_1.Schema.boolean().default(true).description('是否启用版本查询'),
|
|
72
71
|
tmpDlcMap: koishi_1.Schema.boolean().default(true).description('是否启用DLC地图查询'),
|
|
73
72
|
tmpMileageRanking: koishi_1.Schema.boolean().default(true).description('是否启用里程排行榜'),
|
|
74
73
|
tmpVtc: koishi_1.Schema.boolean().default(true).description('是否启用VTC查询'),
|
|
75
|
-
mainSettings: koishi_1.Schema.boolean().default(false).description('
|
|
76
|
-
resetPassword: koishi_1.Schema.boolean().default(false).description('
|
|
77
|
-
tmpActivityService: koishi_1.Schema.boolean().default(false).description('
|
|
74
|
+
mainSettings: koishi_1.Schema.boolean().default(false).description('是否启用车队平台积分查询功能'),
|
|
75
|
+
resetPassword: koishi_1.Schema.boolean().default(false).description('是否启用车队平台重置密码功能'),
|
|
76
|
+
tmpActivityService: koishi_1.Schema.boolean().default(false).description('是否启用车队活动查询')
|
|
78
77
|
}).description('指令配置'),
|
|
79
78
|
baiduTranslate: koishi_1.Schema.object({
|
|
80
79
|
enable: koishi_1.Schema.boolean().default(false).description('是否启用百度翻译'),
|
|
@@ -177,7 +176,7 @@ function registerBaseCommands(ctx, cfg) {
|
|
|
177
176
|
.action(async () => await commands.tmpServer(ctx, cfg, 'ETS2'));
|
|
178
177
|
}
|
|
179
178
|
|
|
180
|
-
if (cfg.commands?.
|
|
179
|
+
if (cfg.commands?.tmpQuery) {
|
|
181
180
|
ctx.command('绑定 <tmpId>')
|
|
182
181
|
.usage("绑定TmpId")
|
|
183
182
|
.action(async ({ session }, tmpId) => await commands.tmpBind(ctx, cfg, session, tmpId));
|
|
@@ -117,8 +117,8 @@
|
|
|
117
117
|
ets: {
|
|
118
118
|
tileUrl: 'https://ets-map.oss-cn-beijing.aliyuncs.com/ets2/05102019/{z}/{x}/{y}.png',
|
|
119
119
|
multipliers: {
|
|
120
|
-
x:
|
|
121
|
-
y:
|
|
120
|
+
x: 70272,
|
|
121
|
+
y: 76157
|
|
122
122
|
},
|
|
123
123
|
breakpoints: {
|
|
124
124
|
uk: {
|
|
@@ -135,8 +135,8 @@
|
|
|
135
135
|
// 游戏地转地图坐标
|
|
136
136
|
calculateMapCoordinate (x, y) {
|
|
137
137
|
return [
|
|
138
|
-
x / 1.
|
|
139
|
-
y / 1.
|
|
138
|
+
x / 1.609055 + mapConfig.ets.multipliers.x,
|
|
139
|
+
y / 1.609055 + mapConfig.ets.multipliers.y
|
|
140
140
|
];
|
|
141
141
|
}
|
|
142
142
|
},
|
|
@@ -85,8 +85,8 @@
|
|
|
85
85
|
ets: {
|
|
86
86
|
tileUrl: 'https://ets-map.oss-cn-beijing.aliyuncs.com/ets2/05102019/{z}/{x}/{y}.png',
|
|
87
87
|
multipliers: {
|
|
88
|
-
x:
|
|
89
|
-
y:
|
|
88
|
+
x: 70272,
|
|
89
|
+
y: 76157
|
|
90
90
|
},
|
|
91
91
|
breakpoints: {
|
|
92
92
|
uk: {
|
|
@@ -103,8 +103,8 @@
|
|
|
103
103
|
// 游戏地转地图坐标
|
|
104
104
|
calculateMapCoordinate (x, y) {
|
|
105
105
|
return [
|
|
106
|
-
x / 1.
|
|
107
|
-
y / 1.
|
|
106
|
+
x / 1.609055 + mapConfig.ets.multipliers.x,
|
|
107
|
+
y / 1.609055 + mapConfig.ets.multipliers.y
|
|
108
108
|
];
|
|
109
109
|
}
|
|
110
110
|
},
|
|
@@ -140,7 +140,8 @@
|
|
|
140
140
|
let map = L.map('map', {
|
|
141
141
|
attributionControl: false,
|
|
142
142
|
crs: L.CRS.Simple,
|
|
143
|
-
zoomControl: false
|
|
143
|
+
zoomControl: false,
|
|
144
|
+
zoomSnap: 0.1
|
|
144
145
|
});
|
|
145
146
|
|
|
146
147
|
function setData(data) {
|
|
@@ -152,8 +153,10 @@
|
|
|
152
153
|
|
|
153
154
|
// 瓦片地图
|
|
154
155
|
L.tileLayer(mapConfig[data.mapType].tileUrl, {
|
|
155
|
-
minZoom:
|
|
156
|
+
minZoom: 0,
|
|
156
157
|
maxZoom: 8,
|
|
158
|
+
minNativeZoom: 1,
|
|
159
|
+
maxNativeZoom: 8,
|
|
157
160
|
tileSize: 512,
|
|
158
161
|
bounds: bounds,
|
|
159
162
|
reuseTiles: true
|