from .base import Base, Reference from nullptr.models.system import System from nullptr.util import * from time import time class Waypoint(Base): def define(self): self.x:int = 0 self.y:int = 0 self.type:str = 'unknown' self.traits:list = [] self.faction:str = '' self.is_under_construction:bool = False self.system = self.get_system() self.uncharted = True def update(self, d): self.seta('x', d) self.seta('y', d) self.seta('type', d) self.seta('faction', d, 'faction.symbol') self.seta('is_under_construction', d, 'isUnderConstruction') self.setlst('traits', d, 'traits', 'symbol') self.uncharted = 'UNCHARTED' in self.traits @classmethod def ext(self): return 'way'