🐛 修复无法正常铲除枯萎作物的BUG
This commit is contained in:
parent
16c801bcb6
commit
09b51bf548
@ -51,6 +51,9 @@ async def start():
|
||||
# 初始化读取Json
|
||||
await g_pJsonManager.init()
|
||||
|
||||
# await g_pFarmManager.reclamation("1754798088")
|
||||
# await g_pSqlManager.initUserInfoByUid("1754798088", "Art_Sakura", 0, 100)
|
||||
|
||||
# 析构函数
|
||||
@driver.on_shutdown
|
||||
async def shutdown():
|
||||
|
||||
@ -247,6 +247,13 @@ async def _(session: Uninfo):
|
||||
# result = await g_pFarmManager.getUserPlantByUid(uid)
|
||||
# await MessageUtils.build_message(result).send(reply_to=True)
|
||||
|
||||
# diuse_farm.set_path_arg("reclamation", "")
|
||||
|
||||
|
||||
# @diuse_farm.got("test")
|
||||
# async def _(session: Uninfo, flag: str = ArgStr("flag")):
|
||||
# await MessageUtils.build_message("测试一下").send(reply_to=True)
|
||||
|
||||
|
||||
diuse_farm.shortcut(
|
||||
"出售作物(?P<name>.*?)",
|
||||
|
||||
16
farm/farm.py
16
farm/farm.py
@ -371,7 +371,7 @@ class CFarmManager:
|
||||
|
||||
soilUnlock = await g_pSqlManager.getUserSoilByUid(uid)
|
||||
|
||||
soilNames = [f"soil{i}" for i in range(soilUnlock)]
|
||||
soilNames = [f"soil{i + 1}" for i in range(soilUnlock)]
|
||||
soilStatuses = await asyncio.gather(*[
|
||||
g_pSqlManager.getUserSoilStatusBySoilID(uid, name)
|
||||
for name in soilNames
|
||||
@ -583,10 +583,18 @@ class CFarmManager:
|
||||
# userInfo = await g_pSqlManager.getUserInfoByUid(uid)
|
||||
# level = await g_pSqlManager.getUserLevelByUid(uid)
|
||||
|
||||
# rec = g_pJsonManager["reclamation"] # type: ignore
|
||||
# rec = g_pJsonManager.m_pLevel["reclamation"] # type: ignore
|
||||
|
||||
# if not rec[f"{userInfo["soil"] + 1}"] == None
|
||||
# try:
|
||||
# rec = rec[f"{userInfo['soil'] + 1}"]
|
||||
|
||||
# return ""
|
||||
# #TODO 缺少判断需要的Item
|
||||
# if level >= rec['level'] and userInfo['point'] >= rec['point']:
|
||||
|
||||
|
||||
# except Exception as e:
|
||||
# return "获取升级土地条件失败!"
|
||||
|
||||
# return "开垦土地失败,未知错误"
|
||||
|
||||
g_pFarmManager = CFarmManager()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user