mirror of
https://github.com/ArchipelagoMW/Archipelago.git
synced 2026-03-17 13:03:47 -07:00
Compare commits
1 Commits
core_manif
...
webhost_bi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
efe48fb432 |
@@ -13,3 +13,7 @@
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.full-width {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ def stats():
|
||||
from worlds import network_data_package
|
||||
known_games = set(network_data_package["games"])
|
||||
plot = figure(title="Games Played Per Day", x_axis_type='datetime', x_axis_label="Date",
|
||||
y_axis_label="Games Played", sizing_mode="scale_both", width=PLOT_WIDTH, height=500)
|
||||
y_axis_label="Games Played", sizing_mode="scale_both", width=PLOT_WIDTH * 2, height=1000)
|
||||
|
||||
total_games, games_played = get_db_data(known_games)
|
||||
days = sorted(games_played)
|
||||
@@ -96,7 +96,7 @@ def stats():
|
||||
total = sum(total_games.values())
|
||||
pie = figure(title=f"Games Played in the Last 30 Days (Total: {total})", toolbar_location=None,
|
||||
tools="hover", tooltips=[("Game:", "@games"), ("Played:", "@count")],
|
||||
sizing_mode="scale_both", width=PLOT_WIDTH, height=500, x_range=(-0.5, 1.2))
|
||||
sizing_mode="scale_both", width=PLOT_WIDTH * 2, height=1000, x_range=(-0.5, 1.2))
|
||||
pie.axis.visible = False
|
||||
pie.xgrid.visible = False
|
||||
pie.ygrid.visible = False
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
<div id="charts-wrapper">
|
||||
{% for chart in charts %}
|
||||
<div class="chart-container">
|
||||
<div class="chart-container{% if loop.index0 < 2 %} full-width{% endif %}">
|
||||
{{ chart|indent(16)|safe }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
@@ -32,8 +32,6 @@ If the APWorld is a folder, the only required field is "game":
|
||||
There are also the following optional fields:
|
||||
* `minimum_ap_version` and `maximum_ap_version` - which if present will each be compared against the current
|
||||
Archipelago version respectively to filter those files from being loaded.
|
||||
* `platforms` - a list of strings indicating the `sys.platform`(s) the world can run on.
|
||||
If empty or not set, it is assumed to be any that python itself can run on.
|
||||
* `world_version` - an arbitrary version for that world in order to only load the newest valid world.
|
||||
An APWorld without a world_version is always treated as older than one with a version
|
||||
(**Must** use exactly the format `"major.minor.build"`, e.g. `1.0.0`)
|
||||
|
||||
1
setup.py
1
setup.py
@@ -409,7 +409,6 @@ class BuildExeCommand(cx_Freeze.command.build_exe.build_exe):
|
||||
apworld = APWorldContainer(str(zip_path))
|
||||
apworld.minimum_ap_version = version_tuple
|
||||
apworld.maximum_ap_version = version_tuple
|
||||
apworld.platforms = [sys.platform]
|
||||
apworld.game = worldtype.game
|
||||
manifest.update(apworld.get_manifest())
|
||||
apworld.manifest_path = f"{file_name}/archipelago.json"
|
||||
|
||||
@@ -353,8 +353,6 @@ class World(metaclass=AutoWorldRegister):
|
||||
"""path it was loaded from"""
|
||||
world_version: ClassVar[Version] = Version(0, 0, 0)
|
||||
"""Optional world version loaded from archipelago.json"""
|
||||
platforms: ClassVar[Optional[List[str]]] = None
|
||||
"""Optional platforms loaded from archipelago.json"""
|
||||
|
||||
def __init__(self, multiworld: "MultiWorld", player: int):
|
||||
assert multiworld is not None
|
||||
|
||||
@@ -197,7 +197,6 @@ class APWorldContainer(APContainer):
|
||||
world_version: "Version | None" = None
|
||||
minimum_ap_version: "Version | None" = None
|
||||
maximum_ap_version: "Version | None" = None
|
||||
platforms: Optional[List[str]] = None
|
||||
|
||||
def read_contents(self, opened_zipfile: zipfile.ZipFile) -> Dict[str, Any]:
|
||||
from Utils import tuplize_version
|
||||
@@ -206,7 +205,6 @@ class APWorldContainer(APContainer):
|
||||
for version_key in ("world_version", "minimum_ap_version", "maximum_ap_version"):
|
||||
if version_key in manifest:
|
||||
setattr(self, version_key, tuplize_version(manifest[version_key]))
|
||||
self.platforms = manifest.get("platforms")
|
||||
return manifest
|
||||
|
||||
def get_manifest(self) -> Dict[str, Any]:
|
||||
@@ -217,8 +215,6 @@ class APWorldContainer(APContainer):
|
||||
version = getattr(self, version_key)
|
||||
if version:
|
||||
manifest[version_key] = version.as_simple_string()
|
||||
if self.platforms:
|
||||
manifest["platforms"] = self.platforms
|
||||
return manifest
|
||||
|
||||
|
||||
|
||||
@@ -289,12 +289,6 @@ if not is_frozen():
|
||||
if not worldtype:
|
||||
logging.error(f"Requested APWorld \"{worldname}\" does not exist.")
|
||||
continue
|
||||
|
||||
assert worldtype.platforms != [], (
|
||||
f"World {worldname} has an empty list for platforms. "
|
||||
"Use None or omit the attribute for 'any platform'."
|
||||
)
|
||||
|
||||
file_name = os.path.split(os.path.dirname(worldtype.__file__))[1]
|
||||
world_directory = os.path.join("worlds", file_name)
|
||||
if os.path.isfile(os.path.join(world_directory, "archipelago.json")):
|
||||
|
||||
@@ -118,7 +118,6 @@ for world_source in world_sources:
|
||||
game = manifest.get("game")
|
||||
if game in AutoWorldRegister.world_types:
|
||||
AutoWorldRegister.world_types[game].world_version = tuplize_version(manifest.get("world_version", "0.0.0"))
|
||||
AutoWorldRegister.world_types[game].platforms = manifest.get("platforms")
|
||||
|
||||
if apworlds:
|
||||
# encapsulation for namespace / gc purposes
|
||||
@@ -166,11 +165,6 @@ if apworlds:
|
||||
f"Did not load {apworld_source.path} "
|
||||
f"as its maximum core version {apworld.maximum_ap_version} "
|
||||
f"is lower than current core version {version_tuple}.")
|
||||
elif apworld.platforms and sys.platform not in apworld.platforms:
|
||||
fail_world(apworld.game,
|
||||
f"Did not load {apworld_source.path} "
|
||||
f"as it is not compatible with current platform {sys.platform}. "
|
||||
f"Supported platforms: {', '.join(apworld.platforms)}")
|
||||
else:
|
||||
core_compatible.append((apworld_source, apworld))
|
||||
# load highest version first
|
||||
@@ -205,8 +199,6 @@ if apworlds:
|
||||
# world could fail to load at this point
|
||||
if apworld.world_version:
|
||||
AutoWorldRegister.world_types[apworld.game].world_version = apworld.world_version
|
||||
if apworld.platforms:
|
||||
AutoWorldRegister.world_types[apworld.game].platforms = apworld.platforms
|
||||
load_apworlds()
|
||||
del load_apworlds
|
||||
|
||||
|
||||
Reference in New Issue
Block a user