Ejemplo n.º 1
0
 public ShopItemUseCase(
     IShopItemListRepository shopItemList,
     IItemDictionary itemDictionary)
 {
     _shopItemList   = shopItemList;
     _itemDictionary = itemDictionary;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="autoTracker">
 /// The autotracker data.
 /// </param>
 /// <param name="items">
 /// The item dictionary.
 /// </param>
 /// <param name="requirements">
 /// The requirement dictionary.
 /// </param>
 /// <param name="boolFactory">
 /// An Autofac factory creating address boolean autotrack values.
 /// </param>
 /// <param name="valueFactory">
 /// An Autofac factory creating address value autotrack values.
 /// </param>
 /// <param name="bitwiseIntegerFactory">
 /// An Autofac factory creating bitwise integer autotrack values.
 /// </param>
 /// <param name="conditionalFactory">
 /// An Autofac factory creating conditional autotrack values.
 /// </param>
 /// <param name="flagBoolFactory">
 /// An Autofac factory creating flag boolean autotrack values.
 /// </param>
 /// <param name="itemValueFactory">
 /// An Autofac factory creating item value autotrack values.
 /// </param>
 /// <param name="differenceFactory">
 /// An Autofac factory creating difference autotrack values.
 /// </param>
 /// <param name="overrideFactory">
 /// An Autofac factory creating override autotrack values.
 /// </param>
 /// <param name="sumFactory">
 /// An Autofac factory creating sum autotrack values.
 /// </param>
 /// <param name="staticValueFactory">
 /// An Autofac factory creating static autotrack values.
 /// </param>
 /// <param name="memoryFlagFactory">
 /// An Autofac factory creating memory flags.
 /// </param>
 public SectionAutoTrackingFactory(
     IAutoTracker autoTracker, IItemDictionary items, IRequirementDictionary requirements,
     AutoTrackAddressBool.Factory boolFactory, AutoTrackAddressValue.Factory valueFactory,
     AutoTrackBitwiseIntegerValue.Factory bitwiseIntegerFactory,
     AutoTrackConditionalValue.Factory conditionalFactory,
     AutoTrackFlagBool.Factory flagBoolFactory, AutoTrackItemValue.Factory itemValueFactory,
     AutoTrackMultipleDifference.Factory differenceFactory,
     AutoTrackMultipleOverride.Factory overrideFactory,
     AutoTrackMultipleSum.Factory sumFactory, AutoTrackStaticValue.Factory staticValueFactory,
     IMemoryFlag.Factory memoryFlagFactory)
 {
     _autoTracker           = autoTracker;
     _items                 = items;
     _requirements          = requirements;
     _boolFactory           = boolFactory;
     _valueFactory          = valueFactory;
     _bitwiseIntegerFactory = bitwiseIntegerFactory;
     _conditionalFactory    = conditionalFactory;
     _flagBoolFactory       = flagBoolFactory;
     _itemValueFactory      = itemValueFactory;
     _differenceFactory     = differenceFactory;
     _overrideFactory       = overrideFactory;
     _sumFactory            = sumFactory;
     _staticValueFactory    = staticValueFactory;
     _memoryFlagFactory     = memoryFlagFactory;
 }
Ejemplo n.º 3
0
        public MarkingImageFactory(
            IItemDictionary items, MarkingImageVM.Factory markingFactory,
            ItemMarkingImageVM.Factory itemMarkingFactory)
        {
            _items = items;

            _markingFactory     = markingFactory;
            _itemMarkingFactory = itemMarkingFactory;
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="items">
        /// The item dictionary.
        /// </param>
        /// <param name="prizes">
        /// The prize dictionary.
        /// </param>
        public CrystalRequirement(IItemDictionary items, IPrizeDictionary prizes)
        {
            _gtCrystal  = (ICrystalRequirementItem)items[ItemType.TowerCrystals];
            _crystal    = prizes[PrizeType.Crystal];
            _redCrystal = prizes[PrizeType.RedCrystal];

            _gtCrystal.PropertyChanged  += OnItemChanged;
            _crystal.PropertyChanged    += OnItemChanged;
            _redCrystal.PropertyChanged += OnItemChanged;

            UpdateValue();
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="mode">
        /// The mode settings.
        /// </param>
        /// <param name="items">
        /// The item dictionary.
        /// </param>
        /// <param name="item">
        /// The item of the requirement.
        /// </param>
        /// <param name="count">
        /// A 32-bit integer representing the number of the item required.
        /// </param>
        public SmallKeyRequirement(
            IMode mode, IItemDictionary items, IItem item, int count = 1)
        {
            _mode       = mode;
            _genericKey = items[ItemType.SmallKey];
            _item       = item;
            _count      = count;

            _mode.PropertyChanged       += OnModeChanged;
            _genericKey.PropertyChanged += OnItemChanged;
            _item.PropertyChanged       += OnItemChanged;

            UpdateValue();
        }
Ejemplo n.º 6
0
        public LargeItemVMFactory(
            IItemDictionary items, ILocationDictionary locations,
            LargeItemVM.Factory largeItemFactory, PrizeLargeItemVM.Factory prizeFactory,
            CrystalRequirementLargeItemVM.Factory crystalFactory,
            SmallKeyLargeItemVM.Factory smallKeyFactory, PairLargeItemVM.Factory pairFactory)
        {
            _items     = items;
            _locations = locations;

            _largeItemFactory = largeItemFactory;
            _prizeFactory     = prizeFactory;
            _crystalFactory   = crystalFactory;
            _smallKeyFactory  = smallKeyFactory;
            _pairFactory      = pairFactory;
        }
Ejemplo n.º 7
0
 /// <summary>
 /// Constructor
 /// </summary>
 public ResetManager(
     IAutoTracker autoTracker, IBossPlacementDictionary bossPlacements, IConnectionCollection connections,
     IDropdownDictionary dropdowns, IItemDictionary items, ILocationDictionary locations,
     IPinnedLocationCollection pinnedLocations, IPrizePlacementDictionary prizePlacements,
     IUndoRedoManager undoRedoManager)
 {
     _autoTracker     = autoTracker;
     _bossPlacements  = bossPlacements;
     _connections     = connections;
     _dropdowns       = dropdowns;
     _items           = items;
     _locations       = locations;
     _pinnedLocations = pinnedLocations;
     _prizePlacements = prizePlacements;
     _undoRedoManager = undoRedoManager;
 }
Ejemplo n.º 8
0
 public ReadOnlyItemDictionary(IItemDictionary <TKey, TValue> dictionary) : base(dictionary)
 {
 }
Ejemplo n.º 9
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="id">
        /// The ID of the location.
        /// </param>
        /// <param name="name">
        /// A string representing the name of the dungeon.
        /// </param>
        /// <param name="mapLocations">
        /// A list of map locations.
        /// </param>
        /// <param name="map">
        /// A 32-bit signed integer representing the number of maps in the dungeon.
        /// </param>
        /// <param name="compass">
        /// A 32-bit signed integer representing the number of compasses in the dungeon.
        /// </param>
        /// <param name="smallKeys">
        /// A 32-bit signed integer representing the number of small keys in the dungeon.
        /// </param>
        /// <param name="bigKey">
        /// A 32-bit signed integer representing the number of big keys in the dungeon.
        /// </param>
        /// <param name="mapItem">
        /// The map item.
        /// </param>
        /// <param name="compassItem">
        /// The compass item.
        /// </param>
        /// <param name="smallKeyItem">
        /// The small key item.
        /// </param>
        /// <param name="bigKeyItem">
        /// The big key item.
        /// </param>
        /// <param name="nodes">
        /// A list of dungeon node IDs within the dungeon.
        /// </param>
        /// <param name="items">
        /// A list of dungeon item IDs within the dungeon.
        /// </param>
        /// <param name="bosses">
        /// A list of dungeon item IDs for bosses within the dungeon.
        /// </param>
        /// <param name="smallKeyDoors">
        /// A list of small key door IDs within the dungeon.
        /// </param>
        /// <param name="bigKeyDoors">
        /// A list of big key door IDs within the dungeon.
        /// </param>
        /// <param name="entryNodes">
        /// A list of entry nodes for this dungeon.
        /// </param>
        public Dungeon(
            IItemDictionary items, IMode mode, IMutableDungeon.Factory mutableDungeonFactory,
            ILocationFactory locationFactory, IMapLocationFactory mapLocationFactory,
            ISectionFactory sectionFactory, IMarking.Factory markingFactory,
            ILocationNoteCollection notes, IDungeonFactory dungeonFactory,
            IKeyLayoutFactory keyDoorFactory, IDungeonState.Factory stateFactory, LocationID id)
            : base(locationFactory, mapLocationFactory, sectionFactory, markingFactory, notes, id)
        {
            _items = items;
            _mode  = mode;
            _mutableDungeonFactory = mutableDungeonFactory;
            _stateFactory          = stateFactory;

            Map       = dungeonFactory.GetDungeonMapCount(id);
            Compass   = dungeonFactory.GetDungeonCompassCount(id);
            SmallKeys = dungeonFactory.GetDungeonSmallKeyCount(id);
            BigKey    = dungeonFactory.GetDungeonBigKeyCount(id);

            MapItem      = dungeonFactory.GetDungeonMapItem(id);
            CompassItem  = dungeonFactory.GetDungeonCompassItem(id);
            SmallKeyItem = dungeonFactory.GetDungeonSmallKeyItem(id);
            BigKeyItem   = dungeonFactory.GetDungeonBigKeyItem(id);

            Nodes = dungeonFactory.GetDungeonNodes(id);

            DungeonItems = dungeonFactory.GetDungeonItems(id);
            Bosses       = dungeonFactory.GetDungeonBosses(id);

            SmallKeyDrops = dungeonFactory.GetDungeonSmallKeyDrops(id);
            BigKeyDrops   = dungeonFactory.GetDungeonBigKeyDrops(id);

            SmallKeyDoors = dungeonFactory.GetDungeonSmallKeyDoors(id);
            BigKeyDoors   = dungeonFactory.GetDungeonBigKeyDoors(id);

            KeyLayouts = keyDoorFactory.GetDungeonKeyLayouts(this);
            EntryNodes = dungeonFactory.GetDungeonEntryNodes(id);

            foreach (var section in Sections)
            {
                section.PropertyChanged += OnSectionChanged;
            }

            foreach (var node in EntryNodes)
            {
                node.ChangePropagated += OnNodeChangePropagated;
            }

            if (BigKeyItem != null)
            {
                BigKeyItem.PropertyChanged += OnItemChanged;
            }

            for (int i = 0; i < Environment.ProcessorCount; i++)
            {
                CreateDungeonData();
            }

            _mode.PropertyChanged += OnModeChanged;
            SubscribeToConnectionRequirements();
            UpdateSectionAccessibility();
        }