siphoning and hauling

This commit is contained in:
Richard
2024-01-20 20:33:50 +01:00
parent 592c628a46
commit 3f7a416fdc
13 changed files with 259 additions and 29 deletions

View File

@@ -102,5 +102,5 @@ class Marketplace(Base):
r += '\n'
for res, p in self.prices.items():
t = self.rtype(res)
r += f'{t} {res:25s} {p.sell:5d} {p.buy:5d}\n'
r += f'{t} {res:25s} {p.buy:5d} {p.sell:5d}\n'
return r

View File

@@ -88,6 +88,14 @@ class Ship(Base):
self.cargo[typ] -= amt
self.cargo_units = sum(self.cargo.values())
def put_cargo(self, typ, amt):
if typ not in self.cargo:
self.cargo[typ] = amt
else:
self.cargo[typ] += amt
self.cargo_units = sum(self.cargo.values())
def load_cargo(self, cargo):
result = {}

View File

@@ -13,6 +13,7 @@ class Waypoint(Base):
self.faction:str = ''
self.is_under_construction:bool = False
self.uncharted = True
self.extracted:int = 0
def update(self, d):