Commit Graph

9 Commits

Author SHA1 Message Date
black-sliver
821645a881 MultiServer, customserver: cache: rename module 2026-03-05 22:17:10 +01:00
black-sliver
2ec4be6f1f customserver: cache: reformat 2026-02-28 21:02:34 +01:00
black-sliver
9996c12ef9 MultiServer, customserver: cache: typing improvements 2026-02-28 20:56:07 +01:00
black-sliver
1346a89a4a customserver: games package cache: fix py3.11 compat 2026-02-28 20:56:07 +01:00
black-sliver
a294e1cdc9 customserver: make WebHost import lazy in games package cache
and fix test
2026-02-28 20:56:07 +01:00
black-sliver
aad980a3a2 Test, MultiServer: reorder imports
Hopefully this fixes the random test failures with pytest-xdist
2026-02-28 19:19:27 +01:00
black-sliver
63bc205dab customserver: typing cleanup in games package cache 2026-02-28 15:35:24 +01:00
black-sliver
4a355f3585 customserver: handle missing checksum in datapackage cache 2026-02-28 15:34:58 +01:00
black-sliver
9489a950cb MultiServer, customserver: move data package handling
Create a new class that handles conversion worlds+embedded -> context data.
Create a derived class that uses static_server_data+pony instead.
There is also a not very efficient feature to deduplicate strings (may need perf testing).

By moving code around, we can simplify a lot of the world loading.
Where code lines were touched, some typing and some reformatting was added.
The back compat for GetDataPackage without games was finally dropped.
This was done as a cleanup because the refactoring touched those lines anyway.

Also reworked the per-context dicts and the RoomInfo to hopefully be more efficient
by ignoring unused games. (Generating the list of used games was required for the new
code anyway.)

Side effect of the MultiServer cache: we now load worlds lazily (but still all at once)
and don't modify the games package in place. If needed we create copies.
This almost gets us to the point where MultiServer doesn't need worlds - it still needs
them for the forbidden items.
There is a bonus optimization that deduplicates strings in name_groups that may have bad
performance and may need some perf testing if we run into issues.
2026-02-27 00:53:34 +01:00