mirror of
https://github.com/ArchipelagoMW/Archipelago.git
synced 2026-04-25 18:43:29 -07:00
Compare commits
1 Commits
core_spoil
...
misc-webho
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4c06d1193a |
@@ -1087,16 +1087,14 @@ class Spoiler:
|
|||||||
playthrough: Dict[str, Union[List[str], Dict[str, str]]] # sphere "0" is list, others are dict
|
playthrough: Dict[str, Union[List[str], Dict[str, str]]] # sphere "0" is list, others are dict
|
||||||
unreachables: Set[Location]
|
unreachables: Set[Location]
|
||||||
paths: Dict[str, List[Union[Tuple[str, str], Tuple[str, None]]]] # last step takes no further exits
|
paths: Dict[str, List[Union[Tuple[str, str], Tuple[str, None]]]] # last step takes no further exits
|
||||||
level: int
|
|
||||||
|
|
||||||
def __init__(self, multiworld: MultiWorld, level: int = 0) -> None:
|
def __init__(self, multiworld: MultiWorld) -> None:
|
||||||
self.multiworld = multiworld
|
self.multiworld = multiworld
|
||||||
self.hashes = {}
|
self.hashes = {}
|
||||||
self.entrances = {}
|
self.entrances = {}
|
||||||
self.playthrough = {}
|
self.playthrough = {}
|
||||||
self.unreachables = set()
|
self.unreachables = set()
|
||||||
self.paths = {}
|
self.paths = {}
|
||||||
self.level = level
|
|
||||||
|
|
||||||
def set_entrance(self, entrance: str, exit_: str, direction: str, player: int) -> None:
|
def set_entrance(self, entrance: str, exit_: str, direction: str, player: int) -> None:
|
||||||
if self.multiworld.players == 1:
|
if self.multiworld.players == 1:
|
||||||
@@ -1298,13 +1296,11 @@ class Spoiler:
|
|||||||
outfile.write('\n\nLocations:\n\n')
|
outfile.write('\n\nLocations:\n\n')
|
||||||
outfile.write('\n'.join(
|
outfile.write('\n'.join(
|
||||||
['%s: %s' % (location, item) for location, item in locations]))
|
['%s: %s' % (location, item) for location, item in locations]))
|
||||||
if self.level > 1:
|
|
||||||
outfile.write('\n\nPlaythrough:\n\n')
|
outfile.write('\n\nPlaythrough:\n\n')
|
||||||
outfile.write('\n'.join(['%s: {\n%s\n}' % (sphere_nr, '\n'.join(
|
outfile.write('\n'.join(['%s: {\n%s\n}' % (sphere_nr, '\n'.join(
|
||||||
[f" {location}: {item}" for (location, item) in sphere.items()] if isinstance(sphere, dict) else
|
[f" {location}: {item}" for (location, item) in sphere.items()] if isinstance(sphere, dict) else
|
||||||
[f" {item}" for item in sphere])) for (sphere_nr, sphere) in self.playthrough.items()]))
|
[f" {item}" for item in sphere])) for (sphere_nr, sphere) in self.playthrough.items()]))
|
||||||
else:
|
|
||||||
outfile.write('\n\nPlaythrough is disabled.\n\n')
|
|
||||||
if self.unreachables:
|
if self.unreachables:
|
||||||
outfile.write('\n\nUnreachable Items:\n\n')
|
outfile.write('\n\nUnreachable Items:\n\n')
|
||||||
outfile.write(
|
outfile.write(
|
||||||
|
|||||||
2
Main.py
2
Main.py
@@ -36,7 +36,7 @@ def main(args, seed=None, baked_server_options: Optional[Dict[str, object]] = No
|
|||||||
logger = logging.getLogger()
|
logger = logging.getLogger()
|
||||||
world.set_seed(seed, args.race, str(args.outputname) if args.outputname else None)
|
world.set_seed(seed, args.race, str(args.outputname) if args.outputname else None)
|
||||||
world.plando_options = args.plando_options
|
world.plando_options = args.plando_options
|
||||||
world.spoiler.level = args.spoiler
|
|
||||||
world.shuffle = args.shuffle.copy()
|
world.shuffle = args.shuffle.copy()
|
||||||
world.logic = args.logic.copy()
|
world.logic = args.logic.copy()
|
||||||
world.mode = args.mode.copy()
|
world.mode = args.mode.copy()
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
window.addEventListener('load', () => {
|
window.addEventListener('load', () => {
|
||||||
|
document.getElementById('js-enabled').style.display = 'block';
|
||||||
const gameHeaders = document.getElementsByClassName('collapse-toggle');
|
const gameHeaders = document.getElementsByClassName('collapse-toggle');
|
||||||
Array.from(gameHeaders).forEach((header) => {
|
Array.from(gameHeaders).forEach((header) => {
|
||||||
const gameName = header.getAttribute('data-game');
|
const gameName = header.getAttribute('data-game');
|
||||||
|
|||||||
@@ -24,6 +24,10 @@
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#games h2 .game-name{
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
#games p.collapsed{
|
#games p.collapsed{
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
@@ -51,3 +55,7 @@
|
|||||||
#games #page-controls button{
|
#games #page-controls button{
|
||||||
margin-left: 0.5rem;
|
margin-left: 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#games #js-enabled{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|||||||
@@ -12,17 +12,25 @@
|
|||||||
<div id="games" class="markdown">
|
<div id="games" class="markdown">
|
||||||
<h1>Currently Supported Games</h1>
|
<h1>Currently Supported Games</h1>
|
||||||
<div>
|
<div>
|
||||||
<label for="game-search">Search for your game below!</label><br />
|
<label for="game-search">
|
||||||
|
Search for your game below!
|
||||||
|
<noscript>(You need to enable Javascript for this to work.)</noscript>
|
||||||
|
</label><br />
|
||||||
<div id="page-controls">
|
<div id="page-controls">
|
||||||
<input id="game-search" placeholder="Search by title..." autofocus />
|
<input id="game-search" placeholder="Search by title..." autofocus />
|
||||||
<button id="expand-all">Expand All</button>
|
<button id="expand-all">Expand All</button>
|
||||||
<button id="collapse-all">Collapse All</button>
|
<button id="collapse-all">Collapse All</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- This is always written to the page, but is hidden by default. If the user has JS enabled,
|
||||||
|
it will be un-hidden immediately when the page is ready. -->
|
||||||
|
<div id="js-enabled">
|
||||||
{% for game_name in worlds | title_sorted %}
|
{% for game_name in worlds | title_sorted %}
|
||||||
{% set world = worlds[game_name] %}
|
{% set world = worlds[game_name] %}
|
||||||
<h2 class="collapse-toggle" data-game="{{ game_name }}">
|
<h2 class="collapse-toggle" data-game="{{ game_name }}">
|
||||||
<span id="{{ game_name }}-arrow" class="collapse-arrow">▶</span> {{ game_name }}
|
<span id="{{ game_name }}-arrow" class="collapse-arrow">▶</span>
|
||||||
|
<span class="game-name">{{ game_name }}</span>
|
||||||
</h2>
|
</h2>
|
||||||
<p id="{{ game_name }}" class="collapsed">
|
<p id="{{ game_name }}" class="collapsed">
|
||||||
{{ world.__doc__ | default("No description provided.", true) }}<br />
|
{{ world.__doc__ | default("No description provided.", true) }}<br />
|
||||||
@@ -44,5 +52,34 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</p>
|
</p>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- This is only printed when the user has JS disabled, allowing them to see all the information for
|
||||||
|
each game in a noscript-friendly way. -->
|
||||||
|
<noscript>
|
||||||
|
{% for game_name in worlds | title_sorted %}
|
||||||
|
{% set world = worlds[game_name] %}
|
||||||
|
<h2 class="collapse-toggle">{{ game_name }}</h2>
|
||||||
|
<p id="{{ game_name }}">
|
||||||
|
{{ world.__doc__ | default("No description provided.", true) }}<br />
|
||||||
|
<a href="{{ url_for("game_info", game=game_name, lang="en") }}">Game Page</a>
|
||||||
|
{% if world.web.tutorials %}
|
||||||
|
<span class="link-spacer">|</span>
|
||||||
|
<a href="{{ url_for("tutorial_landing") }}#{{ game_name }}">Setup Guides</a>
|
||||||
|
{% endif %}
|
||||||
|
{% if world.web.settings_page is string %}
|
||||||
|
<span class="link-spacer">|</span>
|
||||||
|
<a href="{{ world.web.settings_page }}">Settings Page</a>
|
||||||
|
{% elif world.web.settings_page %}
|
||||||
|
<span class="link-spacer">|</span>
|
||||||
|
<a href="{{ url_for("player_settings", game=game_name) }}">Settings Page</a>
|
||||||
|
{% endif %}
|
||||||
|
{% if world.web.bug_report_page %}
|
||||||
|
<span class="link-spacer">|</span>
|
||||||
|
<a href="{{ world.web.bug_report_page }}">Report a Bug</a>
|
||||||
|
{% endif %}
|
||||||
|
</p>
|
||||||
|
{% endfor %}
|
||||||
|
</noscript>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ use that version. These steps are for developers or platforms without compiled r
|
|||||||
|
|
||||||
What you'll need:
|
What you'll need:
|
||||||
* [Python 3.8.7 or newer](https://www.python.org/downloads/), not the Windows Store version
|
* [Python 3.8.7 or newer](https://www.python.org/downloads/), not the Windows Store version
|
||||||
* **Python 3.12 is currently unsupported**
|
* **Python 3.11 does not work currently**
|
||||||
* pip: included in downloads from python.org, separate in many Linux distributions
|
* pip: included in downloads from python.org, separate in many Linux distributions
|
||||||
* Matching C compiler
|
* Matching C compiler
|
||||||
* possibly optional, read operating system specific sections
|
* possibly optional, read operating system specific sections
|
||||||
@@ -30,7 +30,7 @@ After this, you should be able to run the programs.
|
|||||||
|
|
||||||
Recommended steps
|
Recommended steps
|
||||||
* Download and install a "Windows installer (64-bit)" from the [Python download page](https://www.python.org/downloads)
|
* Download and install a "Windows installer (64-bit)" from the [Python download page](https://www.python.org/downloads)
|
||||||
* **Python 3.12 is currently unsupported**
|
* **Python 3.11 does not work currently**
|
||||||
|
|
||||||
* **Optional**: Download and install Visual Studio Build Tools from
|
* **Optional**: Download and install Visual Studio Build Tools from
|
||||||
[Visual Studio Build Tools](https://visualstudio.microsoft.com/visual-cpp-build-tools/).
|
[Visual Studio Build Tools](https://visualstudio.microsoft.com/visual-cpp-build-tools/).
|
||||||
|
|||||||
@@ -13,6 +13,5 @@ ModuleUpdate.update_ran = True # don't upgrade
|
|||||||
|
|
||||||
import Utils
|
import Utils
|
||||||
|
|
||||||
file_path = pathlib.Path(__file__).parent.parent
|
Utils.local_path.cached_path = pathlib.Path(__file__).parent.parent
|
||||||
Utils.local_path.cached_path = file_path
|
|
||||||
Utils.user_path() # initialize cached_path
|
Utils.user_path() # initialize cached_path
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
def load_tests(loader, standard_tests, pattern):
|
def load_tests(loader, standard_tests, pattern):
|
||||||
import os
|
import os
|
||||||
import unittest
|
import unittest
|
||||||
from .. import file_path
|
from ..TestBase import file_path
|
||||||
from worlds.AutoWorld import AutoWorldRegister
|
from worlds.AutoWorld import AutoWorldRegister
|
||||||
|
|
||||||
suite = unittest.TestSuite()
|
suite = unittest.TestSuite()
|
||||||
|
|||||||
Reference in New Issue
Block a user