mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
LADX: Support magpie tracker's sendfull button (#1701)
This commit is contained in:
@@ -148,7 +148,7 @@ class MagpieBridge:
|
|||||||
checks = None
|
checks = None
|
||||||
item_tracker = None
|
item_tracker = None
|
||||||
ws = None
|
ws = None
|
||||||
|
features = []
|
||||||
async def handler(self, websocket):
|
async def handler(self, websocket):
|
||||||
self.ws = websocket
|
self.ws = websocket
|
||||||
while True:
|
while True:
|
||||||
@@ -156,9 +156,12 @@ class MagpieBridge:
|
|||||||
if message["type"] == "handshake":
|
if message["type"] == "handshake":
|
||||||
logger.info(
|
logger.info(
|
||||||
f"Connected, supported features: {message['features']}")
|
f"Connected, supported features: {message['features']}")
|
||||||
if "items" in message["features"]:
|
self.features = message["features"]
|
||||||
|
|
||||||
|
if message["type"] in ("handshake", "sendFull"):
|
||||||
|
if "items" in self.features:
|
||||||
await self.send_all_inventory()
|
await self.send_all_inventory()
|
||||||
if "checks" in message["features"]:
|
if "checks" in self.features:
|
||||||
await self.send_all_checks()
|
await self.send_all_checks()
|
||||||
# Translate renamed IDs back to LADXR IDs
|
# Translate renamed IDs back to LADXR IDs
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
Reference in New Issue
Block a user