public override void OnInitialize()
 {
     _vanillaItemSlot = new VanillaItemSlotWrapper(ItemSlot.Context.PrefixItem, 0.85f)
     {
         Left          = { Pixels = 50 },
         Top           = { Pixels = 270 },
         ValidItemFunc = item => item.IsAir || !item.IsAir
     };
     // Here we limit the items that can be placed in the slot. We are fine with placing an empty item in or a non-empty item that can be prefixed. Calling Prefix(-3) is the way to know if the item in question can take a prefix or not.
     Append(_vanillaItemSlot);
 }
示例#2
0
        public override void OnInitialize()
        {
            itemSlot = new VanillaItemSlotWrapper(ItemSlot.Context.TrashItem, 0.85f)
            {
                Left          = { Pixels = 50 },
                Top           = { Pixels = 270 },
                ValidItemFunc = item => item.IsAir || !item.IsAir && item.Name.Contains("Music Box")
            };

            Append(itemSlot);
        }