mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-24 09:33:34 +00:00
commit
2fb637febd
@ -299,10 +299,18 @@ class Emulator(EmulatorBase):
|
|||||||
for folder in self.list_folder('../vms', is_dir=True):
|
for folder in self.list_folder('../vms', is_dir=True):
|
||||||
for file in iter_folder(folder, ext='.nemu'):
|
for file in iter_folder(folder, ext='.nemu'):
|
||||||
serial = Emulator.vbox_file_to_serial(file)
|
serial = Emulator.vbox_file_to_serial(file)
|
||||||
|
name = os.path.basename(folder)
|
||||||
if serial:
|
if serial:
|
||||||
yield EmulatorInstance(
|
yield EmulatorInstance(
|
||||||
serial=serial,
|
serial=serial,
|
||||||
name=os.path.basename(folder),
|
name=name,
|
||||||
|
path=self.path,
|
||||||
|
)
|
||||||
|
# Fix for MuMu12 v4.0.4, default instance of which has no forward record in vbox config
|
||||||
|
elif name == 'MuMuPlayer-12.0-0':
|
||||||
|
yield EmulatorInstance(
|
||||||
|
serial='127.0.0.1:16384',
|
||||||
|
name=name,
|
||||||
path=self.path,
|
path=self.path,
|
||||||
)
|
)
|
||||||
elif self == Emulator.MEmuPlayer:
|
elif self == Emulator.MEmuPlayer:
|
||||||
|
@ -52,6 +52,8 @@ class InventoryItem:
|
|||||||
image = color_similarity_2d(image, (255, 255, 255))
|
image = color_similarity_2d(image, (255, 255, 255))
|
||||||
param = {
|
param = {
|
||||||
'height': 160,
|
'height': 160,
|
||||||
|
# [ 10 110 114]
|
||||||
|
'distance': 10,
|
||||||
}
|
}
|
||||||
hori = cv2.reduce(image, 1, cv2.REDUCE_AVG).flatten()
|
hori = cv2.reduce(image, 1, cv2.REDUCE_AVG).flatten()
|
||||||
peaks, _ = signal.find_peaks(hori, **param)
|
peaks, _ = signal.find_peaks(hori, **param)
|
||||||
|
Loading…
Reference in New Issue
Block a user