private static string SaveRoomSprite(Room room, ISprite roomSprite) { int x = roomSprite.Location.X - (int)room.Offset.X; int y = roomSprite.Location.Y - (int)room.Offset.Y; if (roomSprite is Wall wall && wall.CanBeBombed) { return("<Dungeon ObjectName=\"" + wall.ToBombedOpening().GetName() + "\" LocationX=\"" + x + "\" LocationY=\"" + y + "\" />?"); } return("<Dungeon ObjectName=\"" + roomSprite.ToDungeonEnum().GetName() + "\" LocationX=\"" + x + "\" LocationY=\"" + y + "\" />?"); }