diff --git a/coriolis-data b/coriolis-data index c686af45..d4ffc020 160000 --- a/coriolis-data +++ b/coriolis-data @@ -1 +1 @@ -Subproject commit c686af45cc299a2ba7f7eeace35dd3e898bbb588 +Subproject commit d4ffc0202a929d25eb2056b1af00030a59a4512a diff --git a/coriolis.py b/coriolis.py index 626ec4bc..6290b26a 100755 --- a/coriolis.py +++ b/coriolis.py @@ -79,6 +79,7 @@ fixup_map.update({ 'Enforcer Cannon' : ('Multi-cannon', 'Enforcer'), 'Enhanced Performance Thrusters': ('Thrusters', 'Enhanced Performance'), 'Imperial Hammer Rail Gun' : ('Rail Gun', 'Imperial Hammer'), + 'Luxury Class Passenger Cabin' : ('Luxury Passenger Cabin', None), 'Mining Lance Beam Laser' : ('Mining Laser', 'Mining Lance'), 'Multi-Cannon' : ('Multi-cannon', None), 'Pacifier Frag-Cannon' : ('Fragment Cannon', 'Pacifier'), @@ -335,5 +336,8 @@ if __name__ == "__main__": else: modules[key] = { 'mass': m.get('mass', 0) } # Some modules don't have mass + # not in coriolis-data at time of writing + modules[('Pulse Laser', None, '2', 'E')] = { 'mass': 4 } # Fixed used to be 2F + cPickle.dump(modules, open('modules.p', 'wb'), protocol = cPickle.HIGHEST_PROTOCOL) diff --git a/loadout.py b/loadout.py index 6bd79774..77d123d0 100644 --- a/loadout.py +++ b/loadout.py @@ -45,10 +45,12 @@ ships = cPickle.load(open(join(config.respath, 'ships.p'), 'rb')) def export(data, filename=None): def class_rating(module): - if 'guidance' in module: + if 'guidance' in module: # Missiles return module['class'] + module['rating'] + '/' + module.get('mount', 'F')[0] + module['guidance'][0] + ' ' - elif 'mount' in module: + elif 'mount' in module: # Hardpoints return module['class'] + module['rating'] + '/' + module['mount'][0] + ' ' + elif 'Cabin' in module['name']: # Passenger cabins + return module['class'] + module['rating'] + '/' + module['name'][0] + ' ' else: return module['class'] + module['rating'] + ' ' diff --git a/modules.p b/modules.p index c7c3cd0f..fcee20f4 100644 Binary files a/modules.p and b/modules.p differ diff --git a/outfitting.py b/outfitting.py index 6844e7b2..81a25ab1 100644 --- a/outfitting.py +++ b/outfitting.py @@ -187,7 +187,8 @@ rating_map = { '5': 'A', } -# Ratings are messed up for Corrosion Resistant Cargo Rack +# Ratings are weird for the following + corrosion_rating_map = { '1': 'E', '2': 'F', @@ -198,6 +199,10 @@ planet_rating_map = { '2': 'G', } +fighter_rating_map = { + '1': 'D', +} + misc_internal_map = { ('detailedsurfacescanner', 'tiny') : ('Detailed Surface Scanner', 'C'), ('dockingcomputer', 'standard') : ('Standard Docking Computer', 'E'), @@ -224,7 +229,7 @@ internal_map = { 'cargorack' : 'Cargo Rack', 'collection' : 'Collector Limpet Controller', 'corrosionproofcargorack' : 'Corrosion Resistant Cargo Rack', - 'fighterbay' : 'Fighter Bay', + 'fighterbay' : 'Fighter Hangar', 'fsdinterdictor' : 'Frame Shift Drive Interdictor', 'fuelscoop' : 'Fuel Scoop', 'fueltransfer' : 'Fuel Transfer Limpet Controller', @@ -351,7 +356,7 @@ def lookup(module, ship_map, entitled=False): elif name[1] in internal_map: # e.g. Int_CargoRack_Size8_Class1 new['category'] = 'internal' if name[1] == 'passengercabin': - new['name'] = cabin_map[name[1]] + new['name'] = cabin_map[name[3][5:]] else: new['name'] = internal_map[len(name)>4 and (name[1],name[4]) or name[1]] else: @@ -360,6 +365,7 @@ def lookup(module, ship_map, entitled=False): if not name[2].startswith('size') or not name[3].startswith('class'): raise AssertionError('%s: Unknown class/rating "%s/%s"' % (module['id'], name[2], name[3])) new['class'] = str(name[2][4:]) new['rating'] = (name[1]=='buggybay' and planet_rating_map or + name[1]=='fighterbay' and fighter_rating_map or name[1]=='corrosionproofcargorack' and corrosion_rating_map or rating_map)[name[3][5:]]