Sfoglia il codice sorgente

!2 remove unused function

pcacc 1 settimana fa
parent
commit
781303a65a
2 ha cambiato i file con 6 aggiunte e 8 eliminazioni
  1. 4 6
      app_dongri.py
  2. 2 2
      dongri_task.py

+ 4 - 6
app_dongri.py

@@ -54,15 +54,15 @@ def thread_runTask():
             current_time = time.time()
             task = GlobalState.task_queue[-1]
             GlobalState.task_queue.pop()
-            print(f"-----------{task.name} 开始执行-----------")
+            print(f"-----------{GlobalState.g_times} {task.name} 开始执行-----------")
             GlobalState.last_process = task.name
             try:
                 task.run()
             except Exception as e:
-                print(f"-----------{task.name} 执行失败,错误原因:{e}-----------")
+                print(f"-----------{GlobalState.g_times} {task.name} 执行失败,错误原因:{e}-----------")
             cost_time = int(time.time() - current_time)
             send_status(f"{task.name} 执行完成,耗时{cost_time}秒")
-            print(f"-----------{task.name} 执行完成,耗时{cost_time}秒-----------")
+            print(f"-----------{GlobalState.g_times} {task.name} 执行完成,耗时{cost_time}秒-----------")
             myTimeSleep_small()
         else:
             myTimeSleep_big()
@@ -294,7 +294,6 @@ def add_auto_task(isMaxCollect, isJina, isSimple = False, isAddStrengh = False,
             if len(GlobalState.task_queue) < 5:
                 if GlobalState.g_firstRunBear:
                     GlobalState.g_firstRunBear = False
-                    start_recording()
                     GlobalState.task_queue.appendleft(task_useAnnimalSkill(True))
                     GlobalState.task_queue.appendleft(task_returnAllLine())
                     GlobalState.task_queue.appendleft(task_useAnnimalSkill(True))
@@ -321,7 +320,6 @@ def add_auto_task(isMaxCollect, isJina, isSimple = False, isAddStrengh = False,
             if GlobalState.g_switch:
                 update_rungame_type(0)
             send_status(f'巨熊行动:在60min内,切换到无尽模式')
-        stop_recording()
         
         print("add special activity")
         # special activity
@@ -378,7 +376,7 @@ def add_auto_task(isMaxCollect, isJina, isSimple = False, isAddStrengh = False,
     
         print("add rare activity")
         if GlobalState.g_times % 5 == 1:
-            if get_rungame_type() == 0:
+            if GlobalState.g_switch and get_rungame_type() == 0:
                 GlobalState.task_queue.appendleft(check_buildOrResearch())
             GlobalState.task_queue.appendleft(task_cure(True, GlobalState.g_cureNum))
             GlobalState.task_queue.appendleft(task_information())

+ 2 - 2
dongri_task.py

@@ -1710,7 +1710,7 @@ if __name__ == '__main__':
     #yys_ocrAuto(check_img.line_orc)
     #basic_operate.go_town()
     #basic_operate.add_strength()
-    task_fightMonster(False, False,False).run()
+    #task_fightMonster(False, False,False).run()
     #task_checkHelp().run()
     #task_checkStoreRoom().run()
     #task_start_game(1)
@@ -1722,7 +1722,7 @@ if __name__ == '__main__':
     #task_train("upgrade").run()
     #task_information(True).run()
     #check_buildOrResearch().run()
-    #task_checkDonata().run()
+    task_checkDonata().run()
     #task_collect(1).run()
     #task_collect(2).run()
     #task_collect(3).run()