improve some random things
This commit is contained in:
parent
65ce80bf68
commit
9b82f220bb
|
@ -192,17 +192,17 @@ async def countdown(ctx: Context, timer):
|
||||||
def get_connected_players_string(ctx: Context):
|
def get_connected_players_string(ctx: Context):
|
||||||
auth_clients = [c for c in ctx.clients if c.auth]
|
auth_clients = [c for c in ctx.clients if c.auth]
|
||||||
if not auth_clients:
|
if not auth_clients:
|
||||||
return 'No player connected'
|
return f'No player connected, of {len(ctx.player_names)} expected players'
|
||||||
|
|
||||||
auth_clients.sort(key=lambda c: (c.team, c.slot))
|
auth_clients.sort(key=lambda c: (c.team, c.slot))
|
||||||
current_team = 0
|
current_team = -1
|
||||||
text = 'Team #1: '
|
text = ''
|
||||||
for c in auth_clients:
|
for c in auth_clients:
|
||||||
if c.team != current_team:
|
if c.team != current_team:
|
||||||
text += f':: Team #{c.team + 1}: '
|
text += f':: Team #{c.team + 1}: '
|
||||||
current_team = c.team
|
current_team = c.team
|
||||||
text += f'{c.name} '
|
text += f'{c.name} '
|
||||||
return 'Connected players: ' + text[:-1]
|
return f'Connected players ({len(auth_clients)} of {len(ctx.player_names)}) ' + text[:-1]
|
||||||
|
|
||||||
|
|
||||||
def get_received_items(ctx: Context, team: int, player: int):
|
def get_received_items(ctx: Context, team: int, player: int):
|
||||||
|
|
|
@ -70,12 +70,13 @@ def main():
|
||||||
for player in range(1, args.multi + 1):
|
for player in range(1, args.multi + 1):
|
||||||
path = getattr(args, f'p{player}')
|
path = getattr(args, f'p{player}')
|
||||||
if path:
|
if path:
|
||||||
if path not in weights_cache:
|
|
||||||
try:
|
try:
|
||||||
|
if path not in weights_cache:
|
||||||
weights_cache[path] = get_weights(path)
|
weights_cache[path] = get_weights(path)
|
||||||
|
print(f"P{player} Weights: {path} >> {weights_cache[path]['description']}")
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
raise ValueError(f"File {path} is destroyed. Please fix your yaml.") from e
|
raise ValueError(f"File {path} is destroyed. Please fix your yaml.") from e
|
||||||
print(f"P{player} Weights: {path} >> {weights_cache[path]['description']}")
|
|
||||||
erargs = parse_arguments(['--multi', str(args.multi)])
|
erargs = parse_arguments(['--multi', str(args.multi)])
|
||||||
erargs.seed = seed
|
erargs.seed = seed
|
||||||
erargs.name = {x: "" for x in range(1, args.multi + 1)} # only so it can be overwrittin in mystery
|
erargs.name = {x: "" for x in range(1, args.multi + 1)} # only so it can be overwrittin in mystery
|
||||||
|
|
1
Text.py
1
Text.py
|
@ -107,6 +107,7 @@ Triforce_texts = [
|
||||||
"You get one\nwish. Choose\nwisely, hero!",
|
"You get one\nwish. Choose\nwisely, hero!",
|
||||||
"Can you please\nbreak us three\nup? Thanks.",
|
"Can you please\nbreak us three\nup? Thanks.",
|
||||||
" Pick us up\n before we\n get dizzy!",
|
" Pick us up\n before we\n get dizzy!",
|
||||||
|
"\n Honk."
|
||||||
]
|
]
|
||||||
BombShop2_texts = ['Bombs!\nBombs!\nBiggest!\nBestest!\nGreatest!\nBoomest!']
|
BombShop2_texts = ['Bombs!\nBombs!\nBiggest!\nBestest!\nGreatest!\nBoomest!']
|
||||||
Sahasrahla2_texts = ['You already got my item, idiot.', 'Why are you still talking to me?', 'This text won\'t change.', 'Have you met my brother, Hasarahshla?']
|
Sahasrahla2_texts = ['You already got my item, idiot.', 'Why are you still talking to me?', 'This text won\'t change.', 'Have you met my brother, Hasarahshla?']
|
||||||
|
|
Loading…
Reference in New Issue