1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-05-28 22:29:27 +03:00

Move edshipyard.py slot_map into data.py

This commit is contained in:
Athanasius 2021-04-03 10:35:35 +01:00
parent 02d1a8cf45
commit b961ca814a
2 changed files with 23 additions and 35 deletions

26
data.py
View File

@ -25,8 +25,26 @@ companion_category_map = {
# Map Coriolis's names to names displayed in the in-game shipyard.
coriolis_ship_map = {
'Cobra Mk III': 'Cobra MkIII',
'Cobra Mk IV' : 'Cobra MkIV',
'Krait Mk II' : 'Krait MkII',
'Viper' : 'Viper MkIII',
'Viper Mk IV' : 'Viper MkIV',
'Cobra Mk IV': 'Cobra MkIV',
'Krait Mk II': 'Krait MkII',
'Viper': 'Viper MkIII',
'Viper Mk IV': 'Viper MkIV',
}
# Map API slot names to E:D Shipyard slot names
edshipyard_slot_map = {
'hugehardpoint': 'H',
'largehardpoint': 'L',
'mediumhardpoint': 'M',
'smallhardpoint': 'S',
'tinyhardpoint': 'U',
'armour': 'BH',
'powerplant': 'RB',
'mainengines': 'TM',
'frameshiftdrive': 'FH',
'lifesupport': 'EC',
'powerdistributor': 'PC',
'radar': 'SS',
'fueltank': 'FS',
'military': 'MC',
}

View File

@ -8,43 +8,13 @@ import re
import time
from config import config
from data import edshipyard_slot_map as slot_map
import outfitting
import util_ships
from typing import Dict, Union, List
__Module = Dict[str, Union[str, List[str]]]
# Map API ship names to E:D Shipyard ship names
ship_map = util_ships.ship_map.copy()
ship_map.update(
{
'cobramkiii': 'Cobra Mk III',
'cobramkiv' : 'Cobra Mk IV',
'viper' : 'Viper',
'viper_mkiv': 'Viper Mk IV',
}
)
# Map API slot names to E:D Shipyard slot names
slot_map = {
'hugehardpoint' : 'H',
'largehardpoint' : 'L',
'mediumhardpoint' : 'M',
'smallhardpoint' : 'S',
'tinyhardpoint' : 'U',
'armour' : 'BH',
'powerplant' : 'RB',
'mainengines' : 'TM',
'frameshiftdrive' : 'FH',
'lifesupport' : 'EC',
'powerdistributor' : 'PC',
'radar' : 'SS',
'fueltank' : 'FS',
'military' : 'MC',
}
# Ship masses
# TODO: prefer something other than pickle for this storage (dev readability, security)