Browse Source

create shorcuts

Bastien Sevajol 8 years ago
parent
commit
1b4977824a

+ 10 - 0
intelligine/shorcut/brain.py View File

@@ -0,0 +1,10 @@
1
+from intelligine.cst import BRAIN, BRAIN_SCHEMA
2
+
3
+
4
+def get_brain_class(context, object_id):
5
+    return context.metas.value.get(BRAIN, object_id)
6
+
7
+
8
+def get_brain_part(context, object_id, brain_part_name):
9
+    object_brain_schema = context.metas.value.get(BRAIN_SCHEMA, object_id)
10
+    return object_brain_schema[brain_part_name]

+ 0 - 1
intelligine/simulation/object/brain/part/move/AntMoveBrainPart.py View File

@@ -149,7 +149,6 @@ class AntMoveBrainPart(MoveBrainPart):
149 149
         init_exploration_vector = get_position_with_direction_decal(self.get_host().get_previous_direction())
150 150
         self._set_exploration_vector(init_exploration_vector)
151 151
 
152
-
153 152
     def _arrived_at_home(self):
154 153
         self._host_brain.switch_to_mode(MOVE_MODE_HOME)
155 154
         ant_star = self._get_by_pass_brain(self._context, self._host.get_id())