🐛 修复了作物无法正常绘制种子状态的BUG
This commit is contained in:
parent
475865f1e9
commit
04a2cc7b4d
@ -39,7 +39,7 @@ __plugin_meta__ = PluginMetadata(
|
|||||||
""".strip(),
|
""".strip(),
|
||||||
extra=PluginExtraData(
|
extra=PluginExtraData(
|
||||||
author="Art_Sakura",
|
author="Art_Sakura",
|
||||||
version="1.4",
|
version="1.4.1",
|
||||||
commands=[Command(command="我的农场")],
|
commands=[Command(command="我的农场")],
|
||||||
menu_type="群内小游戏",
|
menu_type="群内小游戏",
|
||||||
configs=[
|
configs=[
|
||||||
|
|||||||
@ -56,13 +56,8 @@ class CUserSoilDB(CSqlManager):
|
|||||||
if currentTime >= soilInfo['matureTime']:
|
if currentTime >= soilInfo['matureTime']:
|
||||||
return
|
return
|
||||||
|
|
||||||
currentStage = 0
|
|
||||||
elapsedTime = currentTime - soilInfo['plantTime']
|
elapsedTime = currentTime - soilInfo['plantTime']
|
||||||
|
currentStage = currentStage = sum(1 for thr in phaseList if elapsedTime >= thr)
|
||||||
for idx, thr in enumerate(phaseList, start=1):
|
|
||||||
if elapsedTime < thr:
|
|
||||||
currentStage = idx
|
|
||||||
break
|
|
||||||
|
|
||||||
t = int(soilInfo['plantTime']) - phaseList[currentStage]
|
t = int(soilInfo['plantTime']) - phaseList[currentStage]
|
||||||
s = int(soilInfo['matureTime']) - phaseList[currentStage]
|
s = int(soilInfo['matureTime']) - phaseList[currentStage]
|
||||||
|
|||||||
@ -308,13 +308,9 @@ class CFarmManager:
|
|||||||
# return True, plant, False, offsetX, offsetY
|
# return True, plant, False, offsetX, offsetY
|
||||||
|
|
||||||
#如果没有成熟 则根据当前阶段进行绘制
|
#如果没有成熟 则根据当前阶段进行绘制
|
||||||
currentStage = 0
|
|
||||||
elapsedTime = currentTime - soilInfo['plantTime']
|
|
||||||
|
|
||||||
for idx, thr in enumerate(phaseList, start=1):
|
elapsedTime = currentTime - soilInfo['plantTime']
|
||||||
if elapsedTime < thr:
|
currentStage = sum(1 for thr in phaseList if elapsedTime >= thr)
|
||||||
currentStage = idx
|
|
||||||
break
|
|
||||||
|
|
||||||
if currentStage <= 0:
|
if currentStage <= 0:
|
||||||
if plantInfo['general'] == False:
|
if plantInfo['general'] == False:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user