about summary refs log tree commit diff stats
path: root/apworld/regions.py
diff options
context:
space:
mode:
Diffstat (limited to 'apworld/regions.py')
-rw-r--r--apworld/regions.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/apworld/regions.py b/apworld/regions.py index 500139f..076c143 100644 --- a/apworld/regions.py +++ b/apworld/regions.py
@@ -4,7 +4,7 @@ import BaseClasses
4from BaseClasses import Region, ItemClassification, Entrance 4from BaseClasses import Region, ItemClassification, Entrance
5from entrance_rando import randomize_entrances 5from entrance_rando import randomize_entrances
6from .items import Lingo2Item 6from .items import Lingo2Item
7from .locations import Lingo2Location 7from .locations import Lingo2Location, LetterPlacementType
8from .options import FastTravelAccess 8from .options import FastTravelAccess
9from .player_logic import AccessRequirements 9from .player_logic import AccessRequirements
10from .rules import make_location_lambda 10from .rules import make_location_lambda
@@ -25,6 +25,11 @@ def create_locations(room, new_region: Region, world: "Lingo2World", regions: di
25 new_location = Lingo2Location(world.player, world.static_logic.location_id_to_name[location.code], 25 new_location = Lingo2Location(world.player, world.static_logic.location_id_to_name[location.code],
26 location.code, new_region) 26 location.code, new_region)
27 new_location.access_rule = make_location_lambda(reqs, world, regions) 27 new_location.access_rule = make_location_lambda(reqs, world, regions)
28 if world.options.restrict_letter_placements:
29 if location.is_letter:
30 new_location.set_up_letter_rule(LetterPlacementType.FORCE)
31 else:
32 new_location.set_up_letter_rule(LetterPlacementType.DISALLOW)
28 new_region.locations.append(new_location) 33 new_region.locations.append(new_location)
29 34
30 for event_name, item_name in world.player_logic.event_loc_item_by_room.get(room.id, {}).items(): 35 for event_name, item_name in world.player_logic.event_loc_item_by_room.get(room.id, {}).items():