mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-17 17:42:20 +03:00
Items: Correct UseConsumable
code
This commit is contained in:
parent
f89ed7999e
commit
e1a63c2879
10
monitor.py
10
monitor.py
@ -921,12 +921,12 @@ class EDLogs(FileSystemEventHandler): # type: ignore # See below
|
||||
# Parameters:
|
||||
# • Name
|
||||
# • Type
|
||||
for c in self.state['BackPackMaterials']['Consumable']:
|
||||
if c['Name'] == entry['Name']:
|
||||
c['Count'] -= 1
|
||||
for c in self.state['BackPack']['Consumable']:
|
||||
if c == entry['Name']:
|
||||
self.state['BackPack']['Consumable'][c] -= 1
|
||||
# Paranoia in case we lost track
|
||||
if i['Count'] < 0:
|
||||
i['Count'] = 0
|
||||
if self.state['BackPack']['Consumable'][c] < 0:
|
||||
self.state['BackPack']['Consumable'][c] = 0
|
||||
|
||||
elif event_type == 'SwitchSuitLoadout':
|
||||
# alpha4
|
||||
|
Loading…
x
Reference in New Issue
Block a user