|
@@ -3,7 +3,7 @@ from intelligine.synergy.object.Bug import Bug
|
3
|
3
|
from intelligine.cst import CARRYING, TRANSPORTER, ATTACKER, \
|
4
|
4
|
COL_TRANSPORTER, COL_TRANSPORTER_NOT_CARRYING, \
|
5
|
5
|
COL_FIGHTER, MOVE_MODE_EXPLO, MOVE_MODE_GOHOME, \
|
6
|
|
- PHEROMON_DIR_EXPLO, LAST_PHERMONES_POINTS, CARRIED
|
|
6
|
+ PHEROMON_DIR_EXPLO, CARRIED
|
7
|
7
|
from intelligine.synergy.object.Food import Food
|
8
|
8
|
from intelligine.simulation.object.pheromone.MovementPheromoneGland import MovementPheromoneGland
|
9
|
9
|
from intelligine.simulation.object.brain.AntBrain import AntBrain
|
|
@@ -18,7 +18,6 @@ class Ant(Bug):
|
18
|
18
|
COL_TRANSPORTER_NOT_CARRYING,
|
19
|
19
|
COL_FIGHTER])
|
20
|
20
|
self._carried = []
|
21
|
|
- self._last_pheromones_points = {}
|
22
|
21
|
# TODO: Faire un body_part schema pour ces trucs la
|
23
|
22
|
self._movement_pheromone_gland = MovementPheromoneGland(self, self._context)
|
24
|
23
|
self._brain.switch_to_mode(MOVE_MODE_EXPLO)
|
|
@@ -48,7 +47,6 @@ class Ant(Bug):
|
48
|
47
|
# TODO: pour le moment hardcode
|
49
|
48
|
if isinstance(obj, Food):
|
50
|
49
|
self.get_brain().switch_to_mode(MOVE_MODE_GOHOME)
|
51
|
|
- self.set_last_pheromone_point(PHEROMON_DIR_EXPLO, obj.get_position())
|
52
|
50
|
self.get_movement_pheromone_gland().appose()
|
53
|
51
|
|
54
|
52
|
def is_carrying(self):
|
|
@@ -71,10 +69,6 @@ class Ant(Bug):
|
71
|
69
|
return self._last_pheromones_points[pheromone_name]
|
72
|
70
|
return self._start_position
|
73
|
71
|
|
74
|
|
- def set_last_pheromone_point(self, pheromone_name, position):
|
75
|
|
- self._last_pheromones_points[pheromone_name] = position
|
76
|
|
- self._context.metas.value.set(LAST_PHERMONES_POINTS, self.get_id(), self._last_pheromones_points)
|
77
|
|
-
|
78
|
72
|
def initialize(self):
|
79
|
73
|
super().initialize()
|
80
|
74
|
if self.get_movement_pheromone_gland().is_enabled():
|