@bettergi/utils 0.1.25 → 0.1.26

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.
Files changed (2) hide show
  1. package/dist/ocr.js +7 -1
  2. package/package.json +2 -2
package/dist/ocr.js CHANGED
@@ -246,7 +246,13 @@ 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
- Object.assign(targetRegion, { x: item1, y: item2 });
249
+ const scale = genshin.width / 1920;
250
+ if (scale <= 1) {
251
+ Object.assign(targetRegion, { x: item1, y: item2 });
252
+ }
253
+ else {
254
+ Object.assign(targetRegion, { x: item1 / scale, y: item2 / scale });
255
+ }
250
256
  return targetRegion;
251
257
  }
252
258
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bettergi/utils",
3
- "version": "0.1.25",
3
+ "version": "0.1.26",
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.7"
32
+ "@bettergi/types": "^0.1.10"
33
33
  },
34
34
  "devDependencies": {
35
35
  "rimraf": "^6.1.2",