From 9b2f8a96b33dcbd503372bc9deb96462b400a0d1 Mon Sep 17 00:00:00 2001 From: TKaxv_7S <954067342@qq.com> Date: Tue, 16 Jul 2024 23:24:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=20=E5=B0=8F=E9=B8=A1?= =?UTF-8?q?=E7=9D=A1=E8=A7=89=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xposed/sesame/model/task/antFarm/AntFarm.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/tkaxv7s/xposed/sesame/model/task/antFarm/AntFarm.java b/app/src/main/java/tkaxv7s/xposed/sesame/model/task/antFarm/AntFarm.java index 295e13af..474a4760 100644 --- a/app/src/main/java/tkaxv7s/xposed/sesame/model/task/antFarm/AntFarm.java +++ b/app/src/main/java/tkaxv7s/xposed/sesame/model/task/antFarm/AntFarm.java @@ -377,9 +377,6 @@ public void run() { } private void animalSleepAndWake() { - if (!Status.canAnimalSleep()) { - return; - } String sleepTime = this.sleepTime.getValue(); if ("-1".equals(sleepTime)) { return; @@ -402,14 +399,17 @@ private void animalSleepAndWake() { boolean afterWakeUpTime = now.compareTo(animalWakeUpTimeCalendar) > 0; if (afterSleepTime && afterWakeUpTime) { //睡觉时间后 + if (!Status.canAnimalSleep()) { + return; + } Status.animalSleep(); Log.record("已错过小鸡今日睡觉时间"); return; } if (afterSleepTime) { //睡觉时间内 - if (!animalSleepNow()) { - return; + if (Status.canAnimalSleep()) { + animalSleepNow(); } animalWakeUpTime(animalWakeUpTime); return; @@ -497,7 +497,7 @@ private Boolean animalSleepNow() { return true; } } else { - Log.farm("小鸡无法睡觉🛌"); + Log.farm("小鸡无需睡觉🛌"); } } } catch (Throwable t) {