mirror of
https://github.com/ArchipelagoMW/Archipelago.git
synced 2026-03-19 05:49:26 -07:00
Compare commits
1 Commits
NewSoupVi-
...
NewSoupVi-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c2fcaec6ad |
@@ -792,9 +792,10 @@ class Context:
|
||||
return None
|
||||
|
||||
def replace_hint(self, team: int, slot: int, old_hint: Hint, new_hint: Hint) -> None:
|
||||
if old_hint in self.hints[team, slot]:
|
||||
self.hints[team, slot].remove(old_hint)
|
||||
self.hints[team, slot].add(new_hint)
|
||||
for real_slot in self.slot_set(slot):
|
||||
if old_hint in self.hints[team, real_slot]:
|
||||
self.hints[team, real_slot].remove(old_hint)
|
||||
self.hints[team, real_slot].add(new_hint)
|
||||
|
||||
# "events"
|
||||
|
||||
@@ -1982,13 +1983,11 @@ async def process_client_cmd(ctx: Context, client: Client, args: dict):
|
||||
new_hint = new_hint.re_prioritize(ctx, status)
|
||||
if hint == new_hint:
|
||||
return
|
||||
|
||||
concerning_slots = ctx.slot_set(hint.receiving_player) | {hint.finding_player}
|
||||
for slot in concerning_slots:
|
||||
ctx.replace_hint(client.team, slot, hint, new_hint)
|
||||
ctx.replace_hint(client.team, hint.finding_player, hint, new_hint)
|
||||
ctx.replace_hint(client.team, hint.receiving_player, hint, new_hint)
|
||||
ctx.save()
|
||||
for slot in concerning_slots:
|
||||
ctx.on_changed_hints(client.team, slot)
|
||||
ctx.on_changed_hints(client.team, hint.finding_player)
|
||||
ctx.on_changed_hints(client.team, hint.receiving_player)
|
||||
|
||||
elif cmd == 'StatusUpdate':
|
||||
update_client_status(ctx, client, args["status"])
|
||||
|
||||
Reference in New Issue
Block a user