SST2K project news.
+Repository head:
+ Crash bug fix when docking with no starbase in sector.
+
2.2 @ 2017-03-01
Added color. Added BSD Trek 'CAPTURE' and 'CLOAK' (from Tom Almy's
2013 changes). Many bug fixes.
return self.i >= 0 and self.i < QUADSIZE and self.j >= 0 and self.j < QUADSIZE
def invalidate(self):
self.i = self.j = None
- def is_valid(self):
- return self.i != None and self.j != None
def __eq__(self, other):
return other != None and self.i == other.i and self.j == other.j
def __ne__(self, other):
if game.inorbit:
prout(_("You must first leave standard orbit."))
return
- if not game.base.is_valid() or abs(game.sector.i-game.base.i) > 1 or abs(game.sector.j-game.base.j) > 1:
+ if game.base is None or abs(game.sector.i-game.base.i) > 1 or abs(game.sector.j-game.base.j) > 1:
prout(crmshp() + _(" not adjacent to base."))
return
if game.iscloaked:
# found one -- finish up
game.sector = w
break
- if not game.sector.is_valid():
+ if game.sector is None:
prout(_("You have been lost in space..."))
finish(FMATERIALIZE)
return
if damaged(DWARPEN) and damaged(DIMPULS):
prout(_("Both warp and impulse engines damaged."))
return
- if not game.plnet.is_valid():
+ if game.plnet is None:
prout("There is no planet in this sector.")
return
if abs(game.sector.i-game.plnet.i)>1 or abs(game.sector.j-game.plnet.j)>1: