public Inventory CreatePlayerInventory() { Inventory newInventory = InventorySystem.CreateNewInventoryBasedOn(defaultPlayerInventoryTemplate, InventoryItemWasChanged); newInventory.RegisterUISlot(UIRodSlotComponent); newInventory.RegisterUISlot(UIBaitSlotComponent); newInventory.EquipRod(new FishingRod(startFishingRod)); newInventory.EquipBait(new FishingBait(startFishingBait)); UIBackPackComponent.SetLocalPlayerInventory(newInventory); return(newInventory); }
public void InitializeHut(InventorySystem inventorySystem) { this._inventorySystem = inventorySystem; SetHutInventory(InventorySystem.CreateNewInventoryBasedOn(defaultHutInventory, InventoryItemWasChanged)); _weighingInventory.InstantiateWeighingSlots(_hutInventory, OnBackpackItemDroppedOn); }