Infrastructure for removing Categories and UnitCategory. Also, changed defensive structures to be in the same build-queue as normal structures. (mod it if you don't like it)

This commit is contained in:
Bob
2010-01-14 14:13:49 +13:00
parent b1d04d5737
commit 73f6d5c71c
10 changed files with 240 additions and 228 deletions

View File

@@ -26,12 +26,11 @@ namespace RulesConverter
var categoryMap = new Dictionary<string,Pair<string,string>>
{
{ "VehicleTypes", Pair.New( "DefaultVehicle", "Vehicle" ) },
{ "ShipTypes", Pair.New( "DefaultShip", "Ship" ) },
{ "PlaneTypes", Pair.New( "DefaultPlane", "Plane" ) },
{ "DefenseTypes", Pair.New( "DefaultDefense", "Defense" ) },
{ "BuildingTypes", Pair.New( "DefaultBuilding", "Building" ) },
{ "InfantryTypes", Pair.New( "DefaultInfantry", "Infantry" ) },
{ "VehicleTypes", Pair.New( "^Vehicle", "Vehicle" ) },
{ "ShipTypes", Pair.New( "^Ship", "Ship" ) },
{ "PlaneTypes", Pair.New( "^Plane", "Plane" ) },
{ "BuildingTypes", Pair.New( "^Building", "Building" ) },
{ "InfantryTypes", Pair.New( "^Infantry", "Infantry" ) },
};
var traitMap = new Dictionary<string, PL>
@@ -173,6 +172,7 @@ namespace RulesConverter
var iniSection = rules.GetSection(item);
writer.WriteLine("{0}:", item);
writer.WriteLine("\tInherits: {0}", cat.Value.First);
writer.WriteLine("\tCategory: {0}", cat.Value.Second);
var traits = iniSection.GetValue("Traits", "")
.Split(new char[] { ',', ' ' }, StringSplitOptions.RemoveEmptyEntries).ToList();