Skip to content

Commit

Permalink
Merge pull request #669 from LmeSzinc/master
Browse files Browse the repository at this point in the history
[pull] master from LmeSzinc:master
  • Loading branch information
pull[bot] authored Sep 15, 2024
2 parents c5acbed + 4199dd5 commit 02ced95
Show file tree
Hide file tree
Showing 43 changed files with 82 additions and 41 deletions.
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Binary file added assets/cn/combat_ui/PAUSE_Iridescent_Fantasy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/cn/combat_ui/PAUSE_New.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Binary file added assets/cn/combat_ui/QUIT_Iridescent_Fantasy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/cn/combat_ui/QUIT_New.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
Binary file added assets/en/combat_ui/PAUSE_Iridescent_Fantasy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/en/combat_ui/PAUSE_New.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Binary file added assets/jp/combat_ui/PAUSE_Iridescent_Fantasy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/jp/combat_ui/PAUSE_New.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Binary file added assets/tw/combat_ui/PAUSE_Iridescent_Fantasy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/tw/combat_ui/PAUSE_New.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
9 changes: 5 additions & 4 deletions campaign/event_20240912_cn/a1.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
MAP = CampaignMap('A1')
MAP.shape = 'I7'
MAP.camera_data = ['D5', 'F2', 'F5']
MAP.camera_data_spawn_point = ['D2']
MAP.camera_data_spawn_point = ['D1']
MAP.map_data = """
SP -- SP ++ ++ -- ME -- --
-- -- -- ++ ++ ME -- MB --
Expand Down Expand Up @@ -65,10 +65,11 @@ class Config:
'distance': 50,
'wlen': 1000
}
HOMO_CANNY_THRESHOLD = (75, 100)
STAGE_ENTRANCE = ['half', '20240725']
MAP_SWIPE_MULTIPLY = (1.157, 1.179)
MAP_SWIPE_MULTIPLY_MINITOUCH = (1.119, 1.140)
MAP_SWIPE_MULTIPLY_MAATOUCH = (1.086, 1.106)
MAP_SWIPE_MULTIPLY = (1.234, 1.257)
MAP_SWIPE_MULTIPLY_MINITOUCH = (1.193, 1.215)
MAP_SWIPE_MULTIPLY_MAATOUCH = (1.158, 1.179)


class Campaign(CampaignBase):
Expand Down
2 changes: 1 addition & 1 deletion campaign/event_20240912_cn/b1.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
MAP = CampaignMap('B1')
MAP.shape = 'K8'
MAP.camera_data = ['D3', 'D6', 'G2', 'G6']
MAP.camera_data_spawn_point = ['G2']
MAP.camera_data_spawn_point = ['E2']
MAP.map_data = """
-- ++ ++ ++ SP -- SP ++ -- -- --
ME -- Me -- -- __ -- -- -- MB --
Expand Down
7 changes: 4 additions & 3 deletions campaign/event_20240912_cn/b3.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,10 @@ class Config(ConfigBase):
MAP_HAS_AMBUSH = False
MAP_HAS_MYSTERY = False
# ===== End of generated config =====
MAP_SWIPE_MULTIPLY = (1.365, 1.391)
MAP_SWIPE_MULTIPLY_MINITOUCH = (1.320, 1.344)
MAP_SWIPE_MULTIPLY_MAATOUCH = (1.282, 1.305)

MAP_SWIPE_MULTIPLY = (1.035, 1.055)
MAP_SWIPE_MULTIPLY_MINITOUCH = (1.001, 1.019)
MAP_SWIPE_MULTIPLY_MAATOUCH = (0.972, 0.989)


class Campaign(CampaignBase):
Expand Down
13 changes: 8 additions & 5 deletions campaign/event_20240912_cn/c1.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
MAP = CampaignMap('C1')
MAP.shape = 'I7'
MAP.camera_data = ['D5', 'F2', 'F5']
MAP.camera_data_spawn_point = ['D2']
MAP.camera_data_spawn_point = ['D1']
MAP.map_data = """
SP -- SP ++ ++ -- ME -- --
-- -- -- ++ ++ ME -- MB --
Expand Down Expand Up @@ -53,7 +53,7 @@ class Config:
MAP_HAS_AMBUSH = False
MAP_HAS_MYSTERY = False
# ===== End of generated config =====
STAGE_ENTRANCE = ['half', '20240725']

INTERNAL_LINES_FIND_PEAKS_PARAMETERS = {
'height': (120, 255 - 49),
'width': (1.5, 10),
Expand All @@ -66,9 +66,12 @@ class Config:
'distance': 50,
'wlen': 1000
}
MAP_SWIPE_MULTIPLY = (1.149, 1.170)
MAP_SWIPE_MULTIPLY_MINITOUCH = (1.111, 1.132)
MAP_SWIPE_MULTIPLY_MAATOUCH = (1.079, 1.098)
HOMO_CANNY_THRESHOLD = (75, 100)
STAGE_ENTRANCE = ['half', '20240725']
MAP_SWIPE_MULTIPLY = (1.234, 1.257)
MAP_SWIPE_MULTIPLY_MINITOUCH = (1.193, 1.215)
MAP_SWIPE_MULTIPLY_MAATOUCH = (1.158, 1.179)


class Campaign(CampaignBase):
MAP = MAP
Expand Down
2 changes: 1 addition & 1 deletion campaign/event_20240912_cn/d1.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
MAP = CampaignMap('D1')
MAP.shape = 'K8'
MAP.camera_data = ['D3', 'D6', 'G2', 'G6']
MAP.camera_data_spawn_point = ['G2']
MAP.camera_data_spawn_point = ['E2']
MAP.map_data = """
-- ++ ++ ++ SP -- SP ++ -- -- --
ME -- Me -- -- __ -- -- -- MB --
Expand Down
7 changes: 4 additions & 3 deletions campaign/event_20240912_cn/d3.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,10 @@ class Config(ConfigBase):
MAP_HAS_AMBUSH = False
MAP_HAS_MYSTERY = False
# ===== End of generated config =====
MAP_SWIPE_MULTIPLY = (1.365, 1.391)
MAP_SWIPE_MULTIPLY_MINITOUCH = (1.320, 1.344)
MAP_SWIPE_MULTIPLY_MAATOUCH = (1.282, 1.305)

MAP_SWIPE_MULTIPLY = (1.035, 1.055)
MAP_SWIPE_MULTIPLY_MINITOUCH = (1.001, 1.019)
MAP_SWIPE_MULTIPLY_MAATOUCH = (0.972, 0.989)


class Campaign(CampaignBase):
Expand Down
3 changes: 2 additions & 1 deletion campaign/event_20240912_cn/sp.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
MAP = CampaignMap('SP')
MAP.shape = 'K5'
MAP.camera_data = ['D3', 'F3']
MAP.camera_data_spawn_point = ['I3']
MAP.camera_data_spawn_point = ['I2']
MAP.map_data = """
++ -- ME -- ++ -- ME -- ++ ++ ++
-- -- -- ME ++ ME -- MS -- -- SP
Expand Down Expand Up @@ -68,6 +68,7 @@ class Config:
'distance': 50,
'wlen': 1000
}
HOMO_CANNY_THRESHOLD = (75, 100)
MAP_SWIPE_MULTIPLY = (1.194, 1.217)
MAP_SWIPE_MULTIPLY_MINITOUCH = (1.155, 1.176)
MAP_SWIPE_MULTIPLY_MAATOUCH = (1.121, 1.142)
Expand Down
2 changes: 0 additions & 2 deletions module/combat/assets.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@
MOVE_LEFT_DOWN = Button(area={'cn': (67, 668, 112, 707), 'en': (67, 668, 112, 707), 'jp': (67, 668, 112, 707), 'tw': (67, 668, 112, 707)}, color={'cn': (65, 80, 100), 'en': (65, 80, 100), 'jp': (65, 80, 100), 'tw': (65, 80, 100)}, button={'cn': (67, 668, 112, 707), 'en': (67, 668, 112, 707), 'jp': (67, 668, 112, 707), 'tw': (67, 668, 112, 707)}, file={'cn': './assets/cn/combat/MOVE_LEFT_DOWN.png', 'en': './assets/en/combat/MOVE_LEFT_DOWN.png', 'jp': './assets/jp/combat/MOVE_LEFT_DOWN.png', 'tw': './assets/tw/combat/MOVE_LEFT_DOWN.png'})
NEW_SHIP = Button(area={'cn': (206, 87, 213, 93), 'en': (206, 87, 213, 93), 'jp': (206, 87, 213, 93), 'tw': (206, 87, 213, 93)}, color={'cn': (235, 171, 60), 'en': (235, 171, 60), 'jp': (235, 171, 60), 'tw': (235, 171, 60)}, button={'cn': (206, 87, 213, 93), 'en': (206, 87, 213, 93), 'jp': (206, 87, 213, 93), 'tw': (206, 87, 213, 93)}, file={'cn': './assets/cn/combat/NEW_SHIP.png', 'en': './assets/en/combat/NEW_SHIP.png', 'jp': './assets/jp/combat/NEW_SHIP.png', 'tw': './assets/tw/combat/NEW_SHIP.png'})
OPTS_INFO_D = Button(area={'cn': (602, 151, 703, 179), 'en': (565, 143, 692, 179), 'jp': (512, 154, 605, 176), 'tw': (602, 152, 702, 177)}, color={'cn': (157, 115, 123), 'en': (171, 116, 110), 'jp': (201, 187, 191), 'tw': (164, 130, 137)}, button={'cn': (583, 605, 677, 628), 'en': (590, 587, 627, 647), 'jp': (574, 596, 685, 635), 'tw': (583, 604, 676, 627)}, file={'cn': './assets/cn/combat/OPTS_INFO_D.png', 'en': './assets/en/combat/OPTS_INFO_D.png', 'jp': './assets/jp/combat/OPTS_INFO_D.png', 'tw': './assets/tw/combat/OPTS_INFO_D.png'})
PAUSE = Button(area={'cn': (1217, 36, 1225, 59), 'en': (1155, 38, 1216, 51), 'jp': (1232, 36, 1240, 60), 'tw': (1217, 36, 1225, 59)}, color={'cn': (247, 243, 247), 'en': (164, 169, 181), 'jp': (244, 241, 246), 'tw': (247, 243, 247)}, button={'cn': (1157, 34, 1241, 61), 'en': (1136, 26, 1270, 63), 'jp': (1141, 38, 1220, 57), 'tw': (1157, 34, 1241, 61)}, file={'cn': './assets/cn/combat/PAUSE.png', 'en': './assets/en/combat/PAUSE.png', 'jp': './assets/jp/combat/PAUSE.png', 'tw': './assets/tw/combat/PAUSE.png'})
PAUSE_DOUBLE_CHECK = Button(area={'cn': (1226, 35, 1231, 60), 'en': (1226, 35, 1231, 61), 'jp': (1226, 35, 1230, 60), 'tw': (1226, 35, 1231, 60)}, color={'cn': (96, 104, 136), 'en': (83, 98, 118), 'jp': (97, 102, 120), 'tw': (96, 104, 136)}, button={'cn': (1226, 35, 1231, 60), 'en': (1226, 35, 1231, 61), 'jp': (1226, 35, 1230, 60), 'tw': (1226, 35, 1231, 60)}, file={'cn': './assets/cn/combat/PAUSE_DOUBLE_CHECK.png', 'en': './assets/en/combat/PAUSE_DOUBLE_CHECK.png', 'jp': './assets/jp/combat/PAUSE_DOUBLE_CHECK.png', 'tw': './assets/tw/combat/PAUSE_DOUBLE_CHECK.png'})
READY_AIR_RAID = Button(area={'cn': (887, 618, 907, 628), 'en': (887, 618, 907, 628), 'jp': (887, 618, 907, 628), 'tw': (887, 618, 907, 628)}, color={'cn': (255, 255, 255), 'en': (255, 255, 255), 'jp': (255, 255, 255), 'tw': (255, 255, 255)}, button={'cn': (887, 618, 907, 628), 'en': (887, 618, 907, 628), 'jp': (887, 618, 907, 628), 'tw': (887, 618, 907, 628)}, file={'cn': './assets/cn/combat/READY_AIR_RAID.png', 'en': './assets/en/combat/READY_AIR_RAID.png', 'jp': './assets/jp/combat/READY_AIR_RAID.png', 'tw': './assets/tw/combat/READY_AIR_RAID.png'})
READY_TORPEDO = Button(area={'cn': (1038, 611, 1046, 619), 'en': (1038, 611, 1046, 619), 'jp': (1038, 611, 1046, 619), 'tw': (1038, 611, 1046, 619)}, color={'cn': (255, 255, 255), 'en': (255, 255, 255), 'jp': (255, 255, 255), 'tw': (255, 255, 255)}, button={'cn': (1038, 611, 1046, 619), 'en': (1038, 611, 1046, 619), 'jp': (1038, 611, 1046, 619), 'tw': (1038, 611, 1046, 619)}, file={'cn': './assets/cn/combat/READY_TORPEDO.png', 'en': './assets/en/combat/READY_TORPEDO.png', 'jp': './assets/jp/combat/READY_TORPEDO.png', 'tw': './assets/tw/combat/READY_TORPEDO.png'})
SUBMARINE_AVAILABLE_CHECK_1 = Button(area={'cn': (707, 660, 712, 665), 'en': (707, 660, 712, 665), 'jp': (707, 660, 712, 665), 'tw': (707, 660, 712, 665)}, color={'cn': (255, 255, 255), 'en': (255, 255, 255), 'jp': (255, 255, 255), 'tw': (255, 255, 255)}, button={'cn': (707, 660, 712, 665), 'en': (707, 660, 712, 665), 'jp': (707, 660, 712, 665), 'tw': (707, 660, 712, 665)}, file={'cn': './assets/cn/combat/SUBMARINE_AVAILABLE_CHECK_1.png', 'en': './assets/en/combat/SUBMARINE_AVAILABLE_CHECK_1.png', 'jp': './assets/jp/combat/SUBMARINE_AVAILABLE_CHECK_1.png', 'tw': './assets/tw/combat/SUBMARINE_AVAILABLE_CHECK_1.png'})
Expand Down
28 changes: 26 additions & 2 deletions module/combat/combat.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from module.base.timer import Timer
from module.base.utils import get_color, color_similar
from module.combat.assets import *
from module.combat_ui.assets import *
from module.combat.combat_auto import CombatAuto
from module.combat.combat_manual import CombatManual
from module.combat.hp_balancer import HPBalancer
Expand Down Expand Up @@ -81,13 +82,36 @@ def is_combat_executing(self):
bool:
"""
self.device.stuck_record_add(PAUSE)
if self.config.SERVER in ['en']:
return PAUSE.match_luma(self.device.image, offset=(20, 20))
if self.config.SERVER in ['cn', 'en']:
if PAUSE.match_luma(self.device.image, offset=(20, 20)):
return True
else:
color = get_color(self.device.image, PAUSE.area)
if color_similar(color, PAUSE.color) or color_similar(color, (238, 244, 248)):
if np.max(self.image_crop(PAUSE_DOUBLE_CHECK, copy=False)) < 153:
return True
if PAUSE_New.match_luma(self.device.image, offset=(20, 20)):
return True
if PAUSE_Iridescent_Fantasy.match_luma(self.device.image, offset=(20, 20)):
return True
return False

def handle_combat_quit(self, offset=(20, 20), interval=3):
timer = self.get_interval_timer(QUIT, interval=interval)
if not timer.reached():
return False
if QUIT.match_luma(self.device.image, offset=offset):
self.device.click(QUIT)
timer.reset()
return True
if QUIT_New.match_luma(self.device.image, offset=offset):
self.device.click(QUIT_New)
timer.reset()
return True
if QUIT_Iridescent_Fantasy.match_luma(self.device.image, offset=offset):
self.device.click(QUIT_Iridescent_Fantasy)
timer.reset()
return True
return False

def ensure_combat_oil_loaded(self):
Expand Down
13 changes: 13 additions & 0 deletions module/combat_ui/assets.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from module.base.button import Button
from module.base.template import Template

# This file was automatically generated by dev_tools/button_extract.py.
# Don't modify it manually.

PAUSE = Button(area={'cn': (1158, 40, 1199, 58), 'en': (1155, 38, 1216, 51), 'jp': (1232, 36, 1240, 60), 'tw': (1217, 36, 1225, 59)}, color={'cn': (189, 190, 202), 'en': (164, 169, 181), 'jp': (244, 241, 246), 'tw': (247, 243, 247)}, button={'cn': (1157, 34, 1241, 61), 'en': (1136, 26, 1270, 63), 'jp': (1141, 38, 1220, 57), 'tw': (1157, 34, 1241, 61)}, file={'cn': './assets/cn/combat_ui/PAUSE.png', 'en': './assets/en/combat_ui/PAUSE.png', 'jp': './assets/jp/combat_ui/PAUSE.png', 'tw': './assets/tw/combat_ui/PAUSE.png'})
PAUSE_DOUBLE_CHECK = Button(area={'cn': (1226, 35, 1231, 60), 'en': (1226, 35, 1231, 61), 'jp': (1226, 35, 1230, 60), 'tw': (1226, 35, 1231, 60)}, color={'cn': (96, 104, 136), 'en': (83, 98, 118), 'jp': (97, 102, 120), 'tw': (96, 104, 136)}, button={'cn': (1226, 35, 1231, 60), 'en': (1226, 35, 1231, 61), 'jp': (1226, 35, 1230, 60), 'tw': (1226, 35, 1231, 60)}, file={'cn': './assets/cn/combat_ui/PAUSE_DOUBLE_CHECK.png', 'en': './assets/en/combat_ui/PAUSE_DOUBLE_CHECK.png', 'jp': './assets/jp/combat_ui/PAUSE_DOUBLE_CHECK.png', 'tw': './assets/tw/combat_ui/PAUSE_DOUBLE_CHECK.png'})
PAUSE_Iridescent_Fantasy = Button(area={'cn': (1232, 33, 1252, 57), 'en': (1232, 33, 1252, 57), 'jp': (1232, 33, 1252, 57), 'tw': (1232, 33, 1252, 57)}, color={'cn': (124, 139, 190), 'en': (124, 139, 190), 'jp': (124, 139, 190), 'tw': (124, 139, 190)}, button={'cn': (1232, 33, 1252, 57), 'en': (1232, 33, 1252, 57), 'jp': (1232, 33, 1252, 57), 'tw': (1232, 33, 1252, 57)}, file={'cn': './assets/cn/combat_ui/PAUSE_Iridescent_Fantasy.png', 'en': './assets/en/combat_ui/PAUSE_Iridescent_Fantasy.png', 'jp': './assets/jp/combat_ui/PAUSE_Iridescent_Fantasy.png', 'tw': './assets/tw/combat_ui/PAUSE_Iridescent_Fantasy.png'})
PAUSE_New = Button(area={'cn': (1231, 29, 1253, 56), 'en': (1231, 29, 1253, 56), 'jp': (1231, 29, 1253, 56), 'tw': (1231, 29, 1253, 56)}, color={'cn': (156, 158, 166), 'en': (156, 158, 166), 'jp': (156, 158, 166), 'tw': (156, 158, 166)}, button={'cn': (1231, 29, 1253, 56), 'en': (1231, 29, 1253, 56), 'jp': (1231, 29, 1253, 56), 'tw': (1231, 29, 1253, 56)}, file={'cn': './assets/cn/combat_ui/PAUSE_New.png', 'en': './assets/en/combat_ui/PAUSE_New.png', 'jp': './assets/jp/combat_ui/PAUSE_New.png', 'tw': './assets/tw/combat_ui/PAUSE_New.png'})
QUIT = Button(area={'cn': (420, 490, 593, 548), 'en': (459, 508, 582, 532), 'jp': (433, 490, 606, 547), 'tw': (433, 490, 606, 547)}, color={'cn': (199, 122, 114), 'en': (221, 177, 174), 'jp': (196, 120, 113), 'tw': (200, 126, 118)}, button={'cn': (420, 490, 593, 548), 'en': (459, 508, 582, 532), 'jp': (433, 490, 606, 547), 'tw': (433, 490, 606, 547)}, file={'cn': './assets/cn/combat_ui/QUIT.png', 'en': './assets/en/combat_ui/QUIT.png', 'jp': './assets/jp/combat_ui/QUIT.png', 'tw': './assets/tw/combat_ui/QUIT.png'})
QUIT_Iridescent_Fantasy = Button(area={'cn': (391, 522, 464, 540), 'en': (391, 522, 464, 540), 'jp': (391, 522, 464, 540), 'tw': (391, 522, 464, 540)}, color={'cn': (121, 73, 79), 'en': (121, 73, 79), 'jp': (121, 73, 79), 'tw': (121, 73, 79)}, button={'cn': (391, 522, 464, 540), 'en': (391, 522, 464, 540), 'jp': (391, 522, 464, 540), 'tw': (391, 522, 464, 540)}, file={'cn': './assets/cn/combat_ui/QUIT_Iridescent_Fantasy.png', 'en': './assets/cn/combat_ui/QUIT_Iridescent_Fantasy.png', 'jp': './assets/cn/combat_ui/QUIT_Iridescent_Fantasy.png', 'tw': './assets/cn/combat_ui/QUIT_Iridescent_Fantasy.png'})
QUIT_New = Button(area={'cn': (394, 506, 467, 524), 'en': (394, 506, 467, 524), 'jp': (394, 506, 467, 524), 'tw': (394, 506, 467, 524)}, color={'cn': (255, 180, 171), 'en': (255, 180, 171), 'jp': (255, 180, 171), 'tw': (255, 180, 171)}, button={'cn': (394, 506, 467, 524), 'en': (394, 506, 467, 524), 'jp': (394, 506, 467, 524), 'tw': (394, 506, 467, 524)}, file={'cn': './assets/cn/combat_ui/QUIT_New.png', 'en': './assets/cn/combat_ui/QUIT_New.png', 'jp': './assets/cn/combat_ui/QUIT_New.png', 'tw': './assets/cn/combat_ui/QUIT_New.png'})
10 changes: 1 addition & 9 deletions module/config/argument/args.json
Original file line number Diff line number Diff line change
Expand Up @@ -1714,7 +1714,6 @@
"display": "hide",
"option_bold": [
"event_20220324_cn",
"event_20240829_cn",
"event_20240912_cn"
],
"cn": "event_20240912_cn",
Expand Down Expand Up @@ -2054,7 +2053,6 @@
],
"option_bold": [
"event_20220324_cn",
"event_20240829_cn",
"event_20240912_cn"
],
"cn": "event_20240912_cn",
Expand Down Expand Up @@ -2509,12 +2507,11 @@
],
"option_bold": [
"event_20220324_cn",
"event_20240829_cn",
"event_20240912_cn"
],
"cn": "event_20240912_cn",
"en": "event_20240912_cn",
"jp": "eevent_20240912_cn",
"jp": "event_20240912_cn",
"tw": "event_20220324_cn"
},
"Mode": {
Expand Down Expand Up @@ -3922,7 +3919,6 @@
],
"option_bold": [
"event_20220324_cn",
"event_20240829_cn",
"event_20240912_cn"
],
"cn": "event_20240912_cn",
Expand Down Expand Up @@ -4394,7 +4390,6 @@
],
"option_bold": [
"event_20220324_cn",
"event_20240829_cn",
"event_20240912_cn"
],
"cn": "event_20240912_cn",
Expand Down Expand Up @@ -4866,7 +4861,6 @@
],
"option_bold": [
"event_20220324_cn",
"event_20240829_cn",
"event_20240912_cn"
],
"cn": "event_20240912_cn",
Expand Down Expand Up @@ -5338,7 +5332,6 @@
],
"option_bold": [
"event_20220324_cn",
"event_20240829_cn",
"event_20240912_cn"
],
"cn": "event_20240912_cn",
Expand Down Expand Up @@ -5800,7 +5793,6 @@
],
"option_bold": [
"event_20220324_cn",
"event_20240829_cn",
"event_20240912_cn"
],
"cn": "event_20240912_cn",
Expand Down
2 changes: 1 addition & 1 deletion module/config/i18n/zh-TW.json
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,7 @@
"event_20240725_cn": "Interlude of Illusions",
"event_20240815_cn": "Windborne Steel Wings",
"event_20240829_cn": "Whence Flowers Bear No Fruit",
"event_20240912_cn": "喚醒蒼紅之炎",
"event_20240912_cn": "Ode of Everblooming Crimson",
"raid_20200624": "特別演習埃塞克斯級(復刻)",
"raid_20210708": "復刻穿越彼方的水線",
"raid_20220127": "演習神秘事件調查",
Expand Down
7 changes: 4 additions & 3 deletions module/device/method/ldopengl.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,6 @@ def __init__(self, ld_folder: str, instance_id: int):
f'ldopengl_dll={ldopengl_dll}, '
f'instance_id={instance_id}'
)
self.console = LDConsole(ld_folder)
self.info = self.get_player_info_by_index(instance_id)

# Load dll
try:
self.lib = ctypes.WinDLL(ldopengl_dll)
Expand All @@ -206,6 +203,10 @@ def __init__(self, ld_folder: str, instance_id: int):
f'ldopengl_dll={ldopengl_dll} exist, '
f'but cannot be loaded'
)
# Get info after loading DLL, so DLL existence can act as a version check
self.console = LDConsole(ld_folder)
self.info = self.get_player_info_by_index(instance_id)

self.lib.CreateScreenShotInstance.restype = ctypes.c_void_p

# Get screenshot instance
Expand Down
6 changes: 6 additions & 0 deletions module/device/method/nemu_ipc.py
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,9 @@ def nemu_ipc(self) -> NemuIpcImpl:
"""
# Try existing settings first
if self.config.EmulatorInfo_path:
if 'MuMuPlayerGlobal' in self.config.EmulatorInfo_path:
logger.info(f'nemu_ipc is not available on MuMuPlayerGlobal, {self.config.EmulatorInfo_path}')
raise RequestHumanTakeover
folder = os.path.abspath(os.path.join(self.config.EmulatorInfo_path, '../../'))
index = NemuIpcImpl.serial_to_id(self.serial)
if index is not None:
Expand All @@ -488,6 +491,9 @@ def nemu_ipc(self) -> NemuIpcImpl:
if self.emulator_instance is None:
logger.error('Unable to use NemuIpc because emulator instance not found')
raise RequestHumanTakeover
if 'MuMuPlayerGlobal' in self.emulator_instance.path:
logger.info(f'nemu_ipc is not available on MuMuPlayerGlobal, {self.emulator_instance.path}')
raise RequestHumanTakeover
try:
return NemuIpcImpl(
nemu_folder=self.emulator_instance.emulator.abspath('../'),
Expand Down
Loading

0 comments on commit 02ced95

Please sign in to comment.