Browse Source

Smell action after move action

Bastien Sevajol 8 years ago
parent
commit
3426f27d5e
1 changed files with 3 additions and 16 deletions
  1. 3 16
      intelligine/synergy/event/smell/SmellAction.py

+ 3 - 16
intelligine/synergy/event/smell/SmellAction.py View File

@@ -4,6 +4,7 @@ from intelligine.cst import POINT_SMELL, POINTS_SMELL, MOLECULES_INFOS, MOLECULE
4 4
 from intelligine.simulation.molecule.DirectionMolecule import DirectionMolecule
5 5
 from intelligine.simulation.molecule.Evaporation import Evaporation
6 6
 from intelligine.simulation.molecule.Molecule import Molecule
7
+from intelligine.synergy.event.move.MoveAction import MoveAction
7 8
 from intelligine.synergy.event.smell.SmellEvent import SmellEvent
8 9
 from synergine.synergy.event.Action import Action
9 10
 
@@ -11,6 +12,7 @@ from synergine.synergy.event.Action import Action
11 12
 class SmellAction(Action):
12 13
 
13 14
     _listen = SmellEvent
15
+    _depend = [MoveAction]
14 16
 
15 17
     @classmethod
16 18
     def cycle_pre_run(cls, context, synergy_manager):
@@ -29,19 +31,4 @@ class SmellAction(Action):
29 31
             try:
30 32
                 DirectionMolecule.appose(context, smell_point, molecule)
31 33
             except BestMoleculeHere:
32
-                pass  # TODO: Pas l'inverse ? A voir apres avoir fix la disparition.
33
-
34
-            #
35
-            # current_point_smell = points_distances[smell_point]
36
-            # where_to_put_smells = context.metas.value.get(POINT_SMELL, smell_point, allow_empty=True, empty_value={})
37
-            #
38
-            #
39
-            # if smell_type not in where_to_put_smells:
40
-            #     where_to_put_smells[smell_type] = current_point_smell
41
-            # else:
42
-            #     where_to_put_smell = where_to_put_smells[smell_type]
43
-            #     if current_point_smell < where_to_put_smell:
44
-            #         where_to_put_smells[smell_type] = where_to_put_smell
45
-            #
46
-            # context.metas.value.set(POINT_SMELL, smell_point, where_to_put_smells)
47
-            # context.metas.list.add(POINTS_SMELL, POINTS_SMELL, smell_point, assert_not_in=False)
34
+                pass