mission step priorities, fixed the store again

This commit is contained in:
Richard
2024-01-27 15:05:33 +01:00
parent f913d23c06
commit 5d47efdbda
10 changed files with 78 additions and 36 deletions

View File

@@ -16,6 +16,9 @@ class MarketEntry:
activity: int
history: List[Tuple[int, int, int, int, int, int]] = []
def f(self, detail=1):
return f'b: {self.buy} s:{self.sell} hist: {len(self.history)}'
def add(self, buy, sell, volume, supply, activity):
self.buy = buy
self.sell = sell

View File

@@ -26,6 +26,9 @@ class Ship(Base):
self._log_level = 5
def log(self, m, l=3):
if m is None: return
if type(m) != str:
m = pretty(m)
if self._log_file is None:
fn = os.path.join(self.store.data_dir, f'{self.symbol}.{self.ext()}.log')
self._log_file = open(fn, 'a')