public static ItemLocationMap Randomize(Seed seed, FillingMethod fillingMethod, GameSave saveGame, bool progressionOnly = false) { var unlockingMap = new ItemUnlockingMap(seed); var itemInfoProvider = new ItemInfoProvider(seed.Options, unlockingMap); ItemLocationRandomizer randomizer; switch (fillingMethod) { case FillingMethod.Forward: randomizer = new ForwardFillingItemLocationRandomizer(seed, itemInfoProvider, unlockingMap); break; case FillingMethod.Random: randomizer = new FullRandomItemLocationRandomizer(seed, itemInfoProvider, unlockingMap); break; case FillingMethod.Archipelago: randomizer = new ArchipelagoItemLocationRandomizer(seed, itemInfoProvider, unlockingMap, saveGame); break; default: throw new NotImplementedException($"filling method {fillingMethod} is not implemented"); } return(randomizer.GenerateItemLocationMap(progressionOnly)); }
public static ItemLocationMap Randomize(Seed seed, FillingMethod fillingMethod, bool progressionOnly = false) { var unlockingMap = new ItemUnlockingMap(seed); var itemInfoProvider = new ItemInfoProvider(seed.Options, unlockingMap); var itemLocations = new ItemLocationMap(itemInfoProvider, unlockingMap, seed.Options); switch (fillingMethod) { case FillingMethod.Forward: ForwardFillingItemLocationRandomizer.AddRandomItemsToLocationMap(seed, itemInfoProvider, unlockingMap, itemLocations, progressionOnly); break; case FillingMethod.Random: FullRandomItemLocationRandomizer.AddRandomItemsToLocationMap(seed, itemInfoProvider, unlockingMap, itemLocations, progressionOnly); break; default: throw new NotImplementedException($"filling method {fillingMethod} is not implemented"); } return(itemLocations); }
public ItemLocationMap(ItemInfoProvider itemInfoProvider, ItemUnlockingMap itemUnlockingMap, SeedOptions options) : base(CalculateCapacity(options), l => l.Key) { itemProvider = itemInfoProvider; unlockingMap = itemUnlockingMap; seedOptions = options; SetupGates(); AddPresentItemLocations(); AddPastItemLocations(); AddPyramidItemLocations(); if (options.DownloadableItems) { AddDownloadTerminals(); } if (options.StartWithTalaria) { PutTalariaIntoDummyLocation(itemInfoProvider); } }