Skip to content

Commit 110c8db

Browse files
committed
Game coodrinates assured.
1 parent fecd7d7 commit 110c8db

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

MapGame.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,8 +242,8 @@ def _go_to(self, dest):
242242
dest.xpos = self.xpos
243243
dest.ypos = self.ypos
244244
pos = self.enterprise_in(dest) # CAPIN' KNOWS BEST?
245-
dest.xpos = pos[0]
246-
dest.ypos = pos[1]
245+
self.xpos = dest.xpos = pos[0]
246+
self.ypos = dest.ypos = pos[1]
247247
self.last_nav = dest
248248
return dest
249249

StarTrek2020.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,16 @@ def __init__(self):
2626
def move_to(self, dest):
2727
pos = self.game_map._go_to(dest)
2828
area = self.game_map.pw_area()
29+
was_docked = self.enterprise.docked
2930
self.enterprise.docked = False
3031
for p in area._pieces:
3132
if p.glyph == Glyphs.STARBASE:
3233
if p.xpos + 1 == pos.xpos or p.ypos + 1 == pos.ypos or \
3334
p.xpos - 1 == pos.xpos or p.ypos - 1 == pos.ypos:
3435
self.enterprise.docked = True
3536
ShipStarbase.dock_enterprise(self.enterprise)
37+
if was_docked and self.enterprise.docked == False:
38+
ShipStarbase.launch_enterprise(self.enterprise)
3639
return pos
3740

3841
def run(self):

0 commit comments

Comments
 (0)