Bastien Sevajol 9 anos atrás
pai
commit
6a064ace5b

Diferenças do arquivo suprimidas por serem muito extensas
+ 2833 - 2833
intelligine/sandbox/exploration/map.tmx


Diferenças do arquivo suprimidas por serem muito extensas
+ 1834 - 1834
intelligine/sandbox/test/test.tmx


Diferenças do arquivo suprimidas por serem muito extensas
+ 10220 - 0
intelligine/sandbox/test/test2.tmx


Diferenças do arquivo suprimidas por serem muito extensas
+ 10220 - 0
intelligine/sandbox/test/testv.tmx


+ 10 - 0
intelligine/simulation/molecule/DirectionMolecule.py Ver arquivo

@@ -49,6 +49,16 @@ class DirectionMolecule():
49 49
                                                       key=lambda x: x[1].get_distance(),
50 50
                                                       reverse=reverse)
51 51
 
52
+        all_same_distance = True
53
+        for mol in around_molecules_sorted_by_distance:
54
+            mol_mol = mol[1]
55
+            if mol_mol.get_distance() != distance:
56
+                all_same_distance = False
57
+                break
58
+
59
+        if all_same_distance:
60
+            raise NoMolecule()
61
+
52 62
         go_to_point = around_molecules_sorted_by_distance[0][0]
53 63
 
54 64
         direction_degrees = get_degree_from_north(point, go_to_point)

+ 2 - 2
intelligine/simulation/object/brain/AntBrain.py Ver arquivo

@@ -51,11 +51,11 @@ class AntBrain(Brain):
51 51
         elif mode == MODE_NURSE:
52 52
             molecule_direction_type = None
53 53
         elif mode == MODE_HOME:
54
-            molecule_direction_type = PHEROMON_DIR_EXPLO
54
+            molecule_direction_type = None
55 55
         elif mode == MODE_GO_OUTSIDE:
56 56
             molecule_direction_type = None
57 57
         elif mode == MODE_SEARCH_AROUND:
58
-            molecule_direction_type = PHEROMON_DIR_EXPLO
58
+            molecule_direction_type = None
59 59
         else:
60 60
             raise NotImplementedError()
61 61
 

+ 2 - 0
intelligine/simulation/object/brain/part/move/AntMoveBrainPart.py Ver arquivo

@@ -52,6 +52,8 @@ class AntMoveBrainPart(MoveBrainPart):
52 52
             movement_mode = context.metas.value.get(MODE, object_id)
53 53
             if movement_mode == MODE_GO_OUTSIDE:
54 54
                 raise
55
+            if movement_mode == MODE_EXPLO:
56
+                raise
55 57
 
56 58
             try:
57 59
                 direction = cls._get_direction_of_molecule(context, object_point, molecule_type)

+ 1 - 0
intelligine/synergy/object/Food.py Ver arquivo

@@ -10,6 +10,7 @@ class Food(Resource):
10 10
         context.metas.list.add(TYPE, self.get_id(), TYPE_RESOURCE_EXPLOITABLE)
11 11
 
12 12
     def get_what_carry(self):
13
+        return self  # dev
13 14
         clone = self.__class__(self._collection, self._context)
14 15
         self._collection.add_object(clone)
15 16
         return clone