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

fix: mission event

This commit is contained in:
RedDeadDepresso 2024-01-03 16:44:17 +00:00 committed by YoursFunny
parent 782e61ad9a
commit 92aaac7b5a
Signed by: YoursFunny
GPG Key ID: 207EDC3CD5B40F9C
7 changed files with 50 additions and 6 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

View File

@ -47,6 +47,50 @@ CHECK_XP = ButtonWrapper(
button=(94, 135, 325, 194),
),
)
EVENT_INDEX = ButtonWrapper(
name='EVENT_INDEX',
jp=None,
en=Button(
file='./assets/en/mission/EVENT_INDEX.png',
area=(704, 135, 761, 694),
search=(684, 115, 781, 714),
color=(189, 197, 195),
button=(704, 135, 761, 694),
),
)
EVENT_ITEM = ButtonWrapper(
name='EVENT_ITEM',
jp=None,
en=Button(
file='./assets/en/mission/EVENT_ITEM.png',
area=(691, 136, 1198, 232),
search=(671, 116, 1218, 252),
color=(201, 219, 224),
button=(691, 136, 1198, 232),
),
)
EVENT_LIST = ButtonWrapper(
name='EVENT_LIST',
jp=None,
en=Button(
file='./assets/en/mission/EVENT_LIST.png',
area=(695, 137, 1196, 688),
search=(675, 117, 1216, 708),
color=(171, 185, 190),
button=(695, 137, 1196, 688),
),
)
EVENT_STARS = ButtonWrapper(
name='EVENT_STARS',
jp=None,
en=Button(
file='./assets/en/mission/EVENT_STARS.png',
area=(704, 186, 761, 218),
search=(684, 166, 781, 238),
color=(228, 223, 194),
button=(704, 186, 761, 218),
),
)
HARD_OFF = ButtonWrapper(
name='HARD_OFF',
jp=None,

View File

@ -219,7 +219,7 @@ class Mission(MissionUI, CommissionsUI):
self.update_task(failure=True)
return MissionStatus.AP
case MissionStatus.ENTER:
if self.enter_stage(self.current_stage):
if self.enter_stage(self.current_mode, self.current_stage):
return MissionStatus.SWEEP
self.update_task(failure=True)
return MissionStatus.AP

View File

@ -11,6 +11,7 @@ from tasks.stage.mission_list import StageList
from tasks.stage.sweep import StageSweep
SHARED_LIST = StageList('SharedList')
EVENT_LIST = StageList('EventList', EVENT_LIST, EVENT_INDEX, EVENT_ITEM, button_stars=EVENT_STARS)
SHARED_SWEEP = StageSweep('MissionSweep', 99)
SHARED_SWEEP.set_button(button_check=CHECK_MISSION_SWEEP) # Check sweep is different for mission, event
COMMISSIONS_SWEEP = StageSweep('SharedSweep', 99)
@ -37,7 +38,7 @@ MODE_TO_PAGE = {
"H": (MISSION_CHECK, page_mission),
"XP": (CHECK_XP, page_commissions),
"CR": (CHECK_CR, page_commissions),
"E" : (EVENT_CHECK) #page_event
"E" : (EVENT_CHECK, None) #page_event
}
@ -94,10 +95,9 @@ class MissionUI(UI, AP):
switch.set('on', main=self)
return True
def enter_stage(self, index: int) -> bool:
if not index:
index = SHARED_LIST.insight_max_sweepable_index(self)
if SHARED_LIST.select_index_enter(self, index):
def enter_stage(self, mode, index: int) -> bool:
list = EVENT_LIST if mode == "E" else SHARED_LIST
if list.select_index_enter(self, index):
return True
return False