From aa2c5811de51e133f46210a4f8a0daa10bc86200 Mon Sep 17 00:00:00 2001 From: Art_Sakura <1754798088@qq.com> Date: Mon, 30 Jun 2025 04:22:51 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=91=20=E4=BF=AE=E5=A4=8D=E6=96=B0?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E5=BD=B1=E5=93=8D=E6=97=A7=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E6=97=A0=E6=B3=95=E6=94=B6=E8=8E=B7=E4=BD=9C?= =?UTF-8?q?=E7=89=A9=E7=9A=84BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- database/userSoil.py | 2 +- farm/farm.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/database/userSoil.py b/database/userSoil.py index e167b71..48bce09 100644 --- a/database/userSoil.py +++ b/database/userSoil.py @@ -24,7 +24,7 @@ class CUserSoilDB(CSqlManager): "weedStatus": "INTEGER DEFAULT 0", # 杂草状态 0=无杂草,1=有杂草 "waterStatus": "INTEGER DEFAULT 0", # 缺水状态 0=不缺水,1=缺水 "harvestCount": "INTEGER DEFAULT 0", # 收获次数 - "isSoilPlanted": "INTEGER DEFAULT 0", # 是否种植作物 + "isSoilPlanted": "INTEGER DEFAULT NULL", # 是否种植作物 "PRIMARY KEY": "(uid, soilIndex)", } diff --git a/farm/farm.py b/farm/farm.py index 0a65901..f88e110 100644 --- a/farm/farm.py +++ b/farm/farm.py @@ -557,7 +557,7 @@ class CFarmManager: continue # 如果没有种植 - if soilInfo.get("isSoilPlanted", 0): + if soilInfo.get("isSoilPlanted", 1) == 0: continue level = soilInfo.get("soilLevel", 0) @@ -681,7 +681,7 @@ class CFarmManager: continue # 如果没有种植 - if soilInfo.get("isSoilPlanted", 0): + if soilInfo.get("isSoilPlanted", 1) == 0: continue # 如果不是枯萎状态 @@ -816,7 +816,7 @@ class CFarmManager: continue # 如果没有种植 - if soilInfo.get("isSoilPlanted", 0): + if soilInfo.get("isSoilPlanted", 1) == 0: continue # 如果是枯萎状态