mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-12 05:08:19 +08:00
Fix: Disable MAP_IS_ONE_TIME_STAGE in event dailies, last fix not working
This commit is contained in:
28
module/event/base.py
Normal file
28
module/event/base.py
Normal file
@@ -0,0 +1,28 @@
|
||||
import re
|
||||
|
||||
from module.base.filter import Filter
|
||||
from module.campaign.run import CampaignRun
|
||||
|
||||
STAGE_FILTER = Filter(regex=re.compile('^(.*?)$'), attr=('stage',))
|
||||
|
||||
|
||||
class EventStage:
|
||||
def __init__(self, filename):
|
||||
self.filename = filename
|
||||
self.stage = 'unknown'
|
||||
if filename[-3:] == '.py':
|
||||
self.stage = filename[:-3]
|
||||
|
||||
def __str__(self):
|
||||
return self.stage
|
||||
|
||||
def __eq__(self, other):
|
||||
return str(self) == str(other)
|
||||
|
||||
|
||||
class EventBase(CampaignRun):
|
||||
def load_campaign(self, *args, **kwargs):
|
||||
super().load_campaign(*args, **kwargs)
|
||||
self.campaign.config.temporary(
|
||||
MAP_IS_ONE_TIME_STAGE=False
|
||||
)
|
||||
Reference in New Issue
Block a user