22 lines
557 B
Python
22 lines
557 B
Python
|
|
from .system_member import SystemMember
|
|
from typing import List
|
|
|
|
class Marketplace(SystemMember):
|
|
imports:List[str] = []
|
|
exports:List[str] = []
|
|
exchange:List[str] = []
|
|
|
|
def update(self, d):
|
|
self.setlst('imports', d, 'imports', 'symbol')
|
|
self.setlst('exports', d, 'exports', 'symbol')
|
|
self.setlst('exchange', d, 'exchange', 'symbol')
|
|
|
|
@classmethod
|
|
def ext(self):
|
|
return 'mkt'
|
|
|
|
def path(self):
|
|
sector, system, _ = self.symbol.split('-')
|
|
return f'atlas/{sector}/{system[0:1]}/{system}/{self.symbol}.{self.ext()}'
|