public InventoryHash Clone() { InventoryHash output = new InventoryHash(); foreach (string key in innerHash.Keys) { output.Add(key); List <Thing> things = (List <Thing>)innerHash[key]; foreach (Thing thing in things) { Thing newThing = thing.Clone(); output[key].Add(newThing); } } return(output); }
public InventoryHash Clone() { InventoryHash output = new InventoryHash(); foreach (Inventory inventory in this.InnerHash.Keys) { output.Add(inventory.Name); List <Thing> things = (List <Thing>) this.InnerHash[inventory]; foreach (Thing thing in things) { Thing newThing = thing.Clone(); output[inventory.Name].Add(newThing); } } return(output); }
public InventoryHash Clone() { InventoryHash output = new InventoryHash(); foreach (string key in innerHash.Keys) { output.Add(key); List<Thing> things = (List<Thing>)innerHash[key]; foreach (Thing thing in things) { Thing newThing = thing.Clone(); output[key].Add(newThing); } } return output; }