示例#1
0
        /// <summary>
        /// Create a new general purpose inventory
        /// </summary>
        /// <param name="quantitySlots"></param>
        /// <param name="invId"></param>
        /// <param name="api"></param>
        /// <param name="onNewSlot"></param>
        public InventoryGeneric(int quantitySlots, string invId, ICoreAPI api, NewSlotDelegate onNewSlot = null) : base(invId, api)
        {
            OnGetSuitability = (s, t, isMerge) => isMerge ? (baseWeight + 3) : (baseWeight + 1);

            this.onNewSlot = onNewSlot;

            slots = GenEmptySlots(quantitySlots);
        }
示例#2
0
 public InventoryDisplayed(BlockEntity be, int quantitySlots, string invId, ICoreAPI api, NewSlotDelegate onNewSlot = null) : base(quantitySlots, invId, api, onNewSlot)
 {
     this.container = be;
 }