Update waypoint.py and store.py

This commit is contained in:
Richard Bronkhorst
2023-07-10 20:12:29 +02:00
parent b1e3621490
commit b2f2dc520e
2 changed files with 11 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
from .base import Base
from .base import Base, Reference
from nullptr.models.system import System
from nullptr.util import *
from dataclasses import field
class Waypoint(Base):
def define(self):
@@ -9,13 +9,15 @@ class Waypoint(Base):
self.type:str = 'unknown'
self.traits:list = []
self.faction:str = ''
self.system = None
def update(self, d):
self.seta('x', d)
self.seta('y', d)
self.seta('type', d)
self.seta('faction', d, 'faction.symbol')
self.setlst('traits', d, 'traits', 'symbol')
self.seta('system', d, self.store.getter(System))
@classmethod
def ext(self):