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.
* core: Add host.yaml setting to make !countdown configurable
* Store /option changes to countdown_mode in save file
* Wording changes in host.yaml
* Use .get
* Fix validation for /option command
* CreateHint command
* Docs
* oops
* forgot an arg
* Update MultiServer.py
* Add documentation on what happens when the hint already exists but with a different status (nothing)
* Early exit if no locations provided
* Add a clarifying comment to the code as well
* change wording a bit
Basically, hints for itemlink worlds' locations get stored in ctx.hints under
1. the location's player
2. **every individual player** that is participating in the itemlink.
Right now, the updatehint code tries to replace and resend the hint under the itemlinked player, which doesn't work.
* MultiServer: add NoText tag and handling
* MultiServer: deprecate and warn for uncompressed connections
* MultiServer: fix missing space in no compression warning
* Vi don't forget about itemlinks challenge difficulty impossible
* People other than Vi also don't forget about ItemLinks challenge difficulty impossible
* Introduce 'Hint Priority' concept
* fix error when sorting hints while not connected
* fix 'found' -> 'status' kivy stuff
* remove extraneous warning
this warning fired if you clicked to select or toggle priority of any hint, as you weren't clicking on the header...
* skip scanning individual header widgets when not clicking on the header
* update hints on disconnection
* minor cleanup
* minor fixes/cleanup
* fix: hints not updating properly for receiving player
* update re: review
* 'type() is' -> 'isinstance()'
* cleanup, re: Jouramie's review
* Change 'priority' to 'status', add 'Unspecified' and 'Avoid' statuses, update colors
* cleanup
* move dicts out of functions
* fix: new hints being returned when hint already exists
* fix: show `Found` properly when hinting already-found hints
* import `Hint` and `HintStatus` directly from `NetUtils`
* Default any hinted `Trap` item to be classified as `Avoid` by default
* add some sanity checks
* re: Vi's feedback
* move dict out of function
* Update kvui.py
* remove unneeded dismiss message
* allow lclick to drop hint status dropdown
* underline hint statuses to indicate clickability
* only underline clickable statuses
* Update kvui.py
* Update kvui.py
---------
Co-authored-by: Silvris <58583688+Silvris@users.noreply.github.com>
Co-authored-by: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com>
* change to persist all hints to ctx.hints regardless of found status
* remove if not found entirely as it seems like it was added to not double charge hint points
9842399d8b
* Core: downgrade websockets to 13.x
14.x currently doesn't work for MultiServer.
14.x is not supported with py3.8, so updating to 14.x should be scheduled for AP 0.6.0.
* CI: 5min timeout for hosting test
* MultiServer: properly shutdown even if ctx is invalid
* CI: increase hosting test timeout to 10min
this is 4x expected time, just to be safe.