mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
@@ -9,12 +9,11 @@ from Fill import fill_restrictive
|
||||
from worlds.AutoWorld import WebWorld, World
|
||||
|
||||
from .Common import *
|
||||
from .Items import (DungeonItemData, DungeonItemType, LinksAwakeningItem,
|
||||
from .Items import (DungeonItemData, DungeonItemType, LinksAwakeningItem, TradeItemData,
|
||||
ladxr_item_to_la_item_name, links_awakening_items,
|
||||
links_awakening_items_by_name)
|
||||
from .LADXR import generator
|
||||
from .LADXR.itempool import ItemPool as LADXRItemPool
|
||||
from .LADXR.locations.tradeSequence import TradeSequenceItem
|
||||
from .LADXR.logic import Logic as LAXDRLogic
|
||||
from .LADXR.main import get_parser
|
||||
from .LADXR.settings import Settings as LADXRSettings
|
||||
@@ -23,7 +22,8 @@ from .LADXR.locations.instrument import Instrument
|
||||
from .LADXR.locations.constants import CHEST_ITEMS
|
||||
from .Locations import (LinksAwakeningLocation, LinksAwakeningRegion,
|
||||
create_regions_from_ladxr, get_locations_to_id)
|
||||
from .Options import links_awakening_options
|
||||
from .Options import links_awakening_options, DungeonItemShuffle
|
||||
|
||||
from .Rom import LADXDeltaPatch
|
||||
|
||||
DEVELOPER_MODE = False
|
||||
@@ -140,12 +140,10 @@ class LinksAwakeningWorld(World):
|
||||
def create_items(self) -> None:
|
||||
exclude = [item.name for item in self.multiworld.precollected_items[self.player]]
|
||||
|
||||
self.trade_items = []
|
||||
|
||||
dungeon_item_types = {
|
||||
|
||||
}
|
||||
from .Options import DungeonItemShuffle
|
||||
|
||||
self.prefill_original_dungeon = [ [], [], [], [], [], [], [], [], [] ]
|
||||
self.prefill_own_dungeons = []
|
||||
# For any and different world, set item rule instead
|
||||
@@ -183,8 +181,9 @@ class LinksAwakeningWorld(World):
|
||||
else:
|
||||
item = self.create_item(item_name)
|
||||
|
||||
if not self.multiworld.tradequest[self.player] and ladx_item_name.startswith("TRADING_"):
|
||||
self.trade_items.append(item)
|
||||
if not self.multiworld.tradequest[self.player] and isinstance(item.item_data, TradeItemData):
|
||||
location = self.multiworld.get_location(item.item_data.vanilla_location, self.player)
|
||||
location.place_locked_item(item)
|
||||
continue
|
||||
if isinstance(item.item_data, DungeonItemData):
|
||||
if item.item_data.dungeon_item_type == DungeonItemType.INSTRUMENT:
|
||||
@@ -218,7 +217,6 @@ class LinksAwakeningWorld(World):
|
||||
else:
|
||||
self.multiworld.itempool.append(item)
|
||||
|
||||
def pre_fill(self):
|
||||
self.multi_key = self.generate_multi_key()
|
||||
|
||||
dungeon_locations = []
|
||||
@@ -261,18 +259,6 @@ class LinksAwakeningWorld(World):
|
||||
# Properly fill locations within dungeon
|
||||
location.dungeon = r.dungeon_index
|
||||
|
||||
# Tell the filler that if we're placing a dungeon item, restrict it to the dungeon the item associates with
|
||||
# This will need changed once keysanity is implemented
|
||||
#orig_rule = location.item_rule
|
||||
#location.item_rule = lambda item, orig_rule=orig_rule: \
|
||||
# (not isinstance(item, DungeonItemData) or item.dungeon_index == location.dungeon) and orig_rule(item)
|
||||
|
||||
for location in r.locations:
|
||||
# If tradequests are disabled, place trade items directly in their proper location
|
||||
if not self.multiworld.tradequest[self.player] and isinstance(location, LinksAwakeningLocation) and isinstance(location.ladxr_item, TradeSequenceItem):
|
||||
item = next(i for i in self.trade_items if i.item_data.ladxr_id == location.ladxr_item.default_item)
|
||||
location.place_locked_item(item)
|
||||
|
||||
for dungeon_index in range(0, 9):
|
||||
locs = dungeon_locations_by_dungeon[dungeon_index]
|
||||
locs = [loc for loc in locs if not loc.item]
|
||||
|
||||
Reference in New Issue
Block a user