mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-17 17:42:20 +03:00
suits: Record a newly bought suit in monitor.state['Suits']
We can't fill in the 'id' field, but this is likely the FDevID of the suit type ?
This commit is contained in:
parent
96d9a80956
commit
7b8c113962
16
monitor.py
16
monitor.py
@ -973,10 +973,22 @@ class EDLogs(FileSystemEventHandler): # type: ignore # See below
|
||||
# • Loadoutname
|
||||
pass
|
||||
|
||||
# `BuySuit` has no useful info as of 4.0.0.13
|
||||
elif event_type == 'BuySuit':
|
||||
# alpha4 - should have 'SuitID'
|
||||
# alpha4 :
|
||||
# { "timestamp":"2021-04-29T09:03:37Z", "event":"BuySuit", "Name":"UtilitySuit_Class1",
|
||||
# "Name_Localised":"Maverick Suit", "Price":150000, "SuitID":1698364934364699 }
|
||||
self.state['Suits'].update(
|
||||
{entry['SuitID']: {
|
||||
'name': entry['Name'],
|
||||
'locName': entry.get('Name_Localised', entry['Name']),
|
||||
# 'id': ???, # Is this an FDev ID for suit type ?
|
||||
'suitId': entry['SuitID'],
|
||||
'slots': [],
|
||||
}}
|
||||
)
|
||||
|
||||
# update credits
|
||||
self.state['Credits'] -= entry.get('Price', 0)
|
||||
pass
|
||||
|
||||
elif event_type == 'SellSuit':
|
||||
|
Loading…
x
Reference in New Issue
Block a user