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 # 如果是枯萎状态