1
0
mirror of https://github.com/TheFunny/ArisuAutoSweeper synced 2025-12-16 15:35:12 +00:00

feat(stage): add offset to stage item box

This commit is contained in:
YoursFunny 2023-11-16 20:30:33 +08:00
parent 51ecdf4908
commit e82c4f875c
Signed by: YoursFunny
GPG Key ID: 207EDC3CD5B40F9C

View File

@ -152,6 +152,7 @@ class StageList:
main: ModuleBase,
insight: bool = True,
sweepable: bool = True,
offset: tuple[int, int] = (-20, -15),
skip_first_screenshot: bool = True,
interval: int = 5
) -> bool:
@ -175,7 +176,7 @@ class StageList:
logger.warning(f'No index {index} in {self.index_ocr.name}')
return False
stage_item_box = area_pad((0, 0, *area_size(self.stage_item)))
stage_item_box = area_pad((*offset, *area_size(self.stage_item)))
search_box = area_offset(stage_item_box, index_box.box[:2])
search_image = main.image_crop(search_box)