* WebHost: restore fragment links for glossary and faq
such as /faq/en/#what-does-multi-game-mean
* WebHost: faq, glossary: make markdown titles clickable
* WebHost: reduce precision and optimize header-logo.svg
technically those files will not produce an identical output when rendered
however the difference is virtually impossible to see even when rendered to w=4096
* WebHost: keep original svg
* WebHost: add spinner to room command
and show error message if fetch fails due to NetworkError
* WebHost: don't update room log while tab is inactive
* WebHost: don't include log for automated requests
* WebHost: refresh room also for re-spinups
and do that from javascript
* Test, WebHost: send fake user-agent where required
* WebHost: remove wrong comment in host room
* Render option documentation as reStructuredText in the WebView
This means that options can use the standard Python documentation
format, while producing much nicer-looking documentation in the
WebView with things like emphasis, lists, and so on.
* Opt existing worlds out of rich option docs
This avoids breaking the rendering of existing option docs which were
written with the old plain text rendering in mind, while also allowing
new options to default to the rich text rendering instead.
* Use reStructuredText formatting for Lingo Options docstrings
* Disable raw and file insertion RST directives
* Update doc comments per code review
* Make rich text docs opt-in
* Put rich_text_options_doc on WebWorld
* Document rich text API
* Code review
* Update docs/options api.md
Co-authored-by: Doug Hoskisson <beauxq@users.noreply.github.com>
* Update Options.py
Co-authored-by: Doug Hoskisson <beauxq@users.noreply.github.com>
---------
Co-authored-by: Chris Wilson <chris@legendserver.info>
Co-authored-by: Doug Hoskisson <beauxq@users.noreply.github.com>
* Fix improper css for word-break on player-options page
* Add default handling to weighted-options types
* Remove random-low/mid/high from Toggle, Choice, and TextChoice,
* Port key sorting for OptionList and OptionSet from player-options to weighted-options
* Ensure Choice and TextChoice values are set properly
* Remove debug line 🤦♂️
* Implement support for option groups. WebHost options pages still need to be updated.
* Remove debug output
* In-progress conversion of player-options to Jinja rendering
* Support "Randomize" button without JS, transpile SCSS to CSS, include map file for later editors
* Un-alphabetize options, add default group name for item/location Option classes, implement more option types
* Re-flow UI generation to avoid printing rows with unsupported or invalid option types, add support for TextChoice options
* Support all remaining option types
* Rendering improvements and CSS fixes for prettiness
* Wrap options in a form, update button styles, fix labels, disable inputs where the default is random, nuke the JS
* Minor CSS tweaks, as recommended by the designer
* Hide JS-required elements in noscript tag. Add JS reactivity to range, named-range, and randomize buttons.
* Fix labels, add JS handling for TextChoice
* Make option groups collapsable
* PEP8 current option_groups progress (#2604)
* Make the python more PEP8 and remove unneeded imports
* remove LocationSet from `Item & Location Options` group
* It's ugly, but YAML generation is working
* Stop generating JSON files for player-options pages
* Do not include ItemDict entries whose values are zero
* Properly format yaml output
* Save options when form is submitted, load options on page load
* Fix options being omitted from the page if a group has an even number of options
* Implement generate-game, escape option descriptions
* Fix "randomize" checkboxes not properly setting YAML options to "random"
* Add a separator between item/location groups and items/locations in their respective lists
* Implement option presets
* Fix docs to detail what actually ended up happening
* implement option groups on webworld to allow dev sorting (#2616)
* Force extremely long item/location/option names with no spaces to text-wrap
* Fix "randomize" button being too wide in single-column display, change page header to include game name
* Update preset select to read "custom" when updating form inputs. Show error message if the user doesn't input a name
* Un-break weighted-options, add option group names to weighted options
* Nuke weighted-options. Set up framework to rebuild it in Jinja.
* Generate styles with scss, remove styles which will be replaced, add placeholders for worlds
* Support Toggle, DefaultOnToggle, and Choice options in weighted-options
* Implement expand/collapse without JS for worlds and option groups
* Properly style set options
* Implement Range and NamedRange. Also, CSS is hard.
* Add support for remaining option types. JS and backend still forthcoming.
* Add JS functionality for collapsing game divs, populating span values on range updates. Add <noscript> tag to warn users with JS disabled.
* Support showing/hiding game divs based on range value for game
* Add support for adding/deleting range rows
* Save settings to localStorage on form submission
* Save deleted options on form submission
* Break weighted-options into a per-game page.
- Break weighted-options into a per-game page
- Add "advanced options" links to supported games page
- Use details/summary tags on supported games, player-options, and weighted-options
- Fix bug preventing previously deleted rows from being removed on page load if JS is enabled
- Move route handling for options pages to options.py
- Remove world handling from weighted-options
* Implement loading previous settings from localStorage on page load if JS is enabled
* Weighted options can now generate YAML files and single-player games
* options pages now respect option visibility settings for simple and complex pages
* Remove `/weighted-settings` redirect, fix weighted-options link on player-options page
* Fix instance of AutoWorld not having access to proper `random`
* Catch instances of frozenset along with set
* Restore word-wrap in tooltips
* Fix word wrap in player-options labels
* Add `dedent` filter to help with formatting tooltips in player-options
* Do not change the ordering of keys when printing yaml files
* Move necessary import out of conditional statement
* Expand only the first option group by default on both options pages
* Respect option visibility when generating yaml template files
* Swap to double quotes
* Replace instances of `/weighted-settings` with `/weighted-options`, swap out incomplete links
* Strip newlines and spaces after applying dedent filter
* Fix documentation for option groups
* Update site map
* Update various docs
* Sort OptionSet lists alphabetically
* Minor style tweak
* Fix extremely long text overflowing tooltips
* Convert player-options to use CSS grid instead of tables
* Do not display link to weighted-options page on supported games if the options page is an external link
* Update worlds/AutoWorld.py
Bugfix by @alwaysintreble
Co-authored-by: Aaron Wagener <mmmcheese158@gmail.com>
* Fix NamedRange options not being properly set if a preset it loaded
* Move option-presets route into options.py
* Include preset name in YAML if not "default" and not "custom"
* Removed macros for PlandoBosses and DefaultOnToggle, as they were handled by their parent classes
* Fix not disabling custom inputs when the randomize button is clicked
* Only sort OptionList and OptionSet valid_keys if they are unordered
* Quick style fixes for player-settings to give `select` elements `text-overflow: ellipsis` and increase base size of left-column
* Prevent showing a horizontal scroll bar on player-options if the browser width was beneath a certain threshold
* Fix a bug in weighted-options which prevented inputting a negative value for new range inputs
---------
Co-authored-by: Aaron Wagener <mmmcheese158@gmail.com>
* Add a `robots.txt` file to prevent crawlers from scraping the site
* Added `ASSET_RIGHTS` entry to config.yaml to control whether `/robots.txt` is served or not
* Always import robots.py, determine config in route function
* Finish writing a comment
* Remove unnecessary redundant import and config
Adds HotS, LotV and NCO campaigns to SC2 game.
The world's name has changed to reflect that (it's not only Wings of Liberty now)
The client was patched in a way that can still join to games generated prior this change
---------
Co-authored-by: Magnemania <magnemight@gmail.com>
Co-authored-by: EnvyDragon <138727357+EnvyDragon@users.noreply.github.com>
Co-authored-by: Matthew <matthew.marinets@gmail.com>
Co-authored-by: hopop201 <benjy.hopop201@gmail.com>
Co-authored-by: Salzkorn <salzkitty@gmail.com>
Co-authored-by: genderdruid <pallyoffail@gmail.com>
Co-authored-by: MadiMadsen <137329235+MadiMadsen@users.noreply.github.com>
Co-authored-by: neocerber <neocerber@gmail.com>
Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>
Co-authored-by: Fabian Dill <Berserker66@users.noreply.github.com>
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.
* 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
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>
* 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>
* Restore "random" option to weighted-settings, adjust capitalization of hardcoded settings
* Set default value as "random" for Choice, TextChoice, and Toggle options with no default value
* Add support for items-list, locations-list, and custom-list option types to weighted-settings
* Fix subclass detection for `items-list`, `locations-list`, and `custom-list` in weighted-settings
* Move specially handled options alongside each other in the UI, and split them into logical groupings
* Fix header text and location for Priority an Exclusion locations
* Add universally supported "random" option to `Choice` and `TextChoice` options in weighted-settings
* Update description text for exclusion items to clarify they also prevent helpful items.
* Be technically correct and call them `useful` items.
* Fix a bug causing weighted-settings UI to incorrectly display range values with no default as having a value of 25.
* Do not set min and max values of range options to zero by default. This causes clutter in saved `.yaml` files.
* [WebHost] Unify styles for popover and mobile menus. Adjust popover menu to function the same as the mobile menu, and toggle via JS.
* Remove class `first-link` in favor of CSS `:first-child`.
* Adjust mobile menu link font size and padding. Change wording of popover trigger text. Add border-right to popover menu. Change "Upload Host File" to "Host Game"
* Change mobile menu text to "Host Game"
* Change archipelago mod download page
* Docs: change connecting to archipelago in RoR2 setup guide
* dropdowns for links
* change some relative sizing
* change links and reorder links
* dropdowns for links
* change some relative sizing
* change links and reorder links
* mobile view was showing on desktop early
* add in missing relative font sizes
* clean up and add a temp downdown img
* move links around
* added cloud border
* move arrow to the left side
* Improve mobile styles for WebHost
- Mobile view works properly on mobile Chrome and Firefox
- Added thin-window view for desktop browsers that have been reduced in size
- Tested in Chrome and Firefox on mobile and desktop
* Improve style for small-width desktop popover