@bettergi/utils 0.1.25 → 0.1.27
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/dist/ocr.js +6 -1
- package/package.json +2 -2
package/dist/ocr.js
CHANGED
|
@@ -246,7 +246,12 @@ export const findWithinListView = async (condition, listView, retryOptions, samp
|
|
|
246
246
|
}, { maxAttempts, retryInterval });
|
|
247
247
|
if (targetRegion?.isExist()) {
|
|
248
248
|
const { item1, item2 } = targetRegion.convertPositionToGameCaptureRegion(0, 0);
|
|
249
|
-
|
|
249
|
+
const scale = genshin.width / 1920;
|
|
250
|
+
const [x, y] = [
|
|
251
|
+
Math.floor(scale <= 1 ? item1 : item1 / scale),
|
|
252
|
+
Math.floor(scale <= 1 ? item2 : item2 / scale)
|
|
253
|
+
];
|
|
254
|
+
Object.assign(targetRegion, { x, y });
|
|
250
255
|
return targetRegion;
|
|
251
256
|
}
|
|
252
257
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bettergi/utils",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.27",
|
|
4
4
|
"description": "开发 BetterGI 脚本常用工具集",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "Bread Grocery<https://github.com/breadgrocery>",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"utils"
|
|
30
30
|
],
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@bettergi/types": "^0.1.
|
|
32
|
+
"@bettergi/types": "^0.1.10"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"rimraf": "^6.1.2",
|