When managing an async, it can be useful to sort the tracker by Last
Activity to see who has potentially abandoned their slots. Today, if a
slot hasn't been started (last activity is None) then it is sorted as
if last activity is -1, that it is it has had more recent activity than
any other slot.
This change makes it so slots that haven't started are treated as if
they have last activity MAX_VALUE time ago. This way they get sorted
with slots that haven't been touched in a long time which should make
intuitive sense as the "last activity" is effectively inf time ago.
* Factor out a common function for building lists
* Expose name groups through the weighted-settings UI
* Fix weighted-settings page
The request for the JSON file that provides the setting data was missed during the rename in #2037, so prior to this the weighted settings page wasn't rendering at all.
The request for the JSON file that provides the setting data was missed during the rename in #2037, so prior to this the weighted settings page wasn't rendering at all.
* WebHost: Round percentage of checks, fix possible 500 error
* Round using str.format in the template
How the percentage of checks done should be displayed is a display
concern, so it makes sense to just always do it in the template. That
way, along with using .format() instead of .round, means we always get
exactly the same presentation regardless of whether it ends in .00
(which would not round to two decimal places), is an int (which
`round(2)` wouldn't touch at all), etc.
* Round percent_total_checks_done in lttp multitracker
* Fix non-LttP games showing as 0% done in LttP MultiTracker
* Update faq_en.md
Reorganizing information and adding links to some of the various guides and website pages. Even just adding the Getting Started, Supported Games, and Server Commands links seems like a hefty upgrade. We have good resources, we should make them obvious.
I think more can probably be done here, but I already shuffled this around a lot.
* Reorganize information again, elaborate single player
Sneaki's suggestion makes way more sense organizationally. Added more detail to the single player section to more clearly explain the easiest method.
* Usage of multi-world
Consistency
Co-authored-by: kindasneaki <ryandj67@hotmail.com>
* More multi-world
More consistency
Co-authored-by: kindasneaki <ryandj67@hotmail.com>
* Revert to multiworld
Makes more sense and is colloquially the preferred terminology.
* Rework "leaving early"
Changed the "What if a player needs to leave early" section into, "Does everyone need to be connected at the same time?"
This allows the FAQ to explain briefly what a sync multiworld and an async multiworld is. This is probably good material for the Glossary, but it comes up so much in the Discord that we probably need to explain it here as briefly as possible. This paragraph lends itself to the question of what to do if a player must leave early anyway.
* Grammatical, tensing, and voice updates for consistency with other pages I originally authored.
---------
Co-authored-by: kindasneaki <ryandj67@hotmail.com>
Co-authored-by: Chris Wilson <chris@legendserver.info>
* WebHost: unify references to options
* it was just an extra s the whole time...
* grammar
* redirect from old pages
* redirect stuff correctly
* use url_for
* use " for modified strings
* remove redirect cache
* player_settings
* update site map
* WebHost: minor css changes to make Supported Games page usable without js
* Update JS to use querySelectorAll, remove most id attributes from elements, use relative element selectors
* Hide content when clearing search bar
* Remove `console.log`, remove TODO
---------
Co-authored-by: Chris Wilson <chris@legendserver.info>
* Refactor weighted-settings.js
This moves most of the infrastructure into two classes:
* WeightedSettings covers the settings page as a whole. It tracks the
user's current settings in local storage as well as the game data
from the server so they don't need to be manually passed around from
function to function.
* GameSettings covers the settings for a single game, and provides a
view of the current settings and the game data just for that game.
* Fix item count updating
* WebHost: Show error instead of 500 for unexpected files in multidata zip
* Add filename to error message
* Apply suggestions from code review
Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>
---------
Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>
🤞
* map option objects to a `World.options` dict
* convert RoR2 to options dict system for testing
* add temp behavior for lttp with notes
* copy/paste bad
* convert `set_default_common_options` to a namespace property
* reorganize test call order
* have fill_restrictive use the new options system
* update world api
* update soe tests
* fix world api
* core: auto initialize a dataclass on the World class with the option results
* core: auto initialize a dataclass on the World class with the option results: small tying improvement
* add `as_dict` method to the options dataclass
* fix namespace issues with tests
* have current option updates use `.value` instead of changing the option
* update ror2 to use the new options system again
* revert the junk pool dict since it's cased differently
* fix begin_with_loop typo
* write new and old options to spoiler
* change factorio option behavior back
* fix comparisons
* move common and per_game_common options to new system
* core: automatically create missing options_dataclass from legacy option_definitions
* remove spoiler special casing and add back the Factorio option changing but in new system
* give ArchipIDLE the default options_dataclass so its options get generated and spoilered properly
* reimplement `inspect.get_annotations`
* move option info generation for webhost to new system
* need to include Common and PerGame common since __annotations__ doesn't include super
* use get_type_hints for the options dictionary
* typing.get_type_hints returns the bases too.
* forgot to sweep through generate
* sweep through all the tests
* swap to a metaclass property
* move remaining usages from get_type_hints to metaclass property
* move remaining usages from __annotations__ to metaclass property
* move remaining usages from legacy dictionaries to metaclass property
* remove legacy dictionaries
* cache the metaclass property
* clarify inheritance in world api
* move the messenger to new options system
* add an assert for my dumb
* update the doc
* rename o to options
* missed a spot
* update new messenger options
* comment spacing
Co-authored-by: Doug Hoskisson <beauxq@users.noreply.github.com>
* fix tests
* fix missing import
* make the documentation definition more accurate
* use options system for loc creation
* type cast MessengerWorld
* fix typo and use quotes for cast
* LTTP: set random seed in tests
* ArchipIdle: remove change here as it's default on AutoWorld
* Stardew: Need to set state because `set_default_common_options` used to
* The Messenger: update shop rando and helpers to new system; optimize imports
* Add a kwarg to `as_dict` to do the casing for you
* RoR2: use new kwarg for less code
* RoR2: revert some accidental reverts
* The Messenger: remove an unnecessary variable
* remove TypeVar that isn't used
* CommonOptions not abstract
* Docs: fix mistake in options api.md
Co-authored-by: Doug Hoskisson <beauxq@users.noreply.github.com>
* create options for item link worlds
* revert accidental doc removals
* Item Links: set default options on group
* change Zillion to new options dataclass
* remove unused parameter to function
* use TypeGuard for Literal narrowing
* move dlc quest to new api
* move overcooked 2 to new api
* fixed some missed code in oc2
* - Tried to be compliant with 993 (WIP?)
* - I think it all works now
* - Removed last trace of me touching core
* typo
* It now passes all tests!
* Improve options, fix all issues I hope
* - Fixed init options
* dlcquest: fix bad imports
* missed a file
* - Reduce code duplication
* add as_dict documentation
* - Use .items(), get option name more directly, fix slot data content
* - Remove generic options from the slot data
* improve slot data documentation
* remove `CommonOptions.get_value` (#21)
* better slot data description
Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>
---------
Co-authored-by: el-u <109771707+el-u@users.noreply.github.com>
Co-authored-by: Doug Hoskisson <beauxq@users.noreply.github.com>
Co-authored-by: Doug Hoskisson <beauxq@yahoo.com>
Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>
Co-authored-by: Alex Gilbert <alexgilbert@yahoo.com>
* Core: lazy-load worlds in unpickler
this should hopefully fix customserver's memory consumption
* WebHost: move imports around to save memory in MP
* MultiServer: prefer loading _speedups without pyximport
This saves ~15MB per MP and speeds up module import if it was built in-place.
* Tests: fix tests for changed WebHost imports
* CustomServer: run GC after setup
* CustomServer: cleanup exception handling
Migrates SC2 WoL world to the new mod with new items and locations. The new mod has a different architecture making it more future proof (with planned adding of other campaigns). Also gets rid of several old bugs
Adds new short game formats intended for sync games (Tiny Grid, Mini Gauntlet). The final mission isn't decided by campaign length anymore but it's configurable instead. Allow excluding missions for Vanilla Shuffled, corrected some documentation.
NOTE: This is a squashed commit with Salz' HotS excluded (not ready for the release and I plan multi-campaign instead)
---------
Co-authored-by: Matthew <matthew.marinets@gmail.com>
* Support multi-select during check/generate file upload
This will allow the user to select multiple YAML files via Shift-Click
or Control-Click in their browser when generating a game via the site
instead of having to zip them locally first.
* Update generate.html: File -> File(s)
* Change check.html button text to "Upload File(s)" to match generate.html
* rework main ap setup guide
* review updates
* add blurb about re-opening rooms and user-content
* more review suggestions
* remove dead links. Windows blurb
* Change default spoiler-option in WebHostLib/generate.py to 3 instead of 0
* shifting spoiler-default to the JS calls instead of setting it in generate.py
---------
Co-authored-by: StripesOO7 <54711792+StripeesOO7@users.noreply.github.com>