siphoning and hauling
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 = {}
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user