diff options
Diffstat (limited to 'apworld/regions.py')
| -rw-r--r-- | apworld/regions.py | 7 |
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 | |||
| 4 | from BaseClasses import Region, ItemClassification, Entrance | 4 | from BaseClasses import Region, ItemClassification, Entrance |
| 5 | from entrance_rando import randomize_entrances | 5 | from entrance_rando import randomize_entrances |
| 6 | from .items import Lingo2Item | 6 | from .items import Lingo2Item |
| 7 | from .locations import Lingo2Location | 7 | from .locations import Lingo2Location, LetterPlacementType |
| 8 | from .options import FastTravelAccess | 8 | from .options import FastTravelAccess |
| 9 | from .player_logic import AccessRequirements | 9 | from .player_logic import AccessRequirements |
| 10 | from .rules import make_location_lambda | 10 | from .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(): |
