Files
dockipelago/worlds/dk64/randomizer/Lists/LevelInfo.py
Jonathan Tinney 7971961166
Some checks failed
Analyze modified files / flake8 (push) Failing after 2m28s
Build / build-win (push) Has been cancelled
Build / build-ubuntu2204 (push) Has been cancelled
ctest / Test C++ ubuntu-latest (push) Has been cancelled
ctest / Test C++ windows-latest (push) Has been cancelled
Analyze modified files / mypy (push) Has been cancelled
Build and Publish Docker Images / Push Docker image to Docker Hub (push) Successful in 5m4s
Native Code Static Analysis / scan-build (push) Failing after 5m2s
type check / pyright (push) Successful in 1m7s
unittests / Test Python 3.11.2 ubuntu-latest (push) Failing after 16m23s
unittests / Test Python 3.12 ubuntu-latest (push) Failing after 28m19s
unittests / Test Python 3.13 ubuntu-latest (push) Failing after 14m49s
unittests / Test hosting with 3.13 on ubuntu-latest (push) Successful in 5m0s
unittests / Test Python 3.13 macos-latest (push) Has been cancelled
unittests / Test Python 3.11 windows-latest (push) Has been cancelled
unittests / Test Python 3.13 windows-latest (push) Has been cancelled
add schedule I, sonic 1/frontiers/heroes, spirit island
2026-04-02 23:46:36 -07:00

54 lines
2.1 KiB
Python

"""Stores information about levels, currently specifically used for assigning keys."""
from __future__ import annotations
from typing import TYPE_CHECKING
from randomizer.Enums.Items import Items
from randomizer.Enums.Levels import Levels
from randomizer.Enums.Locations import Locations
from randomizer.Enums.Transitions import Transitions
class LevelInfo:
"""Class which stores some information about levels."""
def __init__(self, TransitionTo: Transitions, TransitionFrom: Transitions, KeyLocation: Locations, KeyItem: Items) -> None:
"""Initialize with given parameters."""
self.TransitionTo = TransitionTo
self.TransitionsFrom = TransitionFrom
self.KeyLocation = KeyLocation
self.KeyItem = KeyItem
LevelInfoList = {
Levels.JungleJapes: LevelInfo(Transitions.IslesMainToJapesLobby, Transitions.IslesJapesLobbyToMain, Locations.JapesKey, Items.JungleJapesKey),
Levels.AngryAztec: LevelInfo(Transitions.IslesMainToAztecLobby, Transitions.IslesAztecLobbyToMain, Locations.AztecKey, Items.AngryAztecKey),
Levels.FranticFactory: LevelInfo(
Transitions.IslesMainToFactoryLobby,
Transitions.IslesFactoryLobbyToMain,
Locations.FactoryKey,
Items.FranticFactoryKey,
),
Levels.GloomyGalleon: LevelInfo(
Transitions.IslesMainToGalleonLobby,
Transitions.IslesGalleonLobbyToMain,
Locations.GalleonKey,
Items.GloomyGalleonKey,
),
Levels.FungiForest: LevelInfo(
Transitions.IslesMainToForestLobby,
Transitions.IslesForestLobbyToMain,
Locations.ForestKey,
Items.FungiForestKey,
),
Levels.CrystalCaves: LevelInfo(Transitions.IslesMainToCavesLobby, Transitions.IslesCavesLobbyToMain, Locations.CavesKey, Items.CrystalCavesKey),
Levels.CreepyCastle: LevelInfo(
Transitions.IslesMainToCastleLobby,
Transitions.IslesCastleLobbyToMain,
Locations.CastleKey,
Items.CreepyCastleKey,
),
Levels.HideoutHelm: LevelInfo(Transitions.IslesMainToHelmLobby, Transitions.IslesHelmLobbyToMain, Locations.HelmKey, Items.HideoutHelmKey),
}