MultiServer.py: Another Hint Priority + Item Links bug oh boy

Basically, the hint for an item linked item gets stored in two players' hints.

1. The player whose location it is
2. **Every individual player** participating in the item link

Crucially, it is *not* stored as a hint for the itemlink world.

This makes `replace_hint` not act correctly when a receiving player of an itemlink item tries to change the priority.

I'm not sure if this has other implications, it probably warrants some testing.
This commit is contained in:
NewSoupVi
2025-04-13 20:39:31 +02:00
committed by GitHub
parent ec1e113b4c
commit c2fcaec6ad

View File

@@ -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"