From 299ba7c4f7938dd8cbb38e51c11987b2ebe286c5 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sun, 17 Aug 2025 15:32:53 -0400 Subject: Fill the item pool with "Nothing"s --- apworld/__init__.py | 9 ++++++++- apworld/static_logic.py | 2 ++ data/ids.txtpb | 4 ++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/apworld/__init__.py b/apworld/__init__.py index 20c1454..07e3982 100644 --- a/apworld/__init__.py +++ b/apworld/__init__.py @@ -46,7 +46,14 @@ class Lingo2World(World): def create_items(self): pool = [self.create_item(name) for name in self.player_logic.real_items] + total_locations = sum(len(locs) for locs in self.player_logic.locations_by_room.values()) + + item_difference = total_locations - len(pool) + for i in range(0, item_difference): + pool.append(self.create_item("Nothing")) + self.multiworld.itempool += pool def create_item(self, name: str) -> Item: - return Lingo2Item(name, ItemClassification.progression, self.item_name_to_id.get(name), self.player) + return Lingo2Item(name, ItemClassification.filler if name == "Nothing" else ItemClassification.progression, + self.item_name_to_id.get(name), self.player) diff --git a/apworld/static_logic.py b/apworld/static_logic.py index 5414c91..9cd3ced 100644 --- a/apworld/static_logic.py +++ b/apworld/static_logic.py @@ -37,6 +37,8 @@ class Lingo2StaticLogic: location_name = f"{self.objects.maps[self.objects.rooms[mastery.room_id].map_id].name} - Mastery" self.location_id_to_name[mastery.ap_id] = location_name + self.item_id_to_name[self.objects.special_ids["Nothing"]] = "Nothing" + self.item_name_to_id = {name: ap_id for ap_id, name in self.item_id_to_name.items()} self.location_name_to_id = {name: ap_id for ap_id, name in self.location_id_to_name.items()} diff --git a/data/ids.txtpb b/data/ids.txtpb index 1fb6165..eb5786c 100644 --- a/data/ids.txtpb +++ b/data/ids.txtpb @@ -4854,6 +4854,10 @@ maps { } } } +special { + key: "Nothing" + value: 975 +} letters { key: "a1" value: 577 -- cgit 1.4.1