about summary refs log tree commit diff stats
path: root/apworld/regions.py
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2026-02-07 13:24:58 -0500
committerStar Rauchenberger <fefferburbia@gmail.com>2026-02-07 13:24:58 -0500
commit3d03fcd82991d201f32a8313d4b44a4b17de4526 (patch)
treea489ab0fd1143c5734e5e7234279661a8992e38d /apworld/regions.py
parent1ff5dd9bb2199967bad531518a2d31e650ce107c (diff)
downloadlingo2-archipelago-3d03fcd82991d201f32a8313d4b44a4b17de4526.tar.gz
lingo2-archipelago-3d03fcd82991d201f32a8313d4b44a4b17de4526.tar.bz2
lingo2-archipelago-3d03fcd82991d201f32a8313d4b44a4b17de4526.zip
Add restrict_letter_placements option
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():