mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-26 18:20:42 +00:00
Fix: Folder create when --enable_drop_screenshot disabled
This commit is contained in:
parent
3702b1c6da
commit
c402d3e047
@ -61,12 +61,10 @@ class CampaignRun(CampaignUI, Reward, LoginHandler):
|
||||
return True
|
||||
|
||||
def campaign_name_set(self, name):
|
||||
# self.config.CAMPAIGN_NAME = name
|
||||
# folder = self.config.SCREEN_SHOT_SAVE_FOLDER_BASE + '/' + name
|
||||
# if not os.path.exists(folder):
|
||||
# os.mkdir(folder)
|
||||
# self.config.SCREEN_SHOT_SAVE_FOLDER = folder
|
||||
|
||||
if not self.campaign.config.ENABLE_SAVE_GET_ITEMS \
|
||||
or not len(self.campaign.config.SCREEN_SHOT_SAVE_FOLDER_BASE.strip()):
|
||||
return False
|
||||
# Create folder to save drop screenshot
|
||||
folder = self.campaign.config.SCREEN_SHOT_SAVE_FOLDER_BASE + '/' + name
|
||||
if not os.path.exists(folder):
|
||||
os.mkdir(folder)
|
||||
|
@ -340,9 +340,12 @@ class AzurLaneConfig:
|
||||
C124_AMMO_PICK_UP = 3
|
||||
|
||||
def create_folder(self):
|
||||
for folder in [self.ASSETS_FOLDER, self.PERSPECTIVE_ERROR_LOG_FOLDER, self.ERROR_LOG_FOLDER]:
|
||||
if folder and not os.path.exists(folder):
|
||||
os.mkdir(folder)
|
||||
self.SCREEN_SHOT_SAVE_FOLDER = self.SCREEN_SHOT_SAVE_FOLDER_BASE + '/' + self.CAMPAIGN_NAME
|
||||
for folder in [self.SCREEN_SHOT_SAVE_FOLDER_BASE, self.ASSETS_FOLDER, self.SCREEN_SHOT_SAVE_FOLDER,
|
||||
self.PERSPECTIVE_ERROR_LOG_FOLDER, self.ERROR_LOG_FOLDER]:
|
||||
if self.ENABLE_SAVE_GET_ITEMS and len(self.SCREEN_SHOT_SAVE_FOLDER_BASE.strip()):
|
||||
for folder in [self.SCREEN_SHOT_SAVE_FOLDER_BASE, self.SCREEN_SHOT_SAVE_FOLDER]:
|
||||
if folder and not os.path.exists(folder):
|
||||
os.mkdir(folder)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user