Files
dockipelago/worlds/cat_quest/locations.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

51 lines
1.3 KiB
Python

from __future__ import annotations
from typing import TYPE_CHECKING
from BaseClasses import Location
from . import items
from .locationData import questLocations, templeLocations, monumentLocations
if TYPE_CHECKING:
from .world import CatQuestWorld
ALL_LOCATIONS: list[Location] = questLocations + templeLocations + monumentLocations
def create_location_name_to_id() -> dict[str, int]:
location_id_dict = {}
current_id = 1
for location in ALL_LOCATIONS:
location_id_dict[location["name"]] = current_id
current_id += 1
return location_id_dict
LOCATION_NAME_TO_ID = create_location_name_to_id()
class CatQuestLocation(Location):
game = "Cat Quest"
def create_all_locations(world: CatQuestWorld) -> dict[int, str]:
create_regular_locations(world)
def create_regular_locations(world: CatQuestWorld) -> None:
Felingard = world.get_region("Felingard")
included_locations = []
included_locations.extend(questLocations)
if world.options.include_temples:
included_locations.extend(templeLocations)
if world.options.include_monuments:
included_locations.extend(monumentLocations)
for loc in included_locations:
Felingard.locations.append(
CatQuestLocation(world.player, loc["name"], LOCATION_NAME_TO_ID[loc["name"]], Felingard)
)