diff --git a/OpenRa.Game/Bridges.cs b/OpenRa.Game/Bridges.cs index dd53c32d51..fda09d3db5 100644 --- a/OpenRa.Game/Bridges.cs +++ b/OpenRa.Game/Bridges.cs @@ -42,7 +42,7 @@ namespace OpenRa // stash it replacedTiles[new int2(x, y)] = w.Map.MapTiles[x, y].image; // remove the tile from the actual map - w.Map.MapTiles[x, y].tile = 0xff; + w.Map.MapTiles[x, y].tile = 0xfffe; w.Map.MapTiles[x, y].image = 0; } } diff --git a/OpenRa.Game/Graphics/Minimap.cs b/OpenRa.Game/Graphics/Minimap.cs index b985b77f07..023101aa6d 100644 --- a/OpenRa.Game/Graphics/Minimap.cs +++ b/OpenRa.Game/Graphics/Minimap.cs @@ -49,7 +49,7 @@ namespace OpenRa.Graphics if (terrainTypeColors == null) { var pal = new Palette(FileSystem.Open(Game.world.Map.Theater + ".pal")); - terrainTypeColors = new[] {theater.ToLowerInvariant() == "snow" ? 0xe3 :0x1a, 0x63, 0x2f, 0x1f, 0x14, 0x64, 0x1f, 0x68, 0x6b, 0x6d } + terrainTypeColors = new[] {theater.ToLowerInvariant() == "snow" ? 0xe3 :0x1a, 0x63, 0x2f, 0x1f, 0x14, 0x64, 0x1f, 0x68, 0x6b, 0x6d, 0x67 } .Select( a => Color.FromArgb(alpha, pal.GetColor(a) )).ToArray(); playerColors = Util.MakeArray( 8, b => Color.FromArgb(alpha, Chat.paletteColors[b]) ); diff --git a/OpenRa.Game/TerrainCosts.cs b/OpenRa.Game/TerrainCosts.cs index a1cddc3b73..b074d47a8f 100644 --- a/OpenRa.Game/TerrainCosts.cs +++ b/OpenRa.Game/TerrainCosts.cs @@ -23,16 +23,17 @@ namespace OpenRa Wall = 7, Beach = 8, Ore = 9, + Special = 10, } static class TerrainCosts { static double[][] costs = Util.MakeArray( 4, - a => Util.MakeArray( 10, b => double.PositiveInfinity )); + a => Util.MakeArray( 11, b => double.PositiveInfinity )); static TerrainCosts() { - for( int i = 0 ; i < 10 ; i++ ) + for( int i = 0 ; i < 11 ; i++ ) { if( i == 4 ) continue; var section = Rules.AllRules.GetSection( ( (TerrainMovementType)i ).ToString() ); @@ -46,6 +47,7 @@ namespace OpenRa public static double Cost( UnitMovementType unitMovementType, int r ) { + if (r >= 10) return 1.0; return costs[ (byte)unitMovementType ][ r ]; } } diff --git a/OpenRa.Game/Traits/Production.cs b/OpenRa.Game/Traits/Production.cs index 30b1514467..5562c043e5 100755 --- a/OpenRa.Game/Traits/Production.cs +++ b/OpenRa.Game/Traits/Production.cs @@ -9,7 +9,7 @@ namespace OpenRa.Traits public readonly int[] SpawnOffset = null; public readonly string[] Produces = { }; - public object Create(Actor self) { return new Production(self); } + public virtual object Create(Actor self) { return new Production(self); } } class Production : IIssueOrder, IResolveOrder, IProducer, ITags diff --git a/OpenRa.Game/Traits/ProductionSurround.cs b/OpenRa.Game/Traits/ProductionSurround.cs index 9abb584492..aeca50ad11 100644 --- a/OpenRa.Game/Traits/ProductionSurround.cs +++ b/OpenRa.Game/Traits/ProductionSurround.cs @@ -3,9 +3,9 @@ using OpenRa.GameRules; namespace OpenRa.Traits { - class ProductionSurroundInfo : ITraitInfo + class ProductionSurroundInfo : ProductionInfo { - public object Create(Actor self) { return new ProductionSurround(self); } + public override object Create(Actor self) { return new ProductionSurround(self); } } class ProductionSurround : Production diff --git a/RulesConverter/Program.cs b/RulesConverter/Program.cs index 9bfef9e0a9..40b5bbe649 100644 --- a/RulesConverter/Program.cs +++ b/RulesConverter/Program.cs @@ -138,6 +138,10 @@ namespace RulesConverter { "Produces", "Produces" } } }, + { "ProductionSurround", new PL { + { "Produces", "Produces" } } + }, + { "Minelayer", new PL { { "Mine", "Primary" } } }, diff --git a/bogus.tem b/bogus.tem new file mode 100644 index 0000000000..bc2b351f54 Binary files /dev/null and b/bogus.tem differ diff --git a/ra.yaml b/ra.yaml index 5c153858d1..bcdc69117f 100644 --- a/ra.yaml +++ b/ra.yaml @@ -999,6 +999,7 @@ SYRD: Sight: 4 RenderBuilding: ProductionSurround: + Produces: Ship IronCurtainable: SPEN: @@ -1023,6 +1024,7 @@ SPEN: Sight: 4 RenderBuilding: ProductionSurround: + Produces: Ship IronCurtainable: FACT: diff --git a/templates.ini b/templates.ini index b06455bb34..023e01336a 100644 --- a/templates.ini +++ b/templates.ini @@ -2822,3 +2822,9 @@ tiletype18=2 tiletype19=2 tiletype23=2 tiletype24=2 + +[TEM65534] +Name=Bogus +width=1 +height=1 +tiletype0=10 \ No newline at end of file diff --git a/tileSet.til b/tileSet.til index aaf2fc11b7..39ed4bac67 100644 --- a/tileSet.til +++ b/tileSet.til @@ -304,3 +304,8 @@ gflr{0:0000} 0118 gstr{0:0000} +; bogus +TS- +1 +fffe +bogus \ No newline at end of file