mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-13 07:47:14 +03:00
Account for engineers' mods in calculating mass and jump range
This commit is contained in:
parent
8aaf9dd84c
commit
21e8b2ffee
@ -76,7 +76,11 @@ def export(data, filename=None):
|
||||
if not module: continue
|
||||
|
||||
cr = class_rating(module)
|
||||
mass += module.get('mass', 0)
|
||||
mods = v.get('modifications') or v.get('WorkInProgress_modifications') or {}
|
||||
if mods.get('OutfittingFieldType_Mass'):
|
||||
mass += (module.get('mass', 0) * mods['OutfittingFieldType_Mass']['value'])
|
||||
else:
|
||||
mass += module.get('mass', 0)
|
||||
|
||||
# Specials
|
||||
if 'Fuel Tank'in module['name']:
|
||||
@ -90,6 +94,11 @@ def export(data, filename=None):
|
||||
|
||||
if name == 'Frame Shift Drive':
|
||||
fsd = module # save for range calculation
|
||||
if mods.get('OutfittingFieldType_FSDOptimalMass'):
|
||||
fsd['optmass'] *= mods['OutfittingFieldType_FSDOptimalMass']['value']
|
||||
if mods.get('OutfittingFieldType_MaxFuelPerJump'):
|
||||
fsd['maxfuel'] *= mods['OutfittingFieldType_MaxFuelPerJump']['value']
|
||||
|
||||
|
||||
for s in slot_map:
|
||||
if slot.lower().startswith(s):
|
||||
|
Loading…
x
Reference in New Issue
Block a user