瀏覽代碼

indentation

Bastien Sevajol 9 年之前
父節點
當前提交
dfaeb4ed6b
共有 1 個文件被更改,包括 6 次插入7 次删除
  1. 6 7
      intelligine/synergy/event/CycleAction.py

+ 6 - 7
intelligine/synergy/event/CycleAction.py 查看文件

@@ -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)