🐛 Fixed percentage number
This commit is contained in:
parent
1d0797a58a
commit
7cef2f75f9
10 changed files with 19 additions and 6 deletions
|
@ -31,7 +31,10 @@ with db_session:
|
|||
if i["props"]:
|
||||
|
||||
def replace_props(m):
|
||||
result = i["props"][m.group(1)]
|
||||
prop_name = m.group(1)
|
||||
result = i["props"][prop_name]
|
||||
if prop_name.startswith("prct"):
|
||||
result = int(result * 100)
|
||||
if isinstance(result, list):
|
||||
result = result[0]
|
||||
if not isinstance(result, str):
|
||||
|
|
|
@ -35,6 +35,8 @@ with db_session:
|
|||
if prop_name == "ShockAffectDuration":
|
||||
prop_name = "duration" # 雷盾带电手动触发
|
||||
result = i["props"][prop_name]
|
||||
if prop_name.startswith("prct"):
|
||||
result = int(result * 100)
|
||||
if isinstance(result, list):
|
||||
result = result[0]
|
||||
if not isinstance(result, str):
|
||||
|
|
|
@ -35,6 +35,8 @@ with db_session:
|
|||
if prop_name == "ShockAffectDuration":
|
||||
prop_name = "duration2" # 雷盾带电手动触发
|
||||
result = i["props"][prop_name]
|
||||
if prop_name.startswith("prct"):
|
||||
result = int(result * 100)
|
||||
if isinstance(result, list):
|
||||
result = result[0]
|
||||
if not isinstance(result, str):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue