public object Clone() { Map map = new Map(); map.AssetName = AssetName; map.baseLayer = BaseLayer.Clone() as int[]; foreach (MapEntry <Chest> chestEntry in chestEntries) { MapEntry <Chest> mapEntry = new MapEntry <Chest>(); mapEntry.Content = chestEntry.Content.Clone() as Chest; mapEntry.ContentName = chestEntry.ContentName; mapEntry.Count = chestEntry.Count; mapEntry.Direction = chestEntry.Direction; mapEntry.MapPosition = chestEntry.MapPosition; map.chestEntries.Add(mapEntry); } map.chestEntries.AddRange(ChestEntries); map.collisionLayer = CollisionLayer.Clone() as int[]; map.combatMusicCueName = CombatMusicCueName; map.combatTexture = CombatTexture; map.combatTextureName = CombatTextureName; map.fixedCombatEntries.AddRange(FixedCombatEntries); map.fringeLayer = FringeLayer.Clone() as int[]; map.innEntries.AddRange(InnEntries); map.mapDimensions = MapDimensions; map.musicCueName = MusicCueName; map.name = Name; map.objectLayer = ObjectLayer.Clone() as int[]; map.playerNpcEntries.AddRange(PlayerNpcEntries); map.portals.AddRange(Portals); map.portalEntries.AddRange(PortalEntries); map.questNpcEntries.AddRange(QuestNpcEntries); map.randomCombat = new RandomCombat(); map.randomCombat.CombatProbability = RandomCombat.CombatProbability; map.randomCombat.Entries.AddRange(RandomCombat.Entries); map.randomCombat.FleeProbability = RandomCombat.FleeProbability; map.randomCombat.MonsterCountRange = RandomCombat.MonsterCountRange; map.spawnMapPosition = SpawnMapPosition; map.storeEntries.AddRange(StoreEntries); map.texture = Texture; map.textureName = TextureName; map.tileSize = TileSize; map.tilesPerRow = tilesPerRow; return(map); }