mirror of
https://github.com/Lorenzooone/PokemonGB_Online_Trades.git
synced 2026-04-26 08:18:52 -05:00
Fix typo and handle NoBackendError
The typo caused the trade following evolutions with move learning to crash
This commit is contained in:
parent
2ed28eb8f5
commit
2cffee468a
|
|
@ -73,11 +73,14 @@ signal.signal(signal.SIGINT, signal_handler)
|
|||
|
||||
# The execution path
|
||||
try:
|
||||
devices = list(usb.core.find(find_all=True,idVendor=0xcafe, idProduct=0x4011))
|
||||
for d in devices:
|
||||
#print('Device: %s' % d.product)
|
||||
dev = d
|
||||
|
||||
try:
|
||||
devices = list(usb.core.find(find_all=True,idVendor=0xcafe, idProduct=0x4011))
|
||||
for d in devices:
|
||||
#print('Device: %s' % d.product)
|
||||
dev = d
|
||||
except usb.core.NoBackendError as e:
|
||||
pass
|
||||
|
||||
sender = sendByte
|
||||
receiver = receiveByte
|
||||
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ class GSCTradingClient:
|
|||
if val is not None:
|
||||
updating_mon = self.trader.other_pokemon.pokemon[self.trader.other_pokemon.get_last_mon_index()]
|
||||
data = [updating_mon.get_species()] + val
|
||||
data = self.trader.checks.apply_checks_to_data(self.trader.checks.moves_checks_map_path, data)
|
||||
data = self.trader.checks.apply_checks_to_data(self.trader.checks.moves_checks_map, data)
|
||||
for i in range(4):
|
||||
updating_mon.set_move(i, data[i+1], max_pp=False)
|
||||
updating_mon.set_pp(i, data[i+5])
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ class RBYTradingClient(GSCTradingClient):
|
|||
val = self.get_with_counter(self.moves_transfer)
|
||||
if val is not None:
|
||||
updating_mon = self.trader.other_pokemon.pokemon[self.trader.other_pokemon.get_last_mon_index()]
|
||||
data = self.trader.checks.apply_checks_to_data(self.trader.checks.moves_checks_map_path, val)
|
||||
data = self.trader.checks.apply_checks_to_data(self.trader.checks.moves_checks_map, val)
|
||||
for i in range(4):
|
||||
updating_mon.set_move(i, data[i+1], max_pp=False)
|
||||
updating_mon.set_pp(i, data[i+5])
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user