from .base import Base from .waypoint import Waypoint from dataclasses import field class Jumpgate(Base): def define(self): self.connections: list = [] def update(self, d): getter = self.store.getter(Waypoint, create=True) self.setlst('connections', d, 'connections', interp=getter) @classmethod def ext(self): return 'jmp' def f(self, detail=1): r = super().f(detail) if detail > 2: r += '\n' r += '\n'.join([s.symbol for s in self.connections]) return r