Example #1
0
        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);
        }
Example #2
0
        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);
        }
Example #3
0
        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;
        }