MultiServer: fix wrong missing for empty state w/o speedups and add/fix tests (#2052)

* MultiServer: fix wrong missing for empty state w/o speedups

* Tests: fix some tests not being run

* Tests: add test for set intersection with LocationStore
This commit is contained in:
black-sliver
2023-07-29 19:44:10 +02:00
committed by GitHub
parent b579dbfdf8
commit 6d93a6234e
2 changed files with 9 additions and 4 deletions

View File

@@ -390,7 +390,7 @@ class _LocationStore(dict, typing.MutableMapping[int, typing.Dict[int, typing.Tu
checked = state[team, slot]
if not checked:
# This optimizes the case where everyone connects to a fresh game at the same time.
return list(self)
return list(self[slot])
return [location_id for
location_id in self[slot] if
location_id not in checked]