Ejemplo n.º 1
0
        private void InvokeStackSizeChanged(GameInventory GameInventory)
        {
            Action <GameInventory> handler = StackSizeChanged;

            if (handler != null)
            {
                handler(GameInventory);
            }
        }
Ejemplo n.º 2
0
 private GameInventory(GameInventory other)
 {
     Type                    = other.Type;
     MaxStackSize            = other.MaxStackSize;
     BasePrice               = other.BasePrice;
     Category                = other.Category;
     StackSize               = other.StackSize;
     Locked                  = other.Locked;
     LocalizationName        = other.LocalizationName;
     LocalizationDescription = other.LocalizationDescription;
     claims                  = new List <InventoryClaim>();
 }
Ejemplo n.º 3
0
 private void ImportPrototypeSettings(int defaulMaxStackSize, float defaultBasePrice, string defaultCategory)
 {
     if (PrototypeManager.Inventory.Has(Type))
     {
         GameInventory prototype = PrototypeManager.Inventory.Get(Type);
         MaxStackSize            = prototype.MaxStackSize;
         BasePrice               = prototype.BasePrice;
         Category                = prototype.Category;
         LocalizationName        = prototype.LocalizationName;
         LocalizationDescription = prototype.LocalizationDescription;
     }
     else
     {
         MaxStackSize = defaulMaxStackSize;
         BasePrice    = defaultBasePrice;
         Category     = defaultCategory;
     }
 }
Ejemplo n.º 4
0
 public bool CanAccept(GameInventory inv)
 {
     return(inv.Type == Type && inv.StackSize + stackSize <= MaxStackSize);
 }