Browse Source

add todo and little check

Bastien Sevajol 9 years ago
parent
commit
5e2a0e44e3
1 changed files with 3 additions and 1 deletions
  1. 3 1
      intelligine/synergy/object/ant/Ant.py

+ 3 - 1
intelligine/synergy/object/ant/Ant.py View File

@@ -20,6 +20,7 @@ class Ant(Bug):
20 20
                                                            COL_FIGHTER])
21 21
         self._carried = []
22 22
         self._last_pheromones_points = {}
23
+        # TODO: Faire un body_part schema pour ces trucs la
23 24
         self._movement_pheromone_gland = MovementPheromoneGland(self, self._context)
24 25
         self._brain.switch_to_mode(MOVE_MODE_EXPLO)
25 26
 
@@ -56,13 +57,14 @@ class Ant(Bug):
56 57
 
57 58
     # TODO: Est-ce ici que doit etre ce code ?
58 59
     def set_position(self, position):
59
-        if self._position is not None:
60
+        if self._position is not None and position != self._position:
60 61
             self._brain.host_moved()
61 62
         super().set_position(position)
62 63
         if self.is_carrying():
63 64
             for obj_carried in self._carried:
64 65
                 obj_carried.set_position(position)
65 66
 
67
+    # TODO: N'est plus utiliser ! delete it !
66 68
     def get_last_pheromone_point(self, pheromone_name):
67 69
         if pheromone_name in self._last_pheromones_points:
68 70
             return self._last_pheromones_points[pheromone_name]