1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-15 08:40:34 +03:00

ShipLocker: 4.0.0.400 - can ignore BuyMicroResources for inventory purposes

As the new `ShipLocker` is present in 'empty' form, with full new
inventory in the file.
This commit is contained in:
Athanasius 2021-06-10 12:19:35 +01:00
parent f852a185e4
commit c3a46a8415

View File

@ -1016,12 +1016,10 @@ class EDLogs(FileSystemEventHandler): # type: ignore # See below
self.state['BackPack'][c][m] = 0
elif event_type == 'BuyMicroResources':
# Buying from a Pioneer Supplies, goes directly to ShipLocker.
# One event per Item, not an array.
category = self.category(entry['Category'])
name = self.canonicalise(entry['Name'])
self.state[category][name] += entry['Count']
# From 4.0.0.400 we get an empty (see file) `ShipLocker` event,
# so we can ignore this for inventory purposes.
# But do record the credits balance change.
self.state['Credits'] -= entry.get('Price', 0)
elif event_type == 'SellMicroResources':