from typing import TYPE_CHECKING
from BaseClasses import Region
from .locations import Lingo2Location
if TYPE_CHECKING:
from . import Lingo2World
def create_region(room, world: "Lingo2World") -> Region:
new_region = Region(room.name, world.player, world.multiworld)
for location in world.player_logic.locations_by_room.get(room.id, {}):
new_location = Lingo2Location(world.player, world.static_logic.location_id_to_name[location.code],
location.code, new_region)
new_region.locations.append(new_location)
return new_region
def create_regions(world: "Lingo2World"):
regions = {
"Menu": Region("Menu", world.player, world.multiworld)
}
for room in world.static_logic.objects.rooms:
regions[room.name] = create_region(room, world)
world.multiworld.regions += regions.values()
lect name='h' onchange='this.form.submit();'>
blob: d2df0a48112fccfabbcbb228fa95d0de12a0c715 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
|
connections {
from_room: "Main Area"
to_room: "Side Area"
door { name: "Side Door" }
}
connections {
from_room: "Main Area"
to_room: "J Room"
door { name: "J Door" }
}
|