From 234a40bc473655ec2491d54272187a2c5139a888 Mon Sep 17 00:00:00 2001 From: Jonathan Harris Date: Wed, 4 Jan 2017 02:46:57 +0000 Subject: [PATCH] Suppress debug warnings about engine/weapon colors --- coriolis.py | 9 ++++++--- outfitting.py | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/coriolis.py b/coriolis.py index 80afc6a7..0e105c30 100755 --- a/coriolis.py +++ b/coriolis.py @@ -129,9 +129,12 @@ def export(data, filename=None): category = slot_map[s] break else: - # Uninteresting slot - e.g. DecalX or PaintJob - if __debug__ and not slot.lower().startswith('bobble') and not slot.lower().startswith('decal') and not slot.lower().startswith('paintjob') and not slot.lower().startswith('planetaryapproachsuite'): - print 'Coriolis: Unknown slot %s' % slot + if __debug__: + for skip in ['bobble', 'decal', 'paintjob', 'planetaryapproachsuite', 'enginecolour', 'shipkit', 'weaponcolour']: + if slot.lower().startswith(skip): + break + else: + print 'Coriolis: Unknown slot %s' % slot continue if not v: diff --git a/outfitting.py b/outfitting.py index 81a25ab1..17336f2c 100644 --- a/outfitting.py +++ b/outfitting.py @@ -255,7 +255,7 @@ moduledata = cPickle.load(open(join(config.respath, 'modules.p'), 'rb')) # English langauge game. For fitted modules, dict also includes { enabled, priority }. # ship_map tells us what ship names to use for Armour - i.e. EDDN schema names or in-game names. # -# Returns None if the module is user-specific (i.e. decal, paintjob) or PP-specific in station outfitting. +# Returns None if the module is user-specific (i.e. decal, paintjob, kit) or PP-specific in station outfitting. # (Given the ad-hocery in this implementation a big lookup table might have been simpler and clearer). def lookup(module, ship_map, entitled=False): @@ -275,7 +275,7 @@ def lookup(module, ship_map, entitled=False): new['rating'] = 'I' # Skip uninteresting stuff - elif name[0] in ['bobble', 'decal', 'paintjob']: + elif name[0] in ['bobble', 'decal', 'paintjob', 'enginecustomisation', 'weaponcustomisation'] or name[1].startswith('shipkit') : return None # Skip PP-specific modules in outfitting which have an sku like ELITE_SPECIFIC_V_POWER_100100