Rewrite atlas builder to be re-entrant. Rolled into automode.
This commit is contained in:
@@ -8,5 +8,6 @@ from nullptr.models.jumpgate import Jumpgate
|
||||
from nullptr.models.ship import Ship
|
||||
from nullptr.models.contract import Contract
|
||||
from nullptr.models.survey import Survey
|
||||
from nullptr.models.atlas import Atlas
|
||||
|
||||
__all__ = [ 'Waypoint', 'Sector', 'Ship', 'Survey', 'System', 'Agent', 'Marketplace', 'Jumpgate', 'Contract', 'Base' ]
|
||||
__all__ = [ 'Waypoint', 'Sector', 'Ship', 'Survey', 'System', 'Agent', 'Marketplace', 'Jumpgate', 'Contract', 'Base', 'Atlas' ]
|
||||
|
||||
11
nullptr/models/atlas.py
Normal file
11
nullptr/models/atlas.py
Normal file
@@ -0,0 +1,11 @@
|
||||
from .base import Base
|
||||
|
||||
class Atlas(Base):
|
||||
@classmethod
|
||||
def ext(self):
|
||||
return 'atl'
|
||||
|
||||
def define(self):
|
||||
self.total_pages = 0
|
||||
self.seen_pages = 0
|
||||
|
||||
@@ -7,6 +7,8 @@ class System(Base):
|
||||
self.x:int = 0
|
||||
self.y:int = 0
|
||||
self.type:str = 'unknown'
|
||||
self.uncharted = True
|
||||
self.last_crawl = 0
|
||||
|
||||
def update(self, d):
|
||||
self.seta('x', d)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
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):
|
||||
@@ -10,6 +11,7 @@ class Waypoint(Base):
|
||||
self.traits:list = []
|
||||
self.faction:str = ''
|
||||
self.system = self.get_system()
|
||||
self.uncharted = True
|
||||
|
||||
def update(self, d):
|
||||
self.seta('x', d)
|
||||
@@ -17,7 +19,8 @@ class Waypoint(Base):
|
||||
self.seta('type', d)
|
||||
self.seta('faction', d, 'faction.symbol')
|
||||
self.setlst('traits', d, 'traits', 'symbol')
|
||||
|
||||
self.uncharted = 'UNCHARTED' in self.traits
|
||||
|
||||
@classmethod
|
||||
def ext(self):
|
||||
return 'way'
|
||||
|
||||
Reference in New Issue
Block a user