Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Commit

Permalink
Merge branch 'refs/heads/main' into new_ui
Browse files Browse the repository at this point in the history
  • Loading branch information
TKaxv-7S committed Jul 16, 2024
2 parents b65247d + 9b2f8a9 commit e3990db
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -377,9 +377,6 @@ public void run() {
}

private void animalSleepAndWake() {
if (!Status.canAnimalSleep()) {
return;
}
String sleepTime = this.sleepTime.getValue();
if ("-1".equals(sleepTime)) {
return;
Expand All @@ -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;
Expand Down Expand Up @@ -497,7 +497,7 @@ private Boolean animalSleepNow() {
return true;
}
} else {
Log.farm("小鸡无法睡觉🛌");
Log.farm("小鸡无需睡觉🛌");
}
}
} catch (Throwable t) {
Expand Down

0 comments on commit e3990db

Please sign in to comment.