🐛 修复了农场详述无法正常输出的BUG
@ -55,6 +55,8 @@
|
||||
| 指令 | 描述 | Tip |
|
||||
| --- | --- | --- |
|
||||
| @小真寻 开通农场 | 首次开通农场 | |
|
||||
| 我的农场 | 你的农场 | |
|
||||
| 农场详述 | 农场详细信息 | |
|
||||
| 我的农场币 | 查询农场币 | |
|
||||
| 种子商店 [筛选关键字] [页数] or [页数] | 查看种子商店 | 当第一个参数为非整数时,会默认进入筛选状态。页数不填默认为1 |
|
||||
| 购买种子 [种子名称] [数量] | 购买种子 | 数量不填默认为1 |
|
||||
@ -62,7 +64,7 @@
|
||||
| 播种 [种子名称] [数量] | 播种种子 | 数量不填默认将最大可能播种 |
|
||||
| 收获 | 收获成熟作物 | |
|
||||
| 铲除 | 铲除荒废作物 | |
|
||||
| 我的作物 | | |
|
||||
| 我的作物 | 你的作物 | |
|
||||
| 出售作物 [作物名称] [数量] | 从仓库里向系统售卖作物 | 不填写作物名将售卖仓库种全部作物 填作物名不填数量将指定作物全部出售 |
|
||||
| @美波理 偷菜 | 偷别人的菜 | 每人每天只能偷5次 |
|
||||
| 购买农场币 | 将真寻金币兑换成农场币 | 兑换比例默认为1:2 手续费默认20% |
|
||||
@ -90,7 +92,7 @@
|
||||
|
||||
- [x] 完善我的农场图片,例如左上角显示用户数据
|
||||
- [ ] 完善升级数据、作物数据、作物图片
|
||||
- [ ] 签到功能
|
||||
- [x] 签到功能
|
||||
- [ ] 添加渔场功能
|
||||
- [ ] 增加活动、交易行功能
|
||||
- [ ] 增加交易行总行功能
|
||||
|
||||
25
farm/farm.py
@ -184,6 +184,7 @@ class CFarmManager:
|
||||
"作物名称",
|
||||
"成熟时间",
|
||||
"土地状态",
|
||||
"被偷数量",
|
||||
"剩余产出",
|
||||
]
|
||||
|
||||
@ -193,9 +194,7 @@ class CFarmManager:
|
||||
for i in range(1, soilNumber + 1):
|
||||
soilInfo = await g_pDBService.userSoil.getUserSoil(uid, i)
|
||||
|
||||
if not soilInfo:
|
||||
continue
|
||||
|
||||
if soilInfo:
|
||||
if soilInfo["soilLevel"] == 1:
|
||||
iconPath = g_sResourcePath / f"soil/TODO.png"
|
||||
else:
|
||||
@ -209,18 +208,19 @@ class CFarmManager:
|
||||
if plantName == "-":
|
||||
matureTime = "-"
|
||||
soilStatus = "-"
|
||||
totalNumber = "-"
|
||||
plantNumber = "-"
|
||||
else:
|
||||
matureTime = g_pToolManager.dateTime().fromtimestamp(int(soilInfo.get("matureTime", 0))).strftime("%Y-%m-%d %H:%M:%S.%f")
|
||||
matureTime = g_pToolManager.dateTime().fromtimestamp(int(soilInfo.get("matureTime", 0))).strftime("%Y-%m-%d %H:%M:%S")
|
||||
soilStatus = await g_pDBService.userSoil.getUserSoilStatus(uid, i)
|
||||
|
||||
num = await g_pDBService.userSteal.getTotalStolenCount(uid, i)
|
||||
totalNumber = await g_pDBService.userSteal.getTotalStolenCount(uid, i)
|
||||
planInfo = await g_pDBService.plant.getPlantByName(plantName)
|
||||
|
||||
if not planInfo:
|
||||
plantNumber = f"None / {num}"
|
||||
plantNumber = f"None"
|
||||
else:
|
||||
plantNumber = f"{planInfo['harvest']} / {num}"
|
||||
plantNumber = f"{planInfo['harvest']}"
|
||||
|
||||
dataList.append(
|
||||
[
|
||||
@ -229,29 +229,30 @@ class CFarmManager:
|
||||
plantName,
|
||||
matureTime,
|
||||
soilStatus,
|
||||
totalNumber,
|
||||
plantNumber,
|
||||
])
|
||||
|
||||
if len(dataList) >= 15:
|
||||
result = await ImageTemplate.table_page(
|
||||
"土地详细信息",
|
||||
"测试N\n测试2",
|
||||
"",
|
||||
columnName,
|
||||
dataList,
|
||||
)
|
||||
|
||||
info.append(result)
|
||||
info.append(result.copy())
|
||||
dataList.clear()
|
||||
|
||||
if i >= 30:
|
||||
if i >= soilNumber:
|
||||
result = await ImageTemplate.table_page(
|
||||
"土地详细信息",
|
||||
"测试N\n测试2",
|
||||
"",
|
||||
columnName,
|
||||
dataList,
|
||||
)
|
||||
|
||||
info.append(result)
|
||||
info.append(result.copy())
|
||||
dataList.clear()
|
||||
|
||||
return info
|
||||
|
||||
BIN
resource/plant/香粽龙舟/1.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
resource/plant/香粽龙舟/2.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
resource/plant/香粽龙舟/3.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
resource/plant/香粽龙舟/4.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
resource/plant/香粽龙舟/5.png
Normal file
|
After Width: | Height: | Size: 34 KiB |
BIN
resource/soil/普通土地-施肥.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
BIN
resource/soil/紫金土地-缺水.png
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
resource/soil/紫金土地.png
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
resource/soil/红土地-施肥.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
BIN
resource/soil/红土地.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 20 KiB |
BIN
resource/soil/蓝晶土地-施肥.png
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
resource/soil/蓝晶土地-缺水.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
resource/soil/蓝晶土地.png
Normal file
|
After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
BIN
resource/soil/黑土地-施肥.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
resource/soil/黑土地-缺水.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |