public CraftingDictinaryEntry(String name, int value, int weight, Listof_ResourceItem r1, int c1) { Name = name; Value = value; Weight = weight; ResourceCost.Add(r1, c1); }
public void RemoveResource(Listof_ResourceItem i, int amount) { if (Resources.ContainsKey(i)) { Resources[i] -= amount; if (Resources[i] <= 0) { Resources.Remove(i); } } }
public int ResourceCount(Listof_ResourceItem i) { if (Resources.ContainsKey(i)) { return(Resources[i]); } else { return(0); } }
//Resources public void AddResource(Listof_ResourceItem i, int amount) { if (Resources.ContainsKey(i)) { Resources[i] += amount; } else { Resources.Add(i, amount); } }