MCPcopy
hub / github.com/CHNZYX/Auto_Simulated_Universe / press

Method press

utils/simul/utils.py:181–193  ·  view source on GitHub ↗
(self, c, t=0)

Source from the content-addressed store, hash-verified

179 return np.array(image)
180
181 def press(self, c, t=0):
182 if c not in "3r":
183 log.debug(f"按下按钮 {c},等待 {t} 秒后释放")
184 if c=='e' and self.allow_e==0:
185 return
186 if self.slow and c=='shift':
187 return
188 if self._stop == 0:
189 keyops.keyDown(c)
190 else:
191 raise ValueError("正在退出")
192 time.sleep(t)
193 keyops.keyUp(c)
194
195 def sprint(self):
196 if config.long_press_sprint:

Callers 15

sprintMethod · 0.95
use_consumableMethod · 0.95
get_levelMethod · 0.95
get_direcMethod · 0.95
keep_moveMethod · 0.95
solve_snackMethod · 0.95
use_eMethod · 0.95
start_abyssMethod · 0.45
waitMethod · 0.45
readyMethod · 0.45
routeMethod · 0.45

Calls 1

sleepMethod · 0.80

Tested by

no test coverage detected