2023-06-12 08:51:01 +00:00
|
|
|
from .base import Base
|
|
|
|
from typing import List
|
|
|
|
|
|
|
|
class Jumpgate(Base):
|
|
|
|
range: int
|
|
|
|
faction: str
|
|
|
|
systems:List[str] = []
|
|
|
|
|
|
|
|
def update(self, d):
|
|
|
|
self.setlst('systems', d, 'connectedSystems', 'symbol')
|
|
|
|
self.seta('faction', d, 'factionSymbol')
|
|
|
|
self.seta('range', d, 'jumpRange')
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def ext(self):
|
|
|
|
return 'jmp'
|
|
|
|
|
|
|
|
def path(self):
|
2023-06-12 20:36:58 +00:00
|
|
|
sector, system, _ = self.symbol.split('-')
|
|
|
|
return f'atlas/{sector}/{system[0:1]}/{system}/{self.symbol}.{self.ext()}'
|