Rename BridgeLayer to LegacyBridgeLayer.
This commit is contained in:
@@ -503,7 +503,7 @@
|
|||||||
<Compile Include="Traits\Valued.cs" />
|
<Compile Include="Traits\Valued.cs" />
|
||||||
<Compile Include="Traits\Voiced.cs" />
|
<Compile Include="Traits\Voiced.cs" />
|
||||||
<Compile Include="Traits\Wanders.cs" />
|
<Compile Include="Traits\Wanders.cs" />
|
||||||
<Compile Include="Traits\World\BridgeLayer.cs" />
|
<Compile Include="Traits\World\LegacyBridgeLayer.cs" />
|
||||||
<Compile Include="Traits\World\CrateSpawner.cs" />
|
<Compile Include="Traits\World\CrateSpawner.cs" />
|
||||||
<Compile Include="Traits\World\CreateMPPlayers.cs" />
|
<Compile Include="Traits\World\CreateMPPlayers.cs" />
|
||||||
<Compile Include="Traits\World\DomainIndex.cs" />
|
<Compile Include="Traits\World\DomainIndex.cs" />
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
return tileSet.GetTerrainIndex(new TerrainTile(template, (byte)index));
|
return tileSet.GetTerrainIndex(new TerrainTile(template, (byte)index));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void LinkNeighbouringBridges(World world, BridgeLayer bridges)
|
public void LinkNeighbouringBridges(World world, LegacyBridgeLayer bridges)
|
||||||
{
|
{
|
||||||
for (var d = 0; d <= 1; d++)
|
for (var d = 0; d <= 1; d++)
|
||||||
{
|
{
|
||||||
@@ -171,7 +171,7 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
}
|
}
|
||||||
|
|
||||||
public LegacyBridgeHut GetHut(int index) { return huts[index]; }
|
public LegacyBridgeHut GetHut(int index) { return huts[index]; }
|
||||||
public Bridge GetNeighbor(int[] offset, BridgeLayer bridges)
|
public Bridge GetNeighbor(int[] offset, LegacyBridgeLayer bridges)
|
||||||
{
|
{
|
||||||
if (offset == null)
|
if (offset == null)
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@@ -17,22 +17,22 @@ using OpenRA.Traits;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.Common.Traits
|
namespace OpenRA.Mods.Common.Traits
|
||||||
{
|
{
|
||||||
class BridgeLayerInfo : ITraitInfo
|
class LegacyBridgeLayerInfo : ITraitInfo
|
||||||
{
|
{
|
||||||
[ActorReference]
|
[ActorReference]
|
||||||
public readonly string[] Bridges = { "bridge1", "bridge2" };
|
public readonly string[] Bridges = { "bridge1", "bridge2" };
|
||||||
|
|
||||||
public object Create(ActorInitializer init) { return new BridgeLayer(init.Self, this); }
|
public object Create(ActorInitializer init) { return new LegacyBridgeLayer(init.Self, this); }
|
||||||
}
|
}
|
||||||
|
|
||||||
class BridgeLayer : IWorldLoaded
|
class LegacyBridgeLayer : IWorldLoaded
|
||||||
{
|
{
|
||||||
readonly BridgeLayerInfo info;
|
readonly LegacyBridgeLayerInfo info;
|
||||||
readonly Dictionary<ushort, Pair<string, int>> bridgeTypes = new Dictionary<ushort, Pair<string, int>>();
|
readonly Dictionary<ushort, Pair<string, int>> bridgeTypes = new Dictionary<ushort, Pair<string, int>>();
|
||||||
|
|
||||||
CellLayer<Bridge> bridges;
|
CellLayer<Bridge> bridges;
|
||||||
|
|
||||||
public BridgeLayer(Actor self, BridgeLayerInfo info)
|
public LegacyBridgeLayer(Actor self, LegacyBridgeLayerInfo info)
|
||||||
{
|
{
|
||||||
this.info = info;
|
this.info = info;
|
||||||
}
|
}
|
||||||
@@ -532,10 +532,14 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Reworking bridge logic
|
||||||
if (engineVersion < 20161210)
|
if (engineVersion < 20161210)
|
||||||
{
|
{
|
||||||
if (node.Key == "BridgeHut")
|
if (node.Key == "BridgeHut")
|
||||||
RenameNodeKey(node, "LegacyBridgeHut");
|
RenameNodeKey(node, "LegacyBridgeHut");
|
||||||
|
|
||||||
|
if (node.Key == "BridgeLayer")
|
||||||
|
RenameNodeKey(node, "LegacyBridgeLayer");
|
||||||
}
|
}
|
||||||
|
|
||||||
UpgradeActorRules(modData, engineVersion, ref node.Value.Nodes, node, depth + 1);
|
UpgradeActorRules(modData, engineVersion, ref node.Value.Nodes, node, depth + 1);
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ World:
|
|||||||
HelpCommand:
|
HelpCommand:
|
||||||
ScreenShaker:
|
ScreenShaker:
|
||||||
BuildingInfluence:
|
BuildingInfluence:
|
||||||
BridgeLayer:
|
LegacyBridgeLayer:
|
||||||
Bridges: bridge1, bridge2, bridge3, bridge4
|
Bridges: bridge1, bridge2, bridge3, bridge4
|
||||||
ProductionQueueFromSelection:
|
ProductionQueueFromSelection:
|
||||||
ProductionTabsWidget: PRODUCTION_TABS
|
ProductionTabsWidget: PRODUCTION_TABS
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ World:
|
|||||||
BuildingInfluence:
|
BuildingInfluence:
|
||||||
ProductionQueueFromSelection:
|
ProductionQueueFromSelection:
|
||||||
ProductionPaletteWidget: PRODUCTION_PALETTE
|
ProductionPaletteWidget: PRODUCTION_PALETTE
|
||||||
BridgeLayer:
|
LegacyBridgeLayer:
|
||||||
Bridges: bridge1, bridge2, br1, br2, br3, sbridge1, sbridge2, sbridge3, sbridge4
|
Bridges: bridge1, bridge2, br1, br2, br3, sbridge1, sbridge2, sbridge3, sbridge4
|
||||||
CustomTerrainDebugOverlay:
|
CustomTerrainDebugOverlay:
|
||||||
CrateSpawner:
|
CrateSpawner:
|
||||||
|
|||||||
Reference in New Issue
Block a user