Merge pull request #11441 from Mailaender/lowbridges

Added static Tiberian Sun low bridges
This commit is contained in:
abcdefg30
2016-08-29 20:53:04 +02:00
committed by GitHub
17 changed files with 1521 additions and 641 deletions

View File

@@ -50,6 +50,13 @@ namespace OpenRA.Mods.Common.Traits
yield return tile + position;
}
public static IEnumerable<CPos> PathableTiles(string name, BuildingInfo buildingInfo, CPos position)
{
var footprint = buildingInfo.Footprint.Where(x => !char.IsWhiteSpace(x)).ToArray();
foreach (var tile in TilesWhere(name, buildingInfo.Dimensions, footprint, a => a == '_'))
yield return tile + position;
}
static IEnumerable<CVec> TilesWhere(string name, CVec dim, char[] footprint, Func<char, bool> cond)
{
if (footprint.Length != dim.X * dim.Y)

View File

@@ -69,6 +69,7 @@
<ItemGroup>
<Compile Include="Activities\VoxelHarvesterDockSequence.cs" />
<Compile Include="SpriteLoaders\TmpTSLoader.cs" />
<Compile Include="Traits\Buildings\LowBridge.cs" />
<Compile Include="Traits\Buildings\TiberianSunRefinery.cs" />
<Compile Include="Traits\Render\WithDockingOverlay.cs" />
<Compile Include="Traits\Render\WithPermanentInjury.cs" />

View File

@@ -0,0 +1,72 @@
#region Copyright & License Information
/*
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
using System.Collections.Generic;
using OpenRA.Graphics;
using OpenRA.Mods.Common.Traits;
using OpenRA.Primitives;
using OpenRA.Traits;
namespace OpenRA.Mods.TS.Traits
{
[Desc("Bridge actor that can't be passed underneath.")]
class LowBridgeInfo : ITraitInfo, Requires<BuildingInfo>
{
public readonly string TerrainType = "Road";
public object Create(ActorInitializer init) { return new LowBridge(init.Self, this); }
}
class LowBridge : INotifyAddedToWorld, INotifyRemovedFromWorld
{
readonly LowBridgeInfo info;
readonly IEnumerable<CPos> cells;
public LowBridge(Actor self, LowBridgeInfo info)
{
this.info = info;
var buildingInfo = self.Info.TraitInfo<BuildingInfo>();
cells = FootprintUtils.PathableTiles(self.Info.Name, buildingInfo, self.Location);
}
void UpdateTerrain(Actor self, byte terrainIndex)
{
foreach (var cell in cells)
self.World.Map.CustomTerrain[cell] = terrainIndex;
var domainIndex = self.World.WorldActor.TraitOrDefault<DomainIndex>();
if (domainIndex != null)
domainIndex.UpdateCells(self.World, cells);
}
void INotifyAddedToWorld.AddedToWorld(Actor self)
{
var tileSet = self.World.Map.Rules.TileSet;
var terrainIndex = tileSet.GetTerrainIndex(info.TerrainType);
UpdateTerrain(self, terrainIndex);
}
void KillUnitsOnBridge(Actor self)
{
foreach (var c in cells)
foreach (var a in self.World.ActorMap.GetActorsAt(c))
if (a.Info.HasTraitInfo<IPositionableInfo>() && !a.Trait<IPositionable>().CanEnterCell(c))
a.Kill(self);
}
void INotifyRemovedFromWorld.RemovedFromWorld(Actor self)
{
UpdateTerrain(self, byte.MaxValue);
KillUnitsOnBridge(self);
}
}
}

View File

@@ -18,6 +18,7 @@ using OpenRA.FileSystem;
using OpenRA.Mods.Common;
using OpenRA.Mods.Common.FileFormats;
using OpenRA.Mods.Common.Traits;
using OpenRA.Traits;
namespace OpenRA.Mods.TS.UtilityCommands
{
@@ -72,40 +73,41 @@ namespace OpenRA.Mods.TS.UtilityCommands
{ 0x47, "palet02" },
{ 0x48, "palet03" },
{ 0x49, "palet04" },
/*
{ 0x4A, "lobrdg01" },
{ 0x4B, "lobrdg02" },
{ 0x4C, "lobrdg03" },
{ 0x4D, "lobrdg04" },
{ 0x4E, "lobrdg05" },
{ 0x4F, "lobrdg06" },
{ 0x50, "lobrdg07" },
{ 0x51, "lobrdg08" },
{ 0x52, "lobrdg09" },
{ 0x53, "lobrdg10" },
{ 0x54, "lobrdg11" },
{ 0x55, "lobrdg12" },
{ 0x56, "lobrdg13" },
{ 0x57, "lobrdg14" },
{ 0x58, "lobrdg15" },
{ 0x59, "lobrdg16" },
{ 0x5A, "lobrdg17" },
{ 0x5B, "lobrdg18" },
{ 0x5C, "lobrdg19" },
{ 0x5D, "lobrdg20" },
{ 0x5E, "lobrdg21" },
{ 0x5F, "lobrdg22" },
{ 0x60, "lobrdg23" },
{ 0x61, "lobrdg24" },
{ 0x62, "lobrdg25" },
{ 0x63, "lobrdg26" },
{ 0x64, "lobrdg27" },
{ 0x65, "lobrdg28" },
{ 0x7A, "lobrdg1" },
{ 0x7B, "lobrdg2" },
{ 0x7C, "lobrdg3" },
{ 0x7D, "lobrdg4" },
*/
{ 0x4A, "lobrdg_b" }, // lobrdg01
{ 0x4B, "lobrdg_b" }, // lobrdg02
{ 0x4C, "lobrdg_b" }, // lobrdg03
{ 0x4D, "lobrdg_b" }, // lobrdg04
{ 0x4E, "lobrdg_b" }, // lobrdg05
{ 0x4F, "lobrdg_b" }, // lobrdg06
{ 0x50, "lobrdg_b" }, // lobrdg07
{ 0x51, "lobrdg_b" }, // lobrdg08
{ 0x52, "lobrdg_b" }, // lobrdg09
{ 0x53, "lobrdg_a" }, // lobrdg10
{ 0x54, "lobrdg_a" }, // lobrdg11
{ 0x55, "lobrdg_a" }, // lobrdg12
{ 0x56, "lobrdg_a" }, // lobrdg13
{ 0x57, "lobrdg_a" }, // lobrdg14
{ 0x58, "lobrdg_a" }, // lobrdg15
{ 0x59, "lobrdg_a" }, // lobrdg16
{ 0x5A, "lobrdg_a" }, // lobrdg17
{ 0x5B, "lobrdg_a" }, // lobrdg18
{ 0x5C, "lobrdg_r_se" }, // lobrdg19
{ 0x5D, "lobrdg_r_se" }, // lobrdg20
{ 0x5E, "lobrdg_r_nw" }, // lobrdg21
{ 0x5F, "lobrdg_r_nw" }, // lobrdg22
{ 0x60, "lobrdg_r_ne" }, // lobrdg23
{ 0x61, "lobrdg_r_ne" }, // lobrdg24
{ 0x62, "lobrdg_r_sw" }, // lobrdg25
{ 0x63, "lobrdg_r_sw" }, // lobrdg26
{ 0x64, "lobrdg_b_d" }, // lobrdg27
{ 0x65, "lobrdg_a_d" }, // lobrdg28
{ 0x7A, "lobrdg_r_se" }, // lobrdg1
{ 0x7B, "lobrdg_r_nw" }, // lobrdg2
{ 0x7C, "lobrdg_r_ne" }, // lobrdg3
{ 0x7D, "lobrdg_r_sw" }, // lobrdg4
{ 0xA7, "veinhole" },
{ 0xA8, "srock01" },
{ 0xA9, "srock02" },
@@ -121,6 +123,93 @@ namespace OpenRA.Mods.TS.UtilityCommands
{ 0xBC, "crate" }
};
static readonly Dictionary<byte, Size> OverlayShapes = new Dictionary<byte, Size>()
{
{ 0x4A, new Size(1, 3) },
{ 0x4B, new Size(1, 3) },
{ 0x4C, new Size(1, 3) },
{ 0x4D, new Size(1, 3) },
{ 0x4E, new Size(1, 3) },
{ 0x4F, new Size(1, 3) },
{ 0x50, new Size(1, 3) },
{ 0x51, new Size(1, 3) },
{ 0x52, new Size(1, 3) },
{ 0x53, new Size(3, 1) },
{ 0x54, new Size(3, 1) },
{ 0x55, new Size(3, 1) },
{ 0x56, new Size(3, 1) },
{ 0x57, new Size(3, 1) },
{ 0x58, new Size(3, 1) },
{ 0x59, new Size(3, 1) },
{ 0x5A, new Size(3, 1) },
{ 0x5B, new Size(3, 1) },
{ 0x5C, new Size(1, 3) },
{ 0x5D, new Size(1, 3) },
{ 0x5E, new Size(1, 3) },
{ 0x5F, new Size(1, 3) },
{ 0x60, new Size(3, 1) },
{ 0x61, new Size(3, 1) },
{ 0x62, new Size(3, 1) },
{ 0x63, new Size(3, 1) },
{ 0x64, new Size(1, 3) },
{ 0x65, new Size(3, 1) },
{ 0x7A, new Size(1, 3) },
{ 0x7B, new Size(1, 3) },
{ 0x7C, new Size(3, 1) },
{ 0x7D, new Size(3, 1) },
};
static readonly Dictionary<byte, DamageState> OverlayToHealth = new Dictionary<byte, DamageState>()
{
// 1,3 bridge tiles
{ 0x4A, DamageState.Undamaged },
{ 0x4B, DamageState.Undamaged },
{ 0x4C, DamageState.Undamaged },
{ 0x4D, DamageState.Undamaged },
{ 0x4E, DamageState.Heavy },
{ 0x4F, DamageState.Heavy },
{ 0x50, DamageState.Heavy },
{ 0x51, DamageState.Critical },
{ 0x52, DamageState.Critical },
// 3,1 bridge tiles
{ 0x53, DamageState.Undamaged },
{ 0x54, DamageState.Undamaged },
{ 0x55, DamageState.Undamaged },
{ 0x56, DamageState.Undamaged },
{ 0x57, DamageState.Heavy },
{ 0x58, DamageState.Heavy },
{ 0x59, DamageState.Heavy },
{ 0x5A, DamageState.Critical },
{ 0x5B, DamageState.Critical },
// Ramps
{ 0x5C, DamageState.Undamaged },
{ 0x5D, DamageState.Heavy },
{ 0x5E, DamageState.Undamaged },
{ 0x5F, DamageState.Heavy },
{ 0x60, DamageState.Undamaged },
{ 0x61, DamageState.Heavy },
{ 0x62, DamageState.Undamaged },
{ 0x63, DamageState.Heavy },
// Ramp duplicates
{ 0x7A, DamageState.Undamaged },
{ 0x7B, DamageState.Undamaged },
{ 0x7C, DamageState.Undamaged },
{ 0x7D, DamageState.Undamaged },
// actually dead, placeholders for resurrection
{ 0x64, DamageState.Undamaged },
{ 0x65, DamageState.Undamaged },
};
static readonly Dictionary<byte, byte[]> ResourceFromOverlay = new Dictionary<byte, byte[]>()
{
// "tib" - Regular Tiberium
@@ -274,6 +363,9 @@ namespace OpenRA.Mods.TS.UtilityCommands
var overlayDataPack = new byte[1 << 18];
UnpackLCW(overlayDataCompressed, overlayDataPack, temp);
var overlayIndex = new CellLayer<int>(map);
overlayIndex.Clear(0xFF);
for (var y = 0; y < fullSize.Y; y++)
{
for (var x = fullSize.X * 2 - 2; x >= 0; x--)
@@ -288,38 +380,79 @@ namespace OpenRA.Mods.TS.UtilityCommands
if (!map.Resources.Contains(uv))
continue;
var idx = rx + 512 * ry;
var overlayType = overlayPack[idx];
if (overlayType == 0xFF)
continue;
string actorType;
if (OverlayToActor.TryGetValue(overlayType, out actorType))
{
var ar = new ActorReference(actorType)
{
new LocationInit(uv.ToCPos(map)),
new OwnerInit("Neutral")
};
map.ActorDefinitions.Add(new MiniYamlNode("Actor" + map.ActorDefinitions.Count, ar.Save()));
continue;
}
var resourceType = ResourceFromOverlay
.Where(kv => kv.Value.Contains(overlayType))
.Select(kv => kv.Key)
.FirstOrDefault();
if (resourceType != 0)
{
map.Resources[uv] = new ResourceTile(resourceType, overlayDataPack[idx]);
continue;
}
Console.WriteLine("{0} unknown overlay {1}", uv, overlayType);
overlayIndex[uv] = rx + 512 * ry;
}
}
foreach (var cell in map.AllCells)
{
var overlayType = overlayPack[overlayIndex[cell]];
if (overlayType == 0xFF)
continue;
string actorType;
if (OverlayToActor.TryGetValue(overlayType, out actorType))
{
var shape = new Size(1, 1);
if (OverlayShapes.TryGetValue(overlayType, out shape))
{
// Only import the top-left cell of multi-celled overlays
var aboveType = overlayPack[overlayIndex[cell - new CVec(1, 0)]];
if (shape.Width > 1 && aboveType != 0xFF)
{
string a;
if (OverlayToActor.TryGetValue(aboveType, out a) && a == actorType)
continue;
}
var leftType = overlayPack[overlayIndex[cell - new CVec(0, 1)]];
if (shape.Height > 1 && leftType != 0xFF)
{
string a;
if (OverlayToActor.TryGetValue(leftType, out a) && a == actorType)
continue;
}
}
var ar = new ActorReference(actorType)
{
new LocationInit(cell),
new OwnerInit("Neutral")
};
DamageState damageState;
if (OverlayToHealth.TryGetValue(overlayType, out damageState))
{
var health = 100;
if (damageState == DamageState.Critical)
health = 25;
else if (damageState == DamageState.Heavy)
health = 50;
else if (damageState == DamageState.Medium)
health = 75;
if (health != 100)
ar.Add(new HealthInit(health));
}
map.ActorDefinitions.Add(new MiniYamlNode("Actor" + map.ActorDefinitions.Count, ar.Save()));
continue;
}
var resourceType = ResourceFromOverlay
.Where(kv => kv.Value.Contains(overlayType))
.Select(kv => kv.Key)
.FirstOrDefault();
if (resourceType != 0)
{
map.Resources[cell] = new ResourceTile(resourceType, overlayDataPack[overlayIndex[cell]]);
continue;
}
Console.WriteLine("{0} unknown overlay {1}", cell, overlayType);
}
}
static void ReadWaypoints(Map map, IniFile file, int2 fullSize)

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 97 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 74 KiB

View File

@@ -10,11 +10,11 @@ Tileset: TEMPERATE
MapSize: 120,310
Bounds: 8,8,105,288
Bounds: 8,8,105,296
Visibility: Lobby
Categories: Conquest, Playable, Original TS Map
Categories: Conquest, Playable, Original FS Map
Players:
PlayerReference@Neutral:
@@ -69,6 +69,46 @@ Players:
Enemies: Creeps
Actors:
Actor0: cabhut
Location: 145,-51
Owner: Neutral
Health: 100
Facing: 96
Actor1: cabhut
Location: 149,-39
Owner: Neutral
Health: 100
Facing: 96
Actor2: cabhut
Location: 110,-64
Owner: Neutral
Health: 100
Facing: 96
Actor3: cabhut
Location: 121,-60
Owner: Neutral
Health: 100
Facing: 96
Actor4: cabhut
Location: 80,-24
Owner: Neutral
Health: 100
Facing: 96
Actor5: cabhut
Location: 84,-10
Owner: Neutral
Health: 100
Facing: 96
Actor6: cabhut
Location: 90,3
Owner: Neutral
Health: 100
Facing: 96
Actor7: cabhut
Location: 107,7
Owner: Neutral
Health: 100
Facing: 96
Actor8: tibtre01
Location: 96,23
Owner: Neutral
@@ -636,235 +676,397 @@ Actors:
Actor196: trock01
Location: 107,-65
Owner: Neutral
Actor197: srock03
Actor197: lobrdg_r_nw
Location: 110,-63
Owner: Neutral
Actor198: srock03
Location: 35,11
Owner: Neutral
Actor198: srock05
Actor199: srock05
Location: 125,-76
Owner: Neutral
Actor199: srock04
Actor200: lobrdg_b
Location: 112,-63
Owner: Neutral
Actor201: lobrdg_b
Location: 111,-63
Owner: Neutral
Actor205: lobrdg_b
Location: 114,-63
Owner: Neutral
Actor206: lobrdg_b
Location: 113,-63
Owner: Neutral
Actor211: lobrdg_b
Location: 116,-63
Owner: Neutral
Actor212: lobrdg_b
Location: 115,-63
Owner: Neutral
Actor217: lobrdg_b
Location: 118,-63
Owner: Neutral
Actor218: lobrdg_b
Location: 117,-63
Owner: Neutral
Actor223: srock04
Location: 124,-67
Owner: Neutral
Actor200: trock02
Actor224: lobrdg_r_se
Location: 120,-63
Owner: Neutral
Actor225: lobrdg_b
Location: 119,-63
Owner: Neutral
Actor234: lobrdg_r_ne
Location: 81,-23
Owner: Neutral
Actor235: lobrdg_a
Location: 81,-22
Owner: Neutral
Actor236: trock02
Location: 62,-4
Owner: Neutral
Actor201: srock04
Actor241: lobrdg_a
Location: 81,-21
Owner: Neutral
Actor242: lobrdg_a
Location: 81,-20
Owner: Neutral
Actor243: srock04
Location: 86,-23
Owner: Neutral
Actor202: srock04
Location: 54,12
Actor248: lobrdg_a
Location: 81,-19
Owner: Neutral
Actor203: srock02
Location: 48,19
Actor249: lobrdg_a
Location: 81,-18
Owner: Neutral
Actor204: srock03
Location: 125,-47
Actor254: lobrdg_a
Location: 81,-17
Owner: Neutral
Actor205: trock01
Location: 78,0
Actor255: lobrdg_a
Location: 81,-16
Owner: Neutral
Actor206: srock01
Location: 85,-4
Actor260: lobrdg_a
Location: 81,-15
Owner: Neutral
Actor207: srock05
Location: 70,11
Owner: Neutral
Actor208: srock01
Location: 57,29
Owner: Neutral
Actor209: srock01
Location: 119,-31
Owner: Neutral
Actor210: trock04
Location: 155,-61
Owner: Neutral
Actor211: trock03
Location: 124,-30
Owner: Neutral
Actor212: srock02
Location: 115,-20
Owner: Neutral
Actor213: srock02
Location: 76,35
Owner: Neutral
Actor214: srock04
Location: 152,-37
Owner: Neutral
Actor215: srock03
Location: 131,-14
Owner: Neutral
Actor216: srock03
Location: 93,24
Owner: Neutral
Actor217: srock04
Location: 106,17
Owner: Neutral
Actor218: trock04
Location: 129,-5
Owner: Neutral
Actor219: srock05
Location: 115,10
Owner: Neutral
Actor220: trock03
Location: 158,-29
Owner: Neutral
Actor221: trock01
Location: 154,-17
Owner: Neutral
Actor222: srock01
Location: 131,10
Owner: Neutral
Actor223: trock01
Location: 109,34
Owner: Neutral
Actor224: trock02
Location: 181,-30
Owner: Neutral
Actor225: trock01
Location: 177,-21
Owner: Neutral
Actor226: srock04
Location: 166,-9
Owner: Neutral
Actor227: trock02
Location: 117,41
Owner: Neutral
Actor228: srock02
Location: 142,25
Owner: Neutral
Actor229: trock03
Location: 121,53
Owner: Neutral
Actor230: srock05
Location: 187,-11
Owner: Neutral
Actor231: srock03
Location: 170,6
Owner: Neutral
Actor232: srock01
Location: 103,79
Owner: Neutral
Actor233: srock02
Location: 165,19
Owner: Neutral
Actor234: trock05
Location: 152,32
Owner: Neutral
Actor235: srock02
Location: 125,62
Owner: Neutral
Actor236: trock04
Location: 135,53
Owner: Neutral
Actor237: trock02
Location: 189,10
Owner: Neutral
Actor238: srock05
Location: 182,19
Owner: Neutral
Actor239: srock01
Location: 160,43
Owner: Neutral
Actor240: srock03
Location: 172,34
Owner: Neutral
Actor241: srock04
Location: 146,62
Owner: Neutral
Actor242: trock02
Location: 140,73
Owner: Neutral
Actor243: srock01
Location: 209,5
Owner: Neutral
Actor244: trock04
Location: 179,36
Owner: Neutral
Actor245: trock02
Location: 185,32
Owner: Neutral
Actor246: trock05
Location: 166,51
Owner: Neutral
Actor247: trock01
Location: 198,27
Owner: Neutral
Actor248: trock03
Location: 184,40
Owner: Neutral
Actor249: srock03
Location: 163,61
Owner: Neutral
Actor250: srock02
Location: 171,56
Owner: Neutral
Actor251: trock04
Location: 141,86
Owner: Neutral
Actor252: srock05
Location: 155,77
Owner: Neutral
Actor253: srock04
Location: 190,46
Owner: Neutral
Actor254: trock02
Location: 167,69
Owner: Neutral
Actor255: trock05
Location: 151,86
Owner: Neutral
Actor256: trock01
Location: 138,98
Owner: Neutral
Actor257: trock03
Location: 155,83
Owner: Neutral
Actor258: trock04
Location: 220,23
Owner: Neutral
Actor259: trock01
Location: 206,37
Owner: Neutral
Actor260: trock04
Location: 183,62
Owner: Neutral
Actor261: trock01
Location: 162,83
Actor261: lobrdg_a
Location: 81,-14
Owner: Neutral
Actor262: srock04
Location: 54,12
Owner: Neutral
Actor263: srock02
Location: 48,19
Owner: Neutral
Actor268: lobrdg_a
Location: 81,-13
Owner: Neutral
Actor269: lobrdg_a
Location: 81,-12
Owner: Neutral
Actor274: lobrdg_a
Location: 81,-11
Owner: Neutral
Actor275: lobrdg_r_sw
Location: 81,-10
Owner: Neutral
Actor279: srock03
Location: 125,-47
Owner: Neutral
Actor280: trock01
Location: 78,0
Owner: Neutral
Actor281: srock01
Location: 85,-4
Owner: Neutral
Actor282: srock05
Location: 70,11
Owner: Neutral
Actor283: srock01
Location: 57,29
Owner: Neutral
Actor284: srock01
Location: 119,-31
Owner: Neutral
Actor285: trock04
Location: 155,-61
Owner: Neutral
Actor286: lobrdg_r_ne
Location: 146,-51
Owner: Neutral
Actor287: trock03
Location: 124,-30
Owner: Neutral
Actor288: srock02
Location: 115,-20
Owner: Neutral
Actor289: lobrdg_r_nw
Location: 91,4
Owner: Neutral
Actor293: lobrdg_a
Location: 146,-50
Owner: Neutral
Actor294: lobrdg_a
Location: 146,-49
Owner: Neutral
Actor295: lobrdg_b
Location: 93,4
Owner: Neutral
Actor296: lobrdg_b
Location: 92,4
Owner: Neutral
Actor304: lobrdg_a
Location: 146,-48
Owner: Neutral
Actor305: lobrdg_a
Location: 146,-47
Owner: Neutral
Actor306: lobrdg_b
Location: 95,4
Owner: Neutral
Actor307: lobrdg_b
Location: 94,4
Owner: Neutral
Actor316: lobrdg_a
Location: 146,-46
Owner: Neutral
Actor317: lobrdg_a
Location: 146,-45
Owner: Neutral
Actor318: lobrdg_b
Location: 97,4
Owner: Neutral
Actor319: lobrdg_b
Location: 96,4
Owner: Neutral
Actor328: lobrdg_a
Location: 146,-44
Owner: Neutral
Actor329: lobrdg_a
Location: 146,-43
Owner: Neutral
Actor330: lobrdg_b
Location: 99,4
Owner: Neutral
Actor331: lobrdg_b
Location: 98,4
Owner: Neutral
Actor340: lobrdg_a
Location: 146,-42
Owner: Neutral
Actor341: lobrdg_a
Location: 146,-41
Owner: Neutral
Actor342: lobrdg_b
Location: 101,4
Owner: Neutral
Actor343: lobrdg_b
Location: 100,4
Owner: Neutral
Actor352: lobrdg_a
Location: 146,-40
Owner: Neutral
Actor353: lobrdg_r_sw
Location: 146,-39
Owner: Neutral
Actor354: lobrdg_b
Location: 103,4
Owner: Neutral
Actor355: lobrdg_b
Location: 102,4
Owner: Neutral
Actor363: lobrdg_b
Location: 105,4
Owner: Neutral
Actor364: lobrdg_b
Location: 104,4
Owner: Neutral
Actor369: lobrdg_r_se
Location: 106,4
Owner: Neutral
Actor374: srock02
Location: 76,35
Owner: Neutral
Actor376: srock04
Location: 152,-37
Owner: Neutral
Actor377: srock03
Location: 131,-14
Owner: Neutral
Actor378: srock03
Location: 93,24
Owner: Neutral
Actor379: srock04
Location: 106,17
Owner: Neutral
Actor380: trock04
Location: 129,-5
Owner: Neutral
Actor381: srock05
Location: 115,10
Owner: Neutral
Actor382: trock03
Location: 158,-29
Owner: Neutral
Actor383: trock01
Location: 154,-17
Owner: Neutral
Actor384: srock01
Location: 131,10
Owner: Neutral
Actor385: trock01
Location: 109,34
Owner: Neutral
Actor386: trock02
Location: 181,-30
Owner: Neutral
Actor387: trock01
Location: 177,-21
Owner: Neutral
Actor388: srock04
Location: 166,-9
Owner: Neutral
Actor389: trock02
Location: 117,41
Owner: Neutral
Actor390: srock02
Location: 142,25
Owner: Neutral
Actor391: trock03
Location: 121,53
Owner: Neutral
Actor392: srock05
Location: 187,-11
Owner: Neutral
Actor393: srock03
Location: 170,6
Owner: Neutral
Actor394: srock01
Location: 103,79
Owner: Neutral
Actor395: srock02
Location: 165,19
Owner: Neutral
Actor396: trock05
Location: 152,32
Owner: Neutral
Actor397: srock02
Location: 125,62
Owner: Neutral
Actor398: trock04
Location: 135,53
Owner: Neutral
Actor399: trock02
Location: 189,10
Owner: Neutral
Actor400: srock05
Location: 182,19
Owner: Neutral
Actor401: srock01
Location: 160,43
Owner: Neutral
Actor402: srock03
Location: 172,34
Owner: Neutral
Actor403: srock04
Location: 146,62
Owner: Neutral
Actor404: trock02
Location: 140,73
Owner: Neutral
Actor405: srock01
Location: 209,5
Owner: Neutral
Actor406: trock04
Location: 179,36
Owner: Neutral
Actor407: trock02
Location: 185,32
Owner: Neutral
Actor408: trock05
Location: 166,51
Owner: Neutral
Actor409: trock01
Location: 198,27
Owner: Neutral
Actor410: trock03
Location: 184,40
Owner: Neutral
Actor411: srock03
Location: 163,61
Owner: Neutral
Actor412: srock02
Location: 171,56
Owner: Neutral
Actor413: trock04
Location: 141,86
Owner: Neutral
Actor414: srock05
Location: 155,77
Owner: Neutral
Actor415: srock04
Location: 190,46
Owner: Neutral
Actor416: trock02
Location: 167,69
Owner: Neutral
Actor417: trock05
Location: 151,86
Owner: Neutral
Actor418: trock01
Location: 138,98
Owner: Neutral
Actor419: trock03
Location: 155,83
Owner: Neutral
Actor420: trock04
Location: 220,23
Owner: Neutral
Actor421: trock01
Location: 206,37
Owner: Neutral
Actor422: trock04
Location: 183,62
Owner: Neutral
Actor423: trock01
Location: 162,83
Owner: Neutral
Actor424: srock04
Location: 193,55
Owner: Neutral
Actor263: srock03
Actor425: srock03
Location: 136,112
Owner: Neutral
Actor264: srock05
Actor426: srock05
Location: 201,50
Owner: Neutral
Actor265: srock02
Actor427: srock02
Location: 222,31
Owner: Neutral
Actor266: trock03
Actor428: trock03
Location: 217,35
Owner: Neutral
Actor267: srock05
Actor429: srock05
Location: 169,88
Owner: Neutral
Actor268: trock03
Actor430: trock03
Location: 178,84
Owner: Neutral
Actor269: srock04
Actor431: srock04
Location: 156,108
Owner: Neutral
Actor270: srock03
Actor432: srock03
Location: 201,69
Owner: Neutral
Actor271: trock05
Actor433: trock05
Location: 205,77
Owner: Neutral
Actor272: trock02
Actor434: trock02
Location: 236,54
Owner: Neutral
Actor273: trock05
Actor435: trock05
Location: 254,39
Owner: Neutral

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 116 KiB

View File

@@ -1206,10 +1206,40 @@ Actors:
Actor340: waypoint
Location: 138,-28
Owner: Neutral
Actor341: crat03
Actor341: lobrdg_r_ne
Location: 160,-137
Owner: Neutral
Actor345: lobrdg_a
Location: 160,-136
Owner: Neutral
Actor346: lobrdg_a
Location: 160,-135
Owner: Neutral
Actor351: lobrdg_a
Location: 160,-134
Owner: Neutral
Actor352: lobrdg_a
Location: 160,-133
Owner: Neutral
Actor357: lobrdg_a
Location: 160,-132
Owner: Neutral
Actor358: lobrdg_a
Location: 160,-131
Owner: Neutral
Actor363: lobrdg_a
Location: 160,-130
Owner: Neutral
Actor364: lobrdg_a
Location: 160,-129
Owner: Neutral
Actor369: lobrdg_r_sw
Location: 160,-128
Owner: Neutral
Actor371: crat03
Location: 158,-61
Owner: Neutral
Actor342: crat01
Actor372: crat01
Location: 123,20
Owner: Neutral
@@ -1217,3 +1247,11 @@ Rules:
World:
GlobalLightingPaletteEffect:
Ambient: 0.75
LOBRDG_A:
Targetable:
TargetTypes: Ground, Building
RequiresForceFire: true
Health:
HP: 1000
Armor:
Type: Concrete

View File

@@ -81,6 +81,7 @@ Rules:
ts|rules/shared-support.yaml
ts|rules/shared-vehicles.yaml
ts|rules/trees.yaml
ts|rules/bridges.yaml
Weapons:
ts|weapons/bombsandgrenades.yaml
@@ -101,6 +102,7 @@ Sequences:
ts|sequences/structures.yaml
ts|sequences/vehicles.yaml
ts|sequences/trees.yaml
ts|sequences/bridges.yaml
VoxelSequences:
ts|sequences/voxels.yaml

View File

@@ -0,0 +1,47 @@
LOBRDG_A:
Inherits: ^LowBridge_A
LOBRDG_A_D:
Inherits: ^LowBridge_A
-RenderSprites:
RenderSpritesEditorOnly:
Palette: terrainalpha
EditorOnlyTooltip:
Name: Dead Bridge
-LowBridge:
LOBRDG_B:
Inherits: ^LowBridge_B
LOBRDG_B_D:
Inherits: ^LowBridge_B
-RenderSprites:
RenderSpritesEditorOnly:
Palette: terrainalpha
EditorOnlyTooltip:
Name: Dead Bridge
-LowBridge:
LOBRDG_R_SE:
Inherits: ^LowBridge_B
EditorOnlyTooltip:
Name: Bridge Ramp
Description: South East
LOBRDG_R_NW:
Inherits: ^LowBridge_B
EditorOnlyTooltip:
Name: Bridge Ramp
Description: North West
LOBRDG_R_NE:
Inherits: ^LowBridge_A
EditorOnlyTooltip:
Name: Bridge Ramp
Description: North East
LOBRDG_R_SW:
Inherits: ^LowBridge_A
EditorOnlyTooltip:
Name: Bridge Ramp
Description: South West

View File

@@ -883,6 +883,36 @@
LineBuildNode:
Connections: 0,-1, 0,1
^LowBridge:
AlwaysVisible:
RenderSprites:
Palette: terraindecoration
WithSpriteBody:
AutoSelectionSize:
AppearsOnRadar:
RadarColorFromTerrain:
Terrain: Road
BodyOrientation:
UseClassicPerspectiveFudge: false
QuantizedFacings: 1
Tooltip:
Name: Bridge
Health:
^LowBridge_A:
Inherits: ^LowBridge
Building:
Footprint: ___
Dimensions: 3, 1
LowBridge:
^LowBridge_B:
Inherits: ^LowBridge
Building:
Footprint: _ _ _
Dimensions: 1, 3
LowBridge:
^HealsOnTiberium:
DamagedByTerrain:
Damage: -2

View File

@@ -109,5 +109,9 @@
BaseName: cloak
BasePalette: player
Alpha: 0.55
PaletteFromPaletteWithAlpha@terrainalpha:
BasePalette: terraindecoration
Name: terrainalpha
Alpha: 0.55
PlayerHighlightPalette:
MenuPaletteEffect:

View File

@@ -0,0 +1,54 @@
^bridge:
Defaults:
ZOffset: -1c511
UseTilesetExtension: true
Start: 1
ZRamp: 1
Offset: 0, 0, 0.5
lobrdg_a:
Inherits: ^bridge
idle: lobrdg10 # lobrdg11, 12, 13
damaged-idle: lobrdg16
sw: lobrdg14
damaged-sw: lobrdg17
ne: lobrdg15
damaged-ne: lobrdg18
lobrdg_a_d:
Inherits: ^bridge
idle: lobrdg10 # actually lobrdg28
lobrdg_b:
Inherits: ^bridge
idle: lobrdg01 # lobrdg02, 03, 04
damaged-idle: lobrdg07
se: lobrdg06
damaged-se: lobrdg09
nw: lobrdg05
damaged-nw: lobrdg08
lobrdg_b_d:
Inherits: ^bridge
idle: lobrdg01 # actually lobrdg27
lobrdg_r_se:
Inherits: ^bridge
idle: lobrdg19
damaged-idle: lobrdg20
lobrdg_r_nw:
Inherits: ^bridge
idle: lobrdg21
damaged-idle: lobrdg22
lobrdg_r_ne:
Inherits: ^bridge
idle: lobrdg23
damaged-idle: lobrdg24
lobrdg_r_sw:
Inherits: ^bridge
idle: lobrdg25
damaged-idle: lobrdg26