MultiServer: add JSONMessagePart["player"]

This commit is contained in:
Fabian Dill
2021-11-07 14:42:05 +01:00
parent 2b124aaff4
commit 666e3b5333
4 changed files with 18 additions and 7 deletions

View File

@@ -111,7 +111,7 @@ class ServerLabel(HoverBehavior, Label):
text += "\nPermissions:"
for permission_name, permission_data in ctx.permissions.items():
text += f"\n {permission_name}: {permission_data}"
if ctx.hint_cost is not None:
if ctx.hint_cost is not None and ctx.total_locations:
text += f"\nA new !hint <itemname> costs {ctx.hint_cost}% of checks made. " \
f"For you this means every {max(0, int(ctx.hint_cost * 0.01 * ctx.total_locations))} " \
"location checks."