|
@@ -2,7 +2,7 @@ from synergine.synergy.event.Action import Action
|
2
|
2
|
from intelligine.synergy.event.move.MoveEvent import MoveEvent
|
3
|
3
|
from random import randint, choice
|
4
|
4
|
from xyzworld.cst import POSITION, POSITIONS
|
5
|
|
-from intelligine.cst import IMPENETRABLE, PREVIOUS_DIRECTION, BLOCKED_SINCE
|
|
5
|
+from intelligine.cst import PREVIOUS_DIRECTION, BLOCKED_SINCE
|
6
|
6
|
from intelligine.synergy.event.move.direction import directions_same_level, directions_modifiers, directions_slighty
|
7
|
7
|
|
8
|
8
|
|
|
@@ -51,11 +51,7 @@ class MoveAction(Action):
|
51
|
51
|
return direction_name
|
52
|
52
|
|
53
|
53
|
def _direction_point_is_possible(self, context, direction_point):
|
54
|
|
- objects_ids_on_this_point = context.metas.list.get(POSITIONS, direction_point, allow_empty=True)
|
55
|
|
- for object_id_on_this_point in objects_ids_on_this_point:
|
56
|
|
- if context.metas.states.have(object_id_on_this_point, IMPENETRABLE):
|
57
|
|
- return False
|
58
|
|
- return True
|
|
54
|
+ return context.position_is_penetrable(direction_point)
|
59
|
55
|
|
60
|
56
|
def run(self, obj, collection, context, synergy_manager):
|
61
|
57
|
if self._move_to_point is not None:
|