Fixed an issue when you take no items into a game

This commit is contained in:
2022-02-02 13:10:42 -06:00
parent cc3bd3d706
commit 651bc24abf
3 changed files with 6 additions and 3 deletions

View File

@@ -1,3 +1,4 @@
using System;
using System.Collections;
using System.Collections.Generic;
using MLAPI;
@@ -68,6 +69,8 @@ public class PlayerInventory : NetworkBehaviour
//Equips All items in list at start of next scene
public void UpdateEquips(List<string> items, Dictionary<string, Item> allItems){
if (items.Count <= 0) { return; }
foreach(string itemName in items){
AddItem(allItems[itemName]);
}