From 422b766586b29401b4c9dda8391a84ca497b7fff Mon Sep 17 00:00:00 2001 From: Athanasius Date: Fri, 30 Apr 2021 14:30:37 +0100 Subject: [PATCH] Items: Decrement BackPack Consumable on `UseConsumable` --- monitor.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/monitor.py b/monitor.py index d2e0e635..cf6552cb 100644 --- a/monitor.py +++ b/monitor.py @@ -914,7 +914,9 @@ class EDLogs(FileSystemEventHandler): # type: ignore # See below # Parameters: # • Name # • Type - pass + for c in self.state['BackPackMaterials']['Consumables']: + if c['Name'] == entry['Name']: + c['Count'] -= 1 elif event_type == 'SwitchSuitLoadout': # alpha4 @@ -1144,8 +1146,8 @@ class EDLogs(FileSystemEventHandler): # type: ignore # See below # alpha4 pass - # alpha4 elif event_type == 'ScanOrganic': + # Nothing of interest to our state. pass elif event_type == 'SellOrganicData':