diff --git a/companion.py b/companion.py index afd89c3a..f424601e 100644 --- a/companion.py +++ b/companion.py @@ -292,6 +292,8 @@ def fixup(data): else: if not category_map.get(commodity['categoryname'], True): # Check marketable pass + elif commodity.get('legality'): # Check not prohibited + pass elif not commodity.get('categoryname'): if __debug__: print 'Missing "categoryname" for "%s"' % commodity.get('name', '') elif not commodity.get('name'): diff --git a/eddn.py b/eddn.py index 516bc80b..06131885 100644 --- a/eddn.py +++ b/eddn.py @@ -159,7 +159,8 @@ class EDDN: def export_commodities(self, data, is_beta): commodities = [] for commodity in data['lastStarport'].get('commodities') or []: - if category_map.get(commodity['categoryname'], True): # Check marketable + if (category_map.get(commodity['categoryname'], True) and # Check marketable + not commodity.get('legality')): # check not prohibited commodities.append(OrderedDict([ ('name', commodity['name']), ('meanPrice', int(commodity['meanPrice'])),