{"action":"created","comment":{"url":"https://api.github.com/repos/OpenRA/OpenRA/pulls/comments/24636910","id":24636910,"diff_hunk":"@@ -0,0 +1,419 @@\n+﻿#region Copyright & License Information\n+/*\n+ * Copyright 2007-2014 The OpenRA Developers (see AUTHORS)\n+ * This file is part of OpenRA, which is free software. It is made\n+ * available to you under the terms of the GNU General Public License\n+ * as published by the Free Software Foundation. For more information,\n+ * see COPYING.\n+ */\n+#endregion\n+\n+using System;\n+using System.Collections.Generic;\n+using System.Drawing;\n+using System.IO;\n+using System.Linq;\n+using OpenRA.Primitives;\n+\n+namespace OpenRA.Mods.D2k.UtilityCommands\n+{\n+\tclass D2kMapImporter\n+\t{\n+\t\tconst int MapCordonWidth = 4;\n+\n+\t\treadonly Dictionary<int, Pair<string, string>> actorDataByActorCode = new Dictionary<int, Pair<string, string>>\n+\t\t{\n+\t\t\t{ 20, Pair.New(\"wormspawner\", \"Creeps\") },\n+\t\t\t{ 23, Pair.New(\"mpspawn\", \"Neutral\") },\n+\t\t\t{ 41, Pair.New(\"spicebloom\", \"Neutral\") },\n+\t\t\t{ 42, Pair.New(\"spicebloom\", \"Neutral\") },\n+\t\t\t{ 43, Pair.New(\"spicebloom\", \"Neutral\") },\n+\t\t\t{ 44, Pair.New(\"spicebloom\", \"Neutral\") },\n+\t\t\t{ 45, Pair.New(\"spicebloom\", \"Neutral\") },\n+\n+\t\t\t// Atreides:\n+\t\t\t{ 4, Pair.New(\"WALLA\", \"Atreides\") },\n+\t\t\t{ 5, Pair.New(\"PWRA\", \"Atreides\") },\n+\t\t\t{ 8, Pair.New(\"CONYARDA\", \"Atreides\") },\n+\t\t\t{ 11, Pair.New(\"BARRA\", \"Atreides\") },\n+\t\t\t{ 14, Pair.New(\"REFA\", \"Atreides\") },\n+\t\t\t{ 17, Pair.New(\"RADARA\", \"Atreides\") },\n+\t\t\t{ 63, Pair.New(\"LIGHTA\", \"Atreides\") },\n+\t\t\t{ 69, Pair.New(\"SILOA\", \"Atreides\") },\n+\t\t\t{ 72, Pair.New(\"HEAVYA\", \"Atreides\") },\n+\t\t\t{ 75, Pair.New(\"REPAIRA\", \"Atreides\") },\n+\t\t\t{ 78, Pair.New(\"GUNTOWERA\", \"Atreides\") },\n+\t\t\t{ 120, Pair.New(\"HIGHTECHA\", \"Atreides\") },\n+\t\t\t{ 123, Pair.New(\"ROCKETTOWERA\", \"Atreides\") },\n+\t\t\t{ 126, Pair.New(\"RESEARCHA\", \"Atreides\") },\n+\t\t\t{ 129, Pair.New(\"STARPORTA\", \"Atreides\") },\n+\t\t\t{ 132, Pair.New(\"PALACEA\", \"Atreides\") },\n+\t\t\t{ 180, Pair.New(\"RIFLE\", \"Atreides\") },\n+\t\t\t{ 181, Pair.New(\"BAZOOKA\", \"Atreides\") },\n+\t\t\t{ 182, Pair.New(\"FREMEN\", \"Atreides\") },\n+\t\t\t{ 183, Pair.New(\"SARDAUKAR\", \"Atreides\") },           //// Atreides sardaukar\n+\t\t\t{ 184, Pair.New(\"ENGINEER\", \"Atreides\") },\n+\t\t\t{ 185, Pair.New(\"HARVESTER\", \"Atreides\") },\n+\t\t\t{ 186, Pair.New(\"MCVA\", \"Atreides\") },\n+\t\t\t{ 187, Pair.New(\"TRIKE\", \"Atreides\") },\n+\t\t\t{ 188, Pair.New(\"QUAD\", \"Atreides\") },\n+\t\t\t{ 189, Pair.New(\"COMBATA\", \"Atreides\") },\n+\t\t\t{ 190, Pair.New(\"MISSILETANK\", \"Atreides\") },\n+\t\t\t{ 191, Pair.New(\"SIEGETANK\", \"Atreides\") },\n+\t\t\t{ 192, Pair.New(\"CARRYALLA\", \"Atreides\") },\n+\t\t\t{ 194, Pair.New(\"SONICTANK\", \"Atreides\") },\n+\n+\t\t\t// Harkonnen:\n+\t\t\t{ 204, Pair.New(\"WALLH\", \"Harkonnen\") },              //// Harkonnen wall\n+\t\t\t{ 205, Pair.New(\"PWRH\", \"Harkonnen\") },               //// Harkonnen wind trap\n+\t\t\t{ 208, Pair.New(\"CONYARDH\", \"Harkonnen\") },           //// Harkonnen construction yard\n+\t\t\t{ 211, Pair.New(\"BARRH\", \"Harkonnen\") },              //// Harkonnen barracks\n+\t\t\t{ 214, Pair.New(\"REFH\", \"Harkonnen\") },               //// Harkonnen refinery\n+\t\t\t{ 217, Pair.New(\"RADARH\", \"Harkonnen\") },             //// Harkonnen outpost\n+\t\t\t{ 263, Pair.New(\"LIGHTH\", \"Harkonnen\") },             //// Harkonnen light factory\n+\t\t\t{ 269, Pair.New(\"SILOH\", \"Harkonnen\") },              //// Harkonnen silo\n+\t\t\t{ 272, Pair.New(\"HEAVYH\", \"Harkonnen\") },             //// Harkonnen heavy factory\n+\t\t\t{ 275, Pair.New(\"REPAIRH\", \"Harkonnen\") },            //// Harkonnen repair pad\n+\t\t\t{ 278, Pair.New(\"GUNTOWERH\", \"Harkonnen\") },          //// Harkonnen gun turret\n+\t\t\t{ 320, Pair.New(\"HIGHTECHH\", \"Harkonnen\") },          //// Harkonnen high tech factory\n+\t\t\t{ 323, Pair.New(\"ROCKETTOWERH\", \"Harkonnen\") },       //// Harkonnen rocket turret\n+\t\t\t{ 326, Pair.New(\"RESEARCHH\", \"Harkonnen\") },          //// Harkonnen Ix research center\n+\t\t\t{ 329, Pair.New(\"STARPORTH\", \"Harkonnen\") },          //// Harkonnen starport\n+\t\t\t{ 332, Pair.New(\"PALACEH\", \"Harkonnen\") },            //// Harkonnen palace\n+\t\t\t{ 360, Pair.New(\"RIFLE\", \"Harkonnen\") },              //// Harkonnen light infantry\n+\t\t\t{ 361, Pair.New(\"BAZOOKA\", \"Harkonnen\") },            //// Harkonnen trooper\n+\t\t\t{ 362, Pair.New(\"FREMEN\", \"Harkonnen\") },             //// Harkonnen fremen\n+\t\t\t{ 363, Pair.New(\"SARDAUKAR\", \"Harkonnen\") },          //// Harkonnen sardaukar\n+\t\t\t{ 364, Pair.New(\"ENGINEER\", \"Harkonnen\") },           //// Harkonnen engineer\n+\t\t\t{ 365, Pair.New(\"HARVESTER\", \"Harkonnen\") },          //// Harkonnen harvester\n+\t\t\t{ 366, Pair.New(\"MCVH\", \"Harkonnen\") },               //// Harkonnen MCV\n+\t\t\t{ 367, Pair.New(\"TRIKE\", \"Harkonnen\") },              //// Harkonnen trike\n+\t\t\t{ 368, Pair.New(\"QUAD\", \"Harkonnen\") },               //// Harkonnen quad\n+\t\t\t{ 369, Pair.New(\"COMBATH\", \"Harkonnen\") },            //// Harkonnen combat tank\n+\t\t\t{ 370, Pair.New(\"MISSILETANK\", \"Harkonnen\") },        //// Harkonnen missile tank\n+\t\t\t{ 371, Pair.New(\"SIEGETANK\", \"Harkonnen\") },          //// Harkonnen siege tank\n+\t\t\t{ 372, Pair.New(\"CARRYALLH\", \"Harkonnen\") },          //// Harkonnen carryall\n+\t\t\t{ 374, Pair.New(\"DEVAST\", \"Harkonnen\") },             //// Harkonnen devastator\n+\n+\t\t\t// Ordos:\n+\t\t\t{ 404, Pair.New(\"WALLO\", \"Ordos\") },                  //// Ordos wall\n+\t\t\t{ 405, Pair.New(\"PWRO\", \"Ordos\") },                   //// Ordos wind trap\n+\t\t\t{ 408, Pair.New(\"CONYARDO\", \"Ordos\") },               //// Ordos construction yard\n+\t\t\t{ 411, Pair.New(\"BARRO\", \"Ordos\") },                  //// Ordos barracks\n+\t\t\t{ 414, Pair.New(\"REFO\", \"Ordos\") },                   //// Ordos refinery\n+\t\t\t{ 417, Pair.New(\"RADARO\", \"Ordos\") },                 //// Ordos outpost\n+\t\t\t{ 463, Pair.New(\"LIGHTO\", \"Ordos\") },                 //// Ordos light factory\n+\t\t\t{ 469, Pair.New(\"SILOO\", \"Ordos\") },                  //// Ordos silo\n+\t\t\t{ 472, Pair.New(\"HEAVYO\", \"Ordos\") },                 //// Ordos heavy factory\n+\t\t\t{ 475, Pair.New(\"REPAIRO\", \"Ordos\") },                //// Ordos repair pad\n+\t\t\t{ 478, Pair.New(\"GUNTOWERO\", \"Ordos\") },              //// Ordos gun turret\n+\t\t\t{ 520, Pair.New(\"HIGHTECHO\", \"Ordos\") },              //// Ordos high tech factory\n+\t\t\t{ 523, Pair.New(\"ROCKETTOWERO\", \"Ordos\") },           //// Ordos rocket turret\n+\t\t\t{ 526, Pair.New(\"RESEARCHO\", \"Ordos\") },              //// Ordos Ix research center\n+\t\t\t{ 529, Pair.New(\"STARPORTO\", \"Ordos\") },              //// Ordos starport\n+\t\t\t{ 532, Pair.New(\"PALACEO\", \"Ordos\") },                //// Ordos palace\n+\t\t\t{ 560, Pair.New(\"RIFLE\", \"Ordos\") },                  //// Ordos light infantry\n+\t\t\t{ 561, Pair.New(\"BAZOOKA\", \"Ordos\") },                //// Ordos trooper\n+\t\t\t{ 562, Pair.New(\"SABOTEUR\", \"Ordos\") },               //// Ordos saboteur\n+\t\t\t{ 563, Pair.New(\"SARDAUKAR\", \"Ordos\") },              //// Ordos sardaukar\n+\t\t\t{ 564, Pair.New(\"ENGINEER\", \"Ordos\") },               //// Ordos engineer\n+\t\t\t{ 565, Pair.New(\"HARVESTER\", \"Ordos\") },              //// Ordos harvester\n+\t\t\t{ 566, Pair.New(\"MCVO\", \"Ordos\") },                   //// Ordos MCV\n+\t\t\t{ 567, Pair.New(\"RAIDER\", \"Ordos\") },                 //// Ordos raider\n+\t\t\t{ 568, Pair.New(\"QUAD\", \"Ordos\") },                   //// Ordos quad\n+\t\t\t{ 569, Pair.New(\"COMBATO\", \"Ordos\") },                //// Ordos combat tank\n+\t\t\t{ 570, Pair.New(\"MISSILETANK\", \"Ordos\") },            //// Ordos missile tank\n+\t\t\t{ 571, Pair.New(\"SIEGETANK\", \"Ordos\") },              //// Ordos siege tank\n+\t\t\t{ 572, Pair.New(\"CARRYALLO\", \"Ordos\") },              //// Ordos carryall\n+\t\t\t{ 574, Pair.New(\"DEVIATORTANK\", \"Ordos\") },           //// Ordos deviator\n+\n+\t\t\t// Corrino:\n+\t\t\t{ 580, Pair.New(\"WALLH\", \"Corrino\") },                //// Emperor wall\n+\t\t\t{ 581, Pair.New(\"PWRH\", \"Corrino\") },                 //// Emperor wind trap\n+\t\t\t{ 582, Pair.New(\"CONYARDC\", \"Corrino\") },             //// Emperor contruction yard\n+\t\t\t{ 583, Pair.New(\"BARRH\", \"Corrino\") },                //// Emperor barracks\n+\t\t\t{ 584, Pair.New(\"REFH\", \"Corrino\") },                 //// Emperor refinery\n+\t\t\t{ 585, Pair.New(\"RADARH\", \"Corrino\") },               //// Emperor outpost\n+\t\t\t{ 587, Pair.New(\"LIGHTH\", \"Corrino\") },               //// Emperor light factory\n+\t\t\t{ 588, Pair.New(\"PALACEC\", \"Corrino\") },              //// Emperor palace\n+\t\t\t{ 589, Pair.New(\"SILOH\", \"Corrino\") },                //// Emperor silo\n+\t\t\t{ 590, Pair.New(\"HEAVYC\", \"Corrino\") },               //// Emperor heavy factory\n+\t\t\t{ 591, Pair.New(\"REPAIRH\", \"Corrino\") },              //// Emperor repair pad\n+\t\t\t{ 592, Pair.New(\"GUNTOWERH\", \"Corrino\") },            //// Emperor gun turret\n+\t\t\t{ 593, Pair.New(\"HIGHTECHH\", \"Corrino\") },            //// Emperor high tech factory\n+\t\t\t{ 594, Pair.New(\"ROCKETTOWERH\", \"Corrino\") },         //// Emperor rocket turret\n+\t\t\t{ 595, Pair.New(\"RESEARCHH\", \"Corrino\") },            //// Emperor Ix research center\n+\t\t\t{ 596, Pair.New(\"STARPORTC\", \"Corrino\") },            //// Emperor starport\n+\t\t\t{ 597, Pair.New(\"SIETCH\", \"Corrino\") },               //// Emperor sietch\n+\t\t\t{ 598, Pair.New(\"RIFLE\", \"Corrino\") },                //// Emperor light infantry\n+\t\t\t{ 599, Pair.New(\"BAZOOKA\", \"Corrino\") },              //// Emperor trooper\n+\t\t\t{ 600, Pair.New(\"SARDAUKAR\", \"Corrino\") },            //// Emperor sardaukar\n+\t\t\t{ 601, Pair.New(\"FREMEN\", \"Corrino\") },               //// Emperor fremen\n+\t\t\t{ 602, Pair.New(\"ENGINEER\", \"Corrino\") },             //// Emperor engineer\n+\t\t\t{ 603, Pair.New(\"HARVESTER\", \"Corrino\") },            //// Emperor harvester\n+\t\t\t{ 604, Pair.New(\"MCVH\", \"Corrino\") },                 //// Emperor MCV\n+\t\t\t{ 605, Pair.New(\"TRIKE\", \"Corrino\") },                //// Emperor trike\n+\t\t\t{ 606, Pair.New(\"QUAD\", \"Corrino\") },                 //// Emperor quad\n+\t\t\t{ 607, Pair.New(\"COMBATH\", \"Corrino\") },              //// Emperor combat tank\n+\t\t\t{ 608, Pair.New(\"MISSILETANK\", \"Corrino\") },          //// Emperor missile tank\n+\t\t\t{ 609, Pair.New(\"SIEGETANK\", \"Corrino\") },            //// Emperor siege tank\n+\t\t\t{ 610, Pair.New(\"CARRYALLH\", \"Corrino\") },            //// Emperor carryall\n+\n+\t\t\t// Fremen:\n+\t\t\t{ 620, Pair.New(\"WALLA\", \"Fremen\") },                 //// Fremen wall\n+\t\t\t{ 621, Pair.New(\"PWRA\", \"Fremen\") },                  //// Fremen wind trap\n+\t\t\t{ 622, Pair.New(\"CONYARDA\", \"Fremen\") },              //// Fremen construction yard\n+\t\t\t{ 623, Pair.New(\"BARRA\", \"Fremen\") },                 //// Fremen barracks\n+\t\t\t{ 624, Pair.New(\"REFA\", \"Fremen\") },                  //// Fremen refinery\n+\t\t\t{ 625, Pair.New(\"RADARA\", \"Fremen\") },                //// Fremen outpost\n+\t\t\t{ 627, Pair.New(\"LIGHTA\", \"Fremen\") },                //// Fremen light factory\n+\t\t\t{ 628, Pair.New(\"PALACEC\", \"Fremen\") },               //// Imperial palace under Fremen control\n+\t\t\t{ 629, Pair.New(\"SILOA\", \"Fremen\") },                 //// Fremen silo\n+\t\t\t{ 630, Pair.New(\"HEAVYA\", \"Fremen\") },                //// Fremen heavy factory\n+\t\t\t{ 631, Pair.New(\"REPAIRA\", \"Fremen\") },               //// Fremen repair pad\n+\t\t\t{ 632, Pair.New(\"GUNTOWERA\", \"Fremen\") },             //// Fremen gun turret\n+\t\t\t{ 633, Pair.New(\"HIGHTECHA\", \"Fremen\") },             //// Fremen high tech factory\n+\t\t\t{ 634, Pair.New(\"ROCKETTOWERA\", \"Fremen\") },          //// Fremen rocket turret\n+\t\t\t{ 635, Pair.New(\"RESEARCHA\", \"Fremen\") },             //// Fremen Ix research center\n+\t\t\t{ 636, Pair.New(\"STARPORTA\", \"Fremen\") },             //// Fremen starport\n+\t\t\t{ 637, Pair.New(\"SIETCH\", \"Fremen\") },                //// Fremen sietch\n+\t\t\t{ 638, Pair.New(\"RIFLE\", \"Fremen\") },                 //// Fremen light infantry\n+\t\t\t{ 639, Pair.New(\"BAZOOKA\", \"Fremen\") },               //// Fremen trooper\n+\t\t\t{ 640, Pair.New(\"FREMEN\", \"Fremen\") },                //// Fremen fremen\n+\t\t\t////{ 641, Pair.New(\"\", \"Fremen\") },// Fremen fremen non-stealth\n+\t\t\t{ 642, Pair.New(\"ENGINEER\", \"Fremen\") },              //// Fremen engineer\n+\t\t\t{ 643, Pair.New(\"HARVESTER\", \"Fremen\") },             //// Fremen harvester\n+\t\t\t{ 644, Pair.New(\"MCVA\", \"Fremen\") },                  //// Fremen MCV\n+\t\t\t{ 645, Pair.New(\"TRIKE\", \"Fremen\") },                 //// Fremen trike\n+\t\t\t{ 646, Pair.New(\"QUAD\", \"Fremen\") },                  //// Fremen quad\n+\t\t\t{ 647, Pair.New(\"COMBATA\", \"Fremen\") },               //// Fremen combat tank\n+\t\t\t{ 648, Pair.New(\"MISSILETANK\", \"Fremen\") },           //// Fremen missile tank\n+\t\t\t{ 649, Pair.New(\"SIEGETANK\", \"Fremen\") },             //// Fremen siege tank\n+\t\t\t{ 650, Pair.New(\"CARRYALLA\", \"Fremen\") },             //// Fremen carryall\n+\t\t\t{ 652, Pair.New(\"SONICTANK\", \"Fremen\") },             //// Fremen sonic tank\n+\n+\t\t\t// Smugglers:\n+\t\t\t{ 660, Pair.New(\"WALLO\", \"Smugglers\") },              //// Smugglers wall\n+\t\t\t{ 661, Pair.New(\"PWRO\", \"Smugglers\") },               //// Smugglers wind trap\n+\t\t\t{ 662, Pair.New(\"CONYARDO\", \"Smugglers\") },           //// Smugglers construction yard\n+\t\t\t{ 663, Pair.New(\"BARRO\", \"Smugglers\") },              //// Smugglers barracks\n+\t\t\t{ 664, Pair.New(\"REFO\", \"Smugglers\") },               //// Smugglers refinery\n+\t\t\t{ 666, Pair.New(\"RADARO\", \"Smugglers\") },             //// Smugglers outpost\n+\t\t\t{ 667, Pair.New(\"LIGHTO\", \"Smugglers\") },             //// Smugglers light factory\n+\t\t\t{ 668, Pair.New(\"SILOO\", \"Smugglers\") },              //// Smugglers silo\n+\t\t\t{ 669, Pair.New(\"HEAVYO\", \"Smugglers\") },             //// Smugglers heavy factory\n+\t\t\t{ 670, Pair.New(\"REPAIRO\", \"Smugglers\") },            //// Smugglers repair pad\n+\t\t\t{ 671, Pair.New(\"GUNTOWERO\", \"Smugglers\") },          //// Smugglers gun turret\n+\t\t\t{ 672, Pair.New(\"HIGHTECHO\", \"Smugglers\") },          //// Smugglers high tech factory\n+\t\t\t{ 673, Pair.New(\"ROCKETTOWERO\", \"Smugglers\") },       //// Smugglers rocket turret\n+\t\t\t{ 674, Pair.New(\"RESEARCHO\", \"Smugglers\") },          //// Smugglers Ix research center\n+\t\t\t{ 675, Pair.New(\"STARPORTO\", \"Smugglers\") },          //// Smugglers starport\n+\t\t\t{ 676, Pair.New(\"PALACEO\", \"Smugglers\") },            //// Smugglers palace\n+\t\t\t{ 677, Pair.New(\"RIFLE\", \"Smugglers\") },              //// Smugglers light infantry\n+\t\t\t{ 678, Pair.New(\"BAZOOKA\", \"Smugglers\") },            //// Smugglers trooper\n+\t\t\t{ 679, Pair.New(\"SABOTEUR\", \"Smugglers\") },           //// Smugglers saboteur\n+\t\t\t{ 680, Pair.New(\"ENGINEER\", \"Smugglers\") },           //// Smugglers engineer\n+\t\t\t{ 681, Pair.New(\"HARVESTER\", \"Smugglers\") },          //// Smugglers harvester\n+\t\t\t{ 682, Pair.New(\"MCVO\", \"Smugglers\") },               //// Smugglers MCV\n+\t\t\t{ 683, Pair.New(\"TRIKE\", \"Smugglers\") },              //// Smugglers trike\n+\t\t\t{ 684, Pair.New(\"QUAD\", \"Smugglers\") },               //// Smugglers quad\n+\t\t\t{ 685, Pair.New(\"COMBATO\", \"Smugglers\") },            //// Smugglers combat tank\n+\t\t\t{ 686, Pair.New(\"MISSILETANK\", \"Smugglers\") },        //// Smugglers missile tank\n+\t\t\t{ 687, Pair.New(\"SIEGETANK\", \"Smugglers\") },          //// Smugglers siege tank\n+\t\t\t{ 688, Pair.New(\"CARRYALLO\", \"Smugglers\") },          //// Smugglers carryal\n+\n+\t\t\t// Mercenaries:\n+\t\t\t{ 700, Pair.New(\"WALLO\", \"Mercenaries\") },            //// Mercenary wall\n+\t\t\t{ 701, Pair.New(\"PWRO\", \"Mercenaries\") },             //// Mercenary wind trap\n+\t\t\t{ 702, Pair.New(\"CONYARDO\", \"Mercenaries\") },         //// Mercenary construction yard\n+\t\t\t{ 703, Pair.New(\"BARRO\", \"Mercenaries\") },            //// Mercenary barracks\n+\t\t\t{ 704, Pair.New(\"REFO\", \"Mercenaries\") },             //// Mercenary refinery\n+\t\t\t{ 705, Pair.New(\"RADARO\", \"Mercenaries\") },           //// Mercenary outpost\n+\t\t\t{ 707, Pair.New(\"LIGHTO\", \"Mercenaries\") },           //// Mercenary light factory\n+\t\t\t{ 708, Pair.New(\"SILOO\", \"Mercenaries\") },            //// Mercenary silo\n+\t\t\t{ 709, Pair.New(\"HEAVYO\", \"Mercenaries\") },           //// Mercenary heavy factory\n+\t\t\t{ 710, Pair.New(\"REPAIRO\", \"Mercenaries\") },          //// Mercenary repair pad\n+\t\t\t{ 711, Pair.New(\"GUNTOWERO\", \"Mercenaries\") },        //// Mercenary gun turret\n+\t\t\t{ 712, Pair.New(\"HIGHTECHO\", \"Mercenaries\") },        //// Mercenary high tech factory\n+\t\t\t{ 713, Pair.New(\"ROCKETTOWERO\", \"Mercenaries\") },     //// Mercenary rocket turret\n+\t\t\t{ 714, Pair.New(\"RESEARCHO\", \"Mercenaries\") },        //// Mercenary Ix research center\n+\t\t\t{ 715, Pair.New(\"STARPORTO\", \"Mercenaries\") },        //// Mercenary starport\n+\t\t\t{ 716, Pair.New(\"PALACEO\", \"Mercenaries\") },          //// Mercenary palace\n+\t\t\t{ 717, Pair.New(\"RIFLE\", \"Mercenaries\") },            //// Mercenary light inf.\n+\t\t\t{ 718, Pair.New(\"BAZOOKA\", \"Mercenaries\") },          //// Mercenary trooper\n+\t\t\t{ 719, Pair.New(\"SABOTEUR\", \"Mercenaries\") },         //// Mercenary saboteur\n+\t\t\t{ 720, Pair.New(\"HARVESTER\", \"Mercenaries\") },        //// Mercenary engineer\n+\t\t\t{ 721, Pair.New(\"HARVESTER\", \"Mercenaries\") },        //// Mercenary harvester\n+\t\t\t{ 722, Pair.New(\"MCVO\", \"Mercenaries\") },             //// Mercenary MCV\n+\t\t\t{ 723, Pair.New(\"TRIKE\", \"Mercenaries\") },            //// Mercenary trike\n+\t\t\t{ 724, Pair.New(\"QUAD\", \"Mercenaries\") },             //// Mercenary quad\n+\t\t\t{ 725, Pair.New(\"COMBATO\", \"Mercenaries\") },          //// Mercenary combat tank\n+\t\t\t{ 726, Pair.New(\"MISSILETANK\", \"Mercenaries\") },      //// Mercenary missile tank\n+\t\t\t{ 727, Pair.New(\"SIEGETANK\", \"Mercenaries\") },        //// Mercenary siege tank\n+\t\t\t{ 728, Pair.New(\"CARRYALLO\", \"Mercenaries\") },        //// Mercenary carryal\n+\t\t};\n+\n+\t\tMap map;\n+\t\tSize mapSize;\n+\t\tRuleset rules;\n+\t\tTileSet tileSet;\n+\t\tstring tilesetName;\n+\t\tFileStream stream;\n+\t\tList<TerrainTile> terrainTiles;\n+\t\tDictionary<int, int> specialValueForTileIndex;\n+\t\tList<TerrainTemplateInfo> tileSetsFromYaml;\n+\n+\t\tD2kMapImporter(string filename, string tileset, Ruleset rules)\n+\t\t{\n+\t\t\ttilesetName = tileset;\n+\t\t\tthis.rules = rules;\n+\n+\t\t\ttry\n+\t\t\t{\n+\t\t\t\tstream = File.OpenRead(filename);\n+\n+\t\t\t\tif (stream.Length == 0 || stream.Length % 4 != 0)\n+\t\t\t\t\tthrow new Exception(\"The map is in an unrecognized format!\");\n+\n+\t\t\t\tInitialize(filename);\n+\t\t\t\tLoadMapInfo();\n+\t\t\t\tFillMap();\n+\t\t\t}\n+\t\t\tcatch (Exception e)\n+\t\t\t{\n+\t\t\t\tConsole.WriteLine(e);\n+\t\t\t\tmap = null;\n+\t\t\t}\n+\t\t\tfinally\n+\t\t\t{\n+\t\t\t\tstream.Close();\n+\t\t\t}\n+\t\t}\n+\n+\t\tpublic static Map Import(string filename, string mod, string tileset, Ruleset rules)\n+\t\t{\n+\t\t\tvar map = new D2kMapImporter(filename, tileset, rules).map;\n+\t\t\tif (map == null)\n+\t\t\t\treturn null;\n+\n+\t\t\tmap.RequiresMod = mod;\n+\t\t\tmap.MakeDefaultPlayers();\n+\n+\t\t\t// TODO: Address FixOpenAreas crash","path":"OpenRA.Mods.D2k/UtilityCommands/D2kMapImporter.cs","position":302,"original_position":302,"commit_id":"c4017eb7d7a47863e13910890dcc650abf78d191","original_commit_id":"c4017eb7d7a47863e13910890dcc650abf78d191","user":{"login":"ScottNZ","id":1712619,"avatar_url":"https://avatars.githubusercontent.com/u/1712619?v=3","gravatar_id":"","url":"https://api.github.com/users/ScottNZ","html_url":"https://github.com/ScottNZ","followers_url":"https://api.github.com/users/ScottNZ/followers","following_url":"https://api.github.com/users/ScottNZ/following{/other_user}","gists_url":"https://api.github.com/users/ScottNZ/gists{/gist_id}","starred_url":"https://api.github.com/users/ScottNZ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ScottNZ/subscriptions","organizations_url":"https://api.github.com/users/ScottNZ/orgs","repos_url":"https://api.github.com/users/ScottNZ/repos","events_url":"https://api.github.com/users/ScottNZ/events{/privacy}","received_events_url":"https://api.github.com/users/ScottNZ/received_events","type":"User","site_admin":false},"body":"Notice that the terrain repeats on new blank maps in the editor. Fix Open Areas fixes that.","created_at":"2015-02-13T01:06:00Z","updated_at":"2015-02-13T01:06:00Z","html_url":"https://github.com/OpenRA/OpenRA/pull/7135#discussion_r24636910","pull_request_url":"https://api.github.com/repos/OpenRA/OpenRA/pulls/7135","_links":{"self":{"href":"https://api.github.com/repos/OpenRA/OpenRA/pulls/comments/24636910"},"html":{"href":"https://github.com/OpenRA/OpenRA/pull/7135#discussion_r24636910"},"pull_request":{"href":"https://api.github.com/repos/OpenRA/OpenRA/pulls/7135"}}},"pull_request":{"url":"https://api.github.com/repos/OpenRA/OpenRA/pulls/7135","id":26078989,"html_url":"https://github.com/OpenRA/OpenRA/pull/7135","diff_url":"https://github.com/OpenRA/OpenRA/pull/7135.diff","patch_url":"https://github.com/OpenRA/OpenRA/pull/7135.patch","issue_url":"https://api.github.com/repos/OpenRA/OpenRA/issues/7135","number":7135,"state":"open","locked":false,"title":"D2k: Add map importer","user":{"login":"penev92","id":7137365,"avatar_url":"https://avatars.githubusercontent.com/u/7137365?v=3","gravatar_id":"","url":"https://api.github.com/users/penev92","html_url":"https://github.com/penev92","followers_url":"https://api.github.com/users/penev92/followers","following_url":"https://api.github.com/users/penev92/following{/other_user}","gists_url":"https://api.github.com/users/penev92/gists{/gist_id}","starred_url":"https://api.github.com/users/penev92/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/penev92/subscriptions","organizations_url":"https://api.github.com/users/penev92/orgs","repos_url":"https://api.github.com/users/penev92/repos","events_url":"https://api.github.com/users/penev92/events{/privacy}","received_events_url":"https://api.github.com/users/penev92/received_events","type":"User","site_admin":false},"body":"This is my initial attempt to create a map importer for Dune 2000 .MAP files. (#4281)\r\nCurrent status:\r\n - Imports terrain\r\n - Imports resources (spice)\r\n - Imports actors (neutral, atreides and harkonnen; I will add the rest soon)\r\n\r\nIssues:\r\n - Missing tiles from arrakis.yaml tileset file  (#5875)\r\n - Currently cannot add player references for mission maps\r\n\r\nThis is 90% working with skirmish maps (from what I've seen), excluding 10% for the missing tiles.\r\nWhile this will import mission maps as well, the player reference issue does cause some problems there. This can be manually fixed in the `map.yaml` for now. I plan on fixing it properly when there is a Dune 2000 mission file reader implemented (#4280).","created_at":"2014-12-15T15:56:52Z","updated_at":"2015-02-13T01:06:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"962770b9f1e210af45ff99706b87bf5b59e1cc07","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/OpenRA/OpenRA/pulls/7135/commits","review_comments_url":"https://api.github.com/repos/OpenRA/OpenRA/pulls/7135/comments","review_comment_url":"https://api.github.com/repos/OpenRA/OpenRA/pulls/comments/{number}","comments_url":"https://api.github.com/repos/OpenRA/OpenRA/issues/7135/comments","statuses_url":"https://api.github.com/repos/OpenRA/OpenRA/statuses/c4017eb7d7a47863e13910890dcc650abf78d191","head":{"label":"penev92:bleed_d2kMapImporter","ref":"bleed_d2kMapImporter","sha":"c4017eb7d7a47863e13910890dcc650abf78d191","user":{"login":"penev92","id":7137365,"avatar_url":"https://avatars.githubusercontent.com/u/7137365?v=3","gravatar_id":"","url":"https://api.github.com/users/penev92","html_url":"https://github.com/penev92","followers_url":"https://api.github.com/users/penev92/followers","following_url":"https://api.github.com/users/penev92/following{/other_user}","gists_url":"https://api.github.com/users/penev92/gists{/gist_id}","starred_url":"https://api.github.com/users/penev92/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/penev92/subscriptions","organizations_url":"https://api.github.com/users/penev92/orgs","repos_url":"https://api.github.com/users/penev92/repos","events_url":"https://api.github.com/users/penev92/events{/privacy}","received_events_url":"https://api.github.com/users/penev92/received_events","type":"User","site_admin":false},"repo":{"id":24796059,"name":"OpenRA","full_name":"penev92/OpenRA","owner":{"login":"penev92","id":7137365,"avatar_url":"https://avatars.githubusercontent.com/u/7137365?v=3","gravatar_id":"","url":"https://api.github.com/users/penev92","html_url":"https://github.com/penev92","followers_url":"https://api.github.com/users/penev92/followers","following_url":"https://api.github.com/users/penev92/following{/other_user}","gists_url":"https://api.github.com/users/penev92/gists{/gist_id}","starred_url":"https://api.github.com/users/penev92/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/penev92/subscriptions","organizations_url":"https://api.github.com/users/penev92/orgs","repos_url":"https://api.github.com/users/penev92/repos","events_url":"https://api.github.com/users/penev92/events{/privacy}","received_events_url":"https://api.github.com/users/penev92/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/penev92/OpenRA","description":"An open-source implementation of the Command & Conquer: Red Alert engine using .NET/Mono and OpenGL. Runs on Windows, Linux and Mac OS X.","fork":true,"url":"https://api.github.com/repos/penev92/OpenRA","forks_url":"https://api.github.com/repos/penev92/OpenRA/forks","keys_url":"https://api.github.com/repos/penev92/OpenRA/keys{/key_id}","collaborators_url":"https://api.github.com/repos/penev92/OpenRA/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/penev92/OpenRA/teams","hooks_url":"https://api.github.com/repos/penev92/OpenRA/hooks","issue_events_url":"https://api.github.com/repos/penev92/OpenRA/issues/events{/number}","events_url":"https://api.github.com/repos/penev92/OpenRA/events","assignees_url":"https://api.github.com/repos/penev92/OpenRA/assignees{/user}","branches_url":"https://api.github.com/repos/penev92/OpenRA/branches{/branch}","tags_url":"https://api.github.com/repos/penev92/OpenRA/tags","blobs_url":"https://api.github.com/repos/penev92/OpenRA/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/penev92/OpenRA/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/penev92/OpenRA/git/refs{/sha}","trees_url":"https://api.github.com/repos/penev92/OpenRA/git/trees{/sha}","statuses_url":"https://api.github.com/repos/penev92/OpenRA/statuses/{sha}","languages_url":"https://api.github.com/repos/penev92/OpenRA/languages","stargazers_url":"https://api.github.com/repos/penev92/OpenRA/stargazers","contributors_url":"https://api.github.com/repos/penev92/OpenRA/contributors","subscribers_url":"https://api.github.com/repos/penev92/OpenRA/subscribers","subscription_url":"https://api.github.com/repos/penev92/OpenRA/subscription","commits_url":"https://api.github.com/repos/penev92/OpenRA/commits{/sha}","git_commits_url":"https://api.github.com/repos/penev92/OpenRA/git/commits{/sha}","comments_url":"https://api.github.com/repos/penev92/OpenRA/comments{/number}","issue_comment_url":"https://api.github.com/repos/penev92/OpenRA/issues/comments/{number}","contents_url":"https://api.github.com/repos/penev92/OpenRA/contents/{+path}","compare_url":"https://api.github.com/repos/penev92/OpenRA/compare/{base}...{head}","merges_url":"https://api.github.com/repos/penev92/OpenRA/merges","archive_url":"https://api.github.com/repos/penev92/OpenRA/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/penev92/OpenRA/downloads","issues_url":"https://api.github.com/repos/penev92/OpenRA/issues{/number}","pulls_url":"https://api.github.com/repos/penev92/OpenRA/pulls{/number}","milestones_url":"https://api.github.com/repos/penev92/OpenRA/milestones{/number}","notifications_url":"https://api.github.com/repos/penev92/OpenRA/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/penev92/OpenRA/labels{/name}","releases_url":"https://api.github.com/repos/penev92/OpenRA/releases{/id}","created_at":"2014-10-04T17:27:45Z","updated_at":"2014-10-05T20:15:38Z","pushed_at":"2015-02-12T18:06:05Z","git_url":"git://github.com/penev92/OpenRA.git","ssh_url":"git@github.com:penev92/OpenRA.git","clone_url":"https://github.com/penev92/OpenRA.git","svn_url":"https://github.com/penev92/OpenRA","homepage":"http://www.openra.net","size":85199,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"bleed"}},"base":{"label":"OpenRA:bleed","ref":"bleed","sha":"1eb6c984f583e4ca49714cef25b1d05dad3c6f34","user":{"login":"OpenRA","id":409046,"avatar_url":"https://avatars.githubusercontent.com/u/409046?v=3","gravatar_id":"","url":"https://api.github.com/users/OpenRA","html_url":"https://github.com/OpenRA","followers_url":"https://api.github.com/users/OpenRA/followers","following_url":"https://api.github.com/users/OpenRA/following{/other_user}","gists_url":"https://api.github.com/users/OpenRA/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenRA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenRA/subscriptions","organizations_url":"https://api.github.com/users/OpenRA/orgs","repos_url":"https://api.github.com/users/OpenRA/repos","events_url":"https://api.github.com/users/OpenRA/events{/privacy}","received_events_url":"https://api.github.com/users/OpenRA/received_events","type":"Organization","site_admin":false},"repo":{"id":959908,"name":"OpenRA","full_name":"OpenRA/OpenRA","owner":{"login":"OpenRA","id":409046,"avatar_url":"https://avatars.githubusercontent.com/u/409046?v=3","gravatar_id":"","url":"https://api.github.com/users/OpenRA","html_url":"https://github.com/OpenRA","followers_url":"https://api.github.com/users/OpenRA/followers","following_url":"https://api.github.com/users/OpenRA/following{/other_user}","gists_url":"https://api.github.com/users/OpenRA/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenRA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenRA/subscriptions","organizations_url":"https://api.github.com/users/OpenRA/orgs","repos_url":"https://api.github.com/users/OpenRA/repos","events_url":"https://api.github.com/users/OpenRA/events{/privacy}","received_events_url":"https://api.github.com/users/OpenRA/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OpenRA/OpenRA","description":"An open-source implementation of the Command & Conquer: Red Alert engine using .NET/Mono and OpenGL. Runs on Windows, Linux and Mac OS X.","fork":false,"url":"https://api.github.com/repos/OpenRA/OpenRA","forks_url":"https://api.github.com/repos/OpenRA/OpenRA/forks","keys_url":"https://api.github.com/repos/OpenRA/OpenRA/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OpenRA/OpenRA/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OpenRA/OpenRA/teams","hooks_url":"https://api.github.com/repos/OpenRA/OpenRA/hooks","issue_events_url":"https://api.github.com/repos/OpenRA/OpenRA/issues/events{/number}","events_url":"https://api.github.com/repos/OpenRA/OpenRA/events","assignees_url":"https://api.github.com/repos/OpenRA/OpenRA/assignees{/user}","branches_url":"https://api.github.com/repos/OpenRA/OpenRA/branches{/branch}","tags_url":"https://api.github.com/repos/OpenRA/OpenRA/tags","blobs_url":"https://api.github.com/repos/OpenRA/OpenRA/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OpenRA/OpenRA/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OpenRA/OpenRA/git/refs{/sha}","trees_url":"https://api.github.com/repos/OpenRA/OpenRA/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OpenRA/OpenRA/statuses/{sha}","languages_url":"https://api.github.com/repos/OpenRA/OpenRA/languages","stargazers_url":"https://api.github.com/repos/OpenRA/OpenRA/stargazers","contributors_url":"https://api.github.com/repos/OpenRA/OpenRA/contributors","subscribers_url":"https://api.github.com/repos/OpenRA/OpenRA/subscribers","subscription_url":"https://api.github.com/repos/OpenRA/OpenRA/subscription","commits_url":"https://api.github.com/repos/OpenRA/OpenRA/commits{/sha}","git_commits_url":"https://api.github.com/repos/OpenRA/OpenRA/git/commits{/sha}","comments_url":"https://api.github.com/repos/OpenRA/OpenRA/comments{/number}","issue_comment_url":"https://api.github.com/repos/OpenRA/OpenRA/issues/comments/{number}","contents_url":"https://api.github.com/repos/OpenRA/OpenRA/contents/{+path}","compare_url":"https://api.github.com/repos/OpenRA/OpenRA/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OpenRA/OpenRA/merges","archive_url":"https://api.github.com/repos/OpenRA/OpenRA/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OpenRA/OpenRA/downloads","issues_url":"https://api.github.com/repos/OpenRA/OpenRA/issues{/number}","pulls_url":"https://api.github.com/repos/OpenRA/OpenRA/pulls{/number}","milestones_url":"https://api.github.com/repos/OpenRA/OpenRA/milestones{/number}","notifications_url":"https://api.github.com/repos/OpenRA/OpenRA/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OpenRA/OpenRA/labels{/name}","releases_url":"https://api.github.com/repos/OpenRA/OpenRA/releases{/id}","created_at":"2010-10-04T07:38:05Z","updated_at":"2015-02-12T22:34:01Z","pushed_at":"2015-02-12T14:43:19Z","git_url":"git://github.com/OpenRA/OpenRA.git","ssh_url":"git@github.com:OpenRA/OpenRA.git","clone_url":"https://github.com/OpenRA/OpenRA.git","svn_url":"https://github.com/OpenRA/OpenRA","homepage":"http://www.openra.net","size":157923,"stargazers_count":1720,"watchers_count":1720,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":603,"mirror_url":null,"open_issues_count":700,"forks":603,"open_issues":700,"watchers":1720,"default_branch":"bleed"}},"_links":{"self":{"href":"https://api.github.com/repos/OpenRA/OpenRA/pulls/7135"},"html":{"href":"https://github.com/OpenRA/OpenRA/pull/7135"},"issue":{"href":"https://api.github.com/repos/OpenRA/OpenRA/issues/7135"},"comments":{"href":"https://api.github.com/repos/OpenRA/OpenRA/issues/7135/comments"},"review_comments":{"href":"https://api.github.com/repos/OpenRA/OpenRA/pulls/7135/comments"},"review_comment":{"href":"https://api.github.com/repos/OpenRA/OpenRA/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/OpenRA/OpenRA/pulls/7135/commits"},"statuses":{"href":"https://api.github.com/repos/OpenRA/OpenRA/statuses/c4017eb7d7a47863e13910890dcc650abf78d191"}}}}