This commit is contained in:
2025-04-11 18:46:46 +08:00
parent d074c75b6c
commit 719a1b8d34
4 changed files with 22 additions and 8 deletions
+4 -1
View File
@@ -634,8 +634,11 @@ class CSqlManager:
if plant in plantsDict:
plantsDict[plant] += num
if plantsDict[plant] <= 0:
del plantsDict[plant]
else:
plantsDict[plant] = num
if num > 0:
plantsDict[plant] = num
updatedPlants = ','.join([f"{name}|{count}" for name, count in plantsDict.items()])