Total Complexity | 1 |
Total Lines | 14 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | from intelligine.cst import CANT_CARRY_STILL, BRAIN_PART_PUT, COL_PUT_OUTSIDE, MODE_EXPLO |
||
6 | class PutOutsideAction(PutableAction): |
||
7 | _listen = PutOutsideEvent |
||
8 | |||
9 | def run(self, obj, context, synergy_manager): |
||
10 | # TODO: Refact avec pare,t |
||
11 | obj_transported = obj.get_carried() |
||
12 | obj_transported.set_carried_by(None) |
||
13 | obj.put_carry(obj_transported, self._parameters['position_to_put']) |
||
14 | context.metas.value.set(CANT_CARRY_STILL, obj.get_id(), 5) |
||
15 | obj.reinit_put_fail_count() |
||
16 | |||
17 | # obj.get_brain().get_part(BRAIN_PART_PUT).done(obj_transported) |
||
18 | obj._remove_col(COL_PUT_OUTSIDE) |
||
19 | obj.get_brain().switch_to_mode(MODE_EXPLO) # TODO: dans le brain.done |
||
20 |