2023-07-10 18:12:29 +00:00
|
|
|
from .base import Base, Reference
|
|
|
|
from nullptr.models.system import System
|
2023-06-11 18:51:03 +00:00
|
|
|
from nullptr.util import *
|
2023-07-16 16:48:45 +00:00
|
|
|
from time import time
|
2023-06-11 18:51:03 +00:00
|
|
|
|
2023-07-10 17:25:01 +00:00
|
|
|
class Waypoint(Base):
|
2023-06-18 17:15:51 +00:00
|
|
|
def define(self):
|
|
|
|
self.x:int = 0
|
|
|
|
self.y:int = 0
|
|
|
|
self.type:str = 'unknown'
|
|
|
|
self.traits:list = []
|
|
|
|
self.faction:str = ''
|
2023-07-12 20:26:25 +00:00
|
|
|
self.system = self.get_system()
|
2023-07-16 16:48:45 +00:00
|
|
|
self.uncharted = True
|
2023-07-10 18:12:29 +00:00
|
|
|
|
2023-06-11 18:51:03 +00:00
|
|
|
def update(self, d):
|
|
|
|
self.seta('x', d)
|
|
|
|
self.seta('y', d)
|
|
|
|
self.seta('type', d)
|
|
|
|
self.seta('faction', d, 'faction.symbol')
|
2023-06-12 08:51:01 +00:00
|
|
|
self.setlst('traits', d, 'traits', 'symbol')
|
2023-07-16 16:48:45 +00:00
|
|
|
self.uncharted = 'UNCHARTED' in self.traits
|
|
|
|
|
2023-06-11 18:51:03 +00:00
|
|
|
@classmethod
|
|
|
|
def ext(self):
|
|
|
|
return 'way'
|
|
|
|
|