Browse Source

indentation

Bastien Sevajol 9 years ago
parent
commit
dfaeb4ed6b
1 changed files with 6 additions and 7 deletions
  1. 6 7
      intelligine/synergy/event/CycleAction.py

+ 6 - 7
intelligine/synergy/event/CycleAction.py View File

@@ -8,11 +8,10 @@ class CycleAction(Action):
8 8
     _listen = CycleEvent
9 9
 
10 10
     def run(self, obj, context, synergy_manager):
11
-      # TODO: refact ...
12
-      cant_carry_still = context.metas.value.get(CANT_CARRY_STILL, obj.get_id(), allow_empty=True, empty_value=0)
13
-      if cant_carry_still > 0:
14
-        context.metas.value.set(CANT_CARRY_STILL, obj.get_id(), cant_carry_still-1)
11
+        cant_carry_still = context.metas.value.get(CANT_CARRY_STILL, obj.get_id(), allow_empty=True, empty_value=0)
12
+        if cant_carry_still > 0:
13
+            context.metas.value.set(CANT_CARRY_STILL, obj.get_id(), cant_carry_still-1)
15 14
 
16
-      cant_put_still = context.metas.value.get(CANT_PUT_STILL, obj.get_id(), allow_empty=True, empty_value=0)
17
-      if cant_put_still > 0:
18
-        context.metas.value.set(CANT_PUT_STILL, obj.get_id(), cant_put_still-1)
15
+        cant_put_still = context.metas.value.get(CANT_PUT_STILL, obj.get_id(), allow_empty=True, empty_value=0)
16
+        if cant_put_still > 0:
17
+            context.metas.value.set(CANT_PUT_STILL, obj.get_id(), cant_put_still-1)