Commit Graph

893 Commits

Author SHA1 Message Date
eudaimonistic f5e9fc9b34
Docs, WebHost: Update faq_en.md (#2313)
* 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>
2023-10-28 14:18:11 -04:00
Aaron Wagener 764128568e
WebHost: consistent naming for player options (#2037)
* 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
2023-10-24 02:20:08 +02:00
Fabian Dill ee31051c43
WebHost: offer combined yaml file on /check if successful (#2337) 2023-10-22 02:02:30 +02:00
black-sliver 56796b7ee8
WebHost: minor css changes to make Supported Games page usable without js (#2266)
* 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>
2023-10-19 20:58:41 -04:00
Natalie Weizenbaum 38c9ee146d
WebHost: Refactor weighted-settings.js (#2318)
* 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
2023-10-18 18:26:52 -04:00
Remy Jette 88dfbd4087
WebHost: Show error instead of 500 for unexpected files in multidata zip (#2260)
* 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>
2023-10-10 23:20:08 +02:00
Aaron Wagener 7193182294
Core: move option results to the World class instead of MultiWorld (#993)
🤞 

* 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>
2023-10-10 22:30:20 +02:00
Fabian Dill a7b4914bb7
WebHost: update flask (#2250)
* WebHost: update flask

* WebHost: update flask-caching

---------

Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>
2023-10-09 10:18:41 +02:00
Fabian Dill 5591879547
WebHost/Factorio: use "better" jinja practices in web tracker (#2257) 2023-10-08 11:30:34 +02:00
kindasneaki 115a6b666c
Webhost: random button presisted after being inactive (#2248)
* update game settings to get the proper attribute

* change to ternary operator
2023-10-04 23:53:59 -04:00
Fabian Dill 6b48f9aac5
WebHost: link to stats from the use statistics directly on landing (#2242) 2023-10-02 20:52:58 -04:00
Fabian Dill c7c94eebeb
WebHost: fix indentation (#2240) 2023-10-02 20:07:31 +02:00
Fabian Dill 9d38725688
WebHost: update ponyorm (#2241) 2023-10-02 20:07:15 +02:00
Fabian Dill 18bf7425c4
WebHost: cache static misc pages (#2245) 2023-10-02 20:06:56 +02:00
Fabian Dill 5d47c5b316
WebHost: check that worlds system is not loaded in customserver (#2222) 2023-09-27 11:26:08 +02:00
Chris Wilson 974bab2b24
[WebHost] Add search filter and collapse button to Supported Games page (#2215)
* Add search filter and collapse button to Supported Games page

* Autofocus search input, fix bug with arrow display when searching

* Add "Expand All" and "Collapse All" buttons. Buttons respect visible games.
2023-09-25 22:15:00 -04:00
kindasneaki 638d6807db
add invisible to locations div (#2191) 2023-09-20 16:53:00 -04:00
black-sliver d471dcc067
Core, WebHost: lazy-load worlds in unpickler, WebHost and WebHostLib (#2156)
* 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
2023-09-20 16:05:56 +02:00
Remy Jette 794959e182
WebHost: Fix KeyError in alttp multitracker (#2194) 2023-09-20 10:20:03 +02:00
Remy Jette a0eea3a650
WebHost: Don't count item links in the summary row completed worlds (#2193) 2023-09-20 01:27:49 +02:00
Fabian Dill 0e7c7bd1bf
Core: update versions (#2186) 2023-09-16 19:23:22 +02:00
Ziktofel 648d682add
SC2 WoL - Mod, Item and Location update (#2113)
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>
2023-09-15 02:22:10 +02:00
Friðberg 1756a30acc
WebHost: Clean up the exported yaml in weighted settings (#2167)
* Trim output yaml in weighted options

Remove options that have only one possible outcome as well as empty arrays, when building yaml.

* fix quotes
2023-09-11 17:17:11 -04:00
Remy Jette 57c13ff273
WebHost: Support multi-select during check/generate file upload (#2138)
* 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
2023-09-11 16:57:14 -04:00
Fabian Dill 29f8053d6e
Factorio: fix website multitracker (#2126)
Co-authored-by: Remy Jette <remy@remyjette.com>
2023-09-10 00:33:36 +02:00
Fabian Dill 2b9e8fa273
WebHost: flask caching doesn't do lazy init anymore (#2155) 2023-09-09 05:02:05 +02:00
Remy Jette 9323f7d892
WebHost: Add a summary row to the Multiworld Tracker (#1965)
* WebHost: Add a summary row to the Multiworld Tracker

Implements suggestions from the generation-suggestions channel:
- https://discord.com/channels/731205301247803413/1124186131911688262
- https://discord.com/channels/731205301247803413/1109513647274856518

* Improve secondsToHours function, and remove jQuery from footerCallback function.

* Don't show the summary row on game-specific multi trackers

---------

Co-authored-by: Chris Wilson <chris@legendserver.info>
2023-08-29 17:58:49 -04:00
Zach Parks 3a4b157363
Adjustments to player-settings.css for better UI on small view-widths. (#2019)
Also removes "portrait" media query as it forces this display method for large monitors.
2023-08-12 23:06:28 -04:00
Fabian Dill 7f180a6d5a Factorio: fix multitracker ID misalignment 2023-07-21 19:11:05 +02:00
Aaron Wagener e8bf471dcd
Webhost: Fix failing gen for players > 1 (#1998) 2023-07-20 22:40:31 +02:00
Zach Parks 9af56ec0dd
WebHost: Update copyright year in footer. (#1951) 2023-07-09 13:23:50 -05:00
Fabian Dill d8a8997684
Core: remove "names" from multidata (#1928) 2023-07-05 21:51:38 +02:00
Fabian Dill ee40312384
LttP: free core of checks_in_area (#1798) 2023-07-02 13:00:05 +02:00
Aaron Wagener 122d404145
Docs: rework main ap setup guide (#1853)
* rework main ap setup guide

* review updates

* add blurb about re-opening rooms and user-content

* more review suggestions

* remove dead links. Windows blurb
2023-06-28 19:06:18 -05:00
Kory Dondzila 76cace725b
WebHost: Fixes multi-tracker checks sorting. (#1893) 2023-06-27 20:40:29 -05:00
Freya Arbjerg d51e0ec0ab
WebHost: Align multitracker status column to the left (#1645)
* Align multitracker status column to the left

* Move 'Status' column to after 'Game' column
2023-06-27 17:37:01 -04:00
Fabian Dill 125ee8b198 WebHost: fix dict lookup exceptions 2023-06-27 04:39:21 +02:00
Aaron Wagener f1ccf1b663 reenable ping 2023-06-25 01:24:39 +02:00
Fabian Dill 78b981228a
Generate: improve error message for missing game (#1857)
---------

Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>
2023-06-23 10:17:35 +02:00
Zach Parks 59ad9e97e5
WebHost: Fix special-range value setting to `custom` when randomization is toggled off (#1856)
* WebHost: Fix custom-range value setting to `custom` when randomization is toggled off

* Remove redundant code

* Add optional parameter default
2023-06-22 22:12:22 -04:00
StripesOO7 abd8eaf36e
WebHost: Change default spoiler-option for games generated from WebHost to 3 instead of 0 (#1852)
* 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>
2023-06-22 21:01:09 -05:00
Fabian Dill a75159b57e
WebHost: import Markup from markupsafe (#1848) 2023-06-20 01:01:42 +02:00
Fabian Dill 422ccdaa4c WebHost: remove some unused imports 2023-06-18 22:56:55 +02:00
Fabian Dill e9f8b1ed28 WebHost: use Py3.11 compatible ponyorm 2023-05-25 14:07:21 +02:00
Fabian Dill 1d565b9aaf WebHost: add game to template export 2023-05-21 05:01:56 +02:00
Fabian Dill 6814bc158a WebHost: index columns used by landing page. 2023-05-21 05:01:29 +02:00
Fabian Dill 97ba631b80 Core: update modules 2023-05-20 19:36:55 +02:00
Zach Parks c8ebad1dfe
WebHost: Prevent `dict` type options with `valid_keys` from exporting with [] on weighted settings. (#1762)
Thanks HK.
2023-05-06 19:07:57 -05:00
Fabian Dill 9edab76567 WebHost: recycle generator processes 2023-04-30 16:34:03 +02:00
Fabian Dill 42da24cb5e WebHost: offer room owner log download link 2023-04-28 05:31:19 +02:00