|
|
@@ -2,7 +2,7 @@ from intelligine.core.exceptions import NearNothingFound, CantFindWhereToPut
|
|
2
|
2
|
from intelligine.synergy.event.src.NearEvent import NearEvent
|
|
3
|
3
|
from synergine.core.exceptions import NotConcernedEvent
|
|
4
|
4
|
from intelligine.cst import CANT_PUT_STILL, COL_TRANSPORTER_CARRYING, TRANSPORTABLE, BRAIN_SCHEMA, BRAIN_PART_PUT
|
|
5
|
|
-from xyzworld.mechanism.ArroundMechanism import ArroundMechanism
|
|
|
5
|
+from xyzworld.mechanism.AroundMechanism import AroundMechanism
|
|
6
|
6
|
|
|
7
|
7
|
|
|
8
|
8
|
class PutableEvent(NearEvent):
|
|
|
@@ -12,14 +12,11 @@ class PutableEvent(NearEvent):
|
|
12
|
12
|
|
|
13
|
13
|
PARAM_PUT = 'put'
|
|
14
|
14
|
PARAM_PUT_TO = 'put_to'
|
|
15
|
|
- concern = COL_TRANSPORTER_CARRYING
|
|
|
15
|
+ _mechanism = AroundMechanism
|
|
|
16
|
+ _concern = COL_TRANSPORTER_CARRYING
|
|
16
|
17
|
_near_name = 'objects_ids_putable'
|
|
17
|
18
|
_near_map = lambda self, near_object_id, context: context.metas.states.have(near_object_id, TRANSPORTABLE)
|
|
18
|
19
|
|
|
19
|
|
- def __init__(self, actions):
|
|
20
|
|
- super().__init__(actions)
|
|
21
|
|
- self._mechanism = ArroundMechanism
|
|
22
|
|
-
|
|
23
|
20
|
def _prepare(self, object_id, context, parameters={}):
|
|
24
|
21
|
if not self._can_put(object_id, context):
|
|
25
|
22
|
raise NotConcernedEvent()
|