diff --git a/OpenRa.FileFormats/Walkability.cs b/OpenRa.FileFormats/Walkability.cs index 5095c49a3a..536517a8b6 100644 --- a/OpenRa.FileFormats/Walkability.cs +++ b/OpenRa.FileFormats/Walkability.cs @@ -9,7 +9,7 @@ namespace OpenRa.FileFormats public int Index; public string Name; public int2 Size; - public bool IsBridge; + public string Bridge; public float HP; public Dictionary TerrainType = new Dictionary(); } @@ -37,7 +37,7 @@ namespace OpenRa.FileFormats p => int.Parse(p.Value)), Name = section.GetValue("Name", null).ToLowerInvariant(), Index = int.Parse(section.Name.Substring(3)), - IsBridge = section.GetValue("bridge", "no") != "no", + Bridge = section.GetValue("bridge", null), HP = float.Parse(section.GetValue("hp", "0")) }; diff --git a/OpenRa.Game/Bridges.cs b/OpenRa.Game/Bridges.cs index 1d9ad28626..2c3d7132ff 100644 --- a/OpenRa.Game/Bridges.cs +++ b/OpenRa.Game/Bridges.cs @@ -50,7 +50,7 @@ namespace OpenRa if (replacedTiles.Any()) { - var a = w.CreateActor("Bridge", new int2(ni, nj), null); + var a = w.CreateActor(template.Bridge, new int2(ni, nj), null); var br = a.traits.Get(); br.SetTiles(w, template, replacedTiles); } @@ -58,7 +58,7 @@ namespace OpenRa static bool IsBridge(World w, ushort t) { - return w.TileSet.walk[t].IsBridge; + return w.TileSet.walk[t].Bridge != null; } } } diff --git a/ra.yaml b/ra.yaml index c41ded2c59..9d675df2b2 100644 --- a/ra.yaml +++ b/ra.yaml @@ -1437,7 +1437,27 @@ DOMF: Image: DOME Fake: -BRIDGE: +BR1: + Category: Building + Selectable: + Bridge: + BelowUnits: + Building: + Footprint: ____ ____ + Dimensions: 4,2 + HP: 1000 + +BR2: + Category: Building + Selectable: + Bridge: + BelowUnits: + Building: + Footprint: ____ ____ + Dimensions: 4,2 + HP: 1000 + +BR3: Category: Building Selectable: Bridge: diff --git a/templates.ini b/templates.ini index 023e01336a..22b7a963d0 100644 --- a/templates.ini +++ b/templates.ini @@ -2491,7 +2491,7 @@ tiletype3=3 Name=BR1A width=4 height=3 -bridge=yes +bridge=br1 hp=1 tiletype1=3 tiletype2=2 @@ -2507,7 +2507,7 @@ tiletype11=3 Name=BR1B width=4 height=3 -bridge=yes +bridge=br1 hp=.5 tiletype1=3 tiletype2=6 @@ -2523,7 +2523,7 @@ tiletype11=3 Name=BR1C width=4 height=3 -bridge=yes +bridge=br1 hp=0 tiletype1=3 tiletype2=3 @@ -2539,7 +2539,7 @@ tiletype11=3 Name=BR2A width=5 height=3 -bridge=yes +bridge=br2 hp=1 tiletype1=3 tiletype2=2 @@ -2556,7 +2556,7 @@ tiletype13=3 Name=BR2B width=5 height=3 -bridge=yes +bridge=br2 hp=.5 tiletype1=3 tiletype2=6 @@ -2573,7 +2573,7 @@ tiletype13=3 Name=BR2C width=5 height=3 -bridge=yes +bridge=br2 hp=0 tiletype1=1 tiletype2=1 @@ -2590,7 +2590,7 @@ tiletype13=3 Name=BR3A width=4 height=2 -bridge=yes +bridge=br3 hp=1 tiletype0=3 tiletype1=2 @@ -2602,7 +2602,7 @@ tiletype7=3 Name=BR3B width=4 height=2 -bridge=yes +bridge=br3 hp=.5 tiletype0=3 tiletype1=2 @@ -2614,7 +2614,7 @@ tiletype7=3 Name=BR3C width=4 height=2 -bridge=yes +bridge=br3 hp=0 tiletype0=3 tiletype1=3 @@ -2626,7 +2626,7 @@ tiletype7=3 Name=BR3D width=4 height=2 -bridge=yes +bridge=br3 hp=0 tiletype0=5 tiletype1=3 @@ -2638,7 +2638,7 @@ tiletype7=5 Name=BR3E width=4 height=2 -bridge=yes +bridge=br3 hp=0 tiletype0=1 tiletype1=1 @@ -2650,7 +2650,7 @@ tiletype7=1 Name=BR3F width=4 height=2 -bridge=yes +bridge=br3 hp=0 tiletype0=1 tiletype1=1 diff --git a/units.ini b/units.ini index 44d99972c5..86cf02629d 100644 --- a/units.ini +++ b/units.ini @@ -253,7 +253,9 @@ DOMF ; pseudo-buildings MINP MINV -BRIDGE +BR1 +BR2 +BR3 ; `Dimensions` is the size of a box that will include the whole building, excluding bib. @@ -534,13 +536,29 @@ Selectable=no Traits=Unit,RenderUnit,BelowUnits,InvisibleToOthers Selectable=no -[Bridge] +[BR1] +Traits=Bridge, BelowUnits, Building +Strength=1000 +Dimensions=4,2 +Footprint=____ ____ +Selectable=yes + +[BR2] Traits=Bridge, BelowUnits, Building Strength=1000 Dimensions=4,2 Footprint=____ ____ Selectable=yes ;; temp hack +[BR3] +Traits=Bridge, BelowUnits, Building +Strength=1000 +Dimensions=4,2 +Footprint=____ ____ +Selectable=yes ;; temp hack + +;; todo: short bridges + [InfantryTypes] DOG E1