From 8e8c9fa3fff655a27a557b7301ea3da49b8aa044 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Fri, 30 Apr 2021 13:50:52 +0100 Subject: [PATCH] Items: `Data` is now in `BackPackMaterials` as well --- monitor.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/monitor.py b/monitor.py index dbaaa05b..0dd229a8 100644 --- a/monitor.py +++ b/monitor.py @@ -805,6 +805,7 @@ class EDLogs(FileSystemEventHandler): # type: ignore # See below self.state['BackPack']['Component'] = defaultdict(int) self.state['BackPack']['Consumable'] = defaultdict(int) self.state['BackPack']['Item'] = defaultdict(int) + self.state['BackPack']['Data'] = defaultdict(int) clean_components = self.coalesce_cargo(entry['Components']) self.state['BackPack']['Component'].update( @@ -821,6 +822,11 @@ class EDLogs(FileSystemEventHandler): # type: ignore # See below {self.canonicalise(x['Name']): x['Count'] for x in clean_items} ) + clean_data = self.coalesce_cargo(entry['Data']) + self.state['BackPack']['Data'].update( + {self.canonicalise(x['Name']): x['Count'] for x in clean_data} + ) + elif event_type == 'BuyMicroResources': # Buying from a Pioneer Supplies, goes directly to ShipLocker. # One event per Item, not an array.