Skip to content

Commit

Permalink
Merge branch 'master' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
totycro committed Apr 7, 2012
2 parents e1e42b2 + 3ff7588 commit e00e423
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions horizons/i18n/voice.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ class Speech:
MOVE_OUTSIDE_OF_WORLD = None MOVE_OUTSIDE_OF_WORLD = None
MOVE_INVALID_LOCATION = None MOVE_INVALID_LOCATION = None
NEW_UNIT = None NEW_UNIT = None
YOU_LOST = None
BUILDING_ON_FIRE = None BUILDING_ON_FIRE = None


DEFAULT_LANG="en" DEFAULT_LANG="en"
Expand Down
8 changes: 8 additions & 0 deletions horizons/world/units/ship.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -106,6 +106,14 @@ def _move_tick(self, resume = False):
self.session.world.ship_map[self.position.to_tuple()] = weakref.ref(self) self.session.world.ship_map[self.position.to_tuple()] = weakref.ref(self)
self.session.world.ship_map[self._next_target.to_tuple()] = weakref.ref(self) self.session.world.ship_map[self._next_target.to_tuple()] = weakref.ref(self)


def _movement_finished(self):
if self.in_ship_map:
# if the movement somehow stops, the position sticks, and the unit isn't at next_target any more
ship = self.session.world.ship_map.get(self._next_target.to_tuple())
if ship is not None and ship() is self:
del self.session.world.ship_map[self._next_target.to_tuple()]
super(Ship, self)._movement_finished()

def go(self, x, y): def go(self, x, y):
#disable the trading route #disable the trading route
if hasattr(self, 'route'): if hasattr(self, 'route'):
Expand Down

0 comments on commit e00e423

Please sign in to comment.