diff --git a/OpenRA.Game/Traits/World/ResourceType.cs b/OpenRA.Game/Traits/World/ResourceType.cs index 79a1e25e92..d2cec0017a 100644 --- a/OpenRA.Game/Traits/World/ResourceType.cs +++ b/OpenRA.Game/Traits/World/ResourceType.cs @@ -1,4 +1,4 @@ -#region Copyright & License Information +#region Copyright & License Information /* * Copyright 2007,2009,2010 Chris Forbes, Robert Pepperell, Matthew Bowra-Dean, Paul Chote, Alli Witheford. * This file is part of OpenRA. @@ -24,7 +24,7 @@ namespace OpenRA.Traits { public class ResourceTypeInfo : ITraitInfo { - public readonly int[] Overlays = { }; + public readonly string[] Overlays = { }; public readonly string[] SpriteNames = { }; public readonly string Palette = "terrain"; diff --git a/OpenRA.Game/Traits/World/WallLoadHook.cs b/OpenRA.Game/Traits/World/WallLoadHook.cs index 806179183e..0d6aaa8c3a 100644 --- a/OpenRA.Game/Traits/World/WallLoadHook.cs +++ b/OpenRA.Game/Traits/World/WallLoadHook.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -7,7 +7,7 @@ namespace OpenRA.Traits { class WallLoadHookInfo : ITraitInfo { - public readonly int[] OverlayIndices = { }; + public readonly string[] OverlayTypes = { }; public readonly string ActorType = "brik"; public object Create(Actor self) { return new WallLoadHook( self, this ); } @@ -27,7 +27,7 @@ namespace OpenRA.Traits for (int y = map.YOffset; y < map.YOffset + map.Height; y++) for (int x = map.XOffset; x < map.XOffset + map.Width; x++) - if (info.OverlayIndices.Contains(w.Map.MapTiles[x, y].overlay)) + if (info.OverlayTypes.Contains(w.Map.MapTiles[x, y].overlay)) w.CreateActor(info.ActorType, new int2(x, y), w.players[0]); // todo: neutral player or null? } } diff --git a/mods/ra/rules.yaml b/mods/ra/rules.yaml index b61de4ae82..6be0b8fb5e 100644 --- a/mods/ra/rules.yaml +++ b/mods/ra/rules.yaml @@ -213,25 +213,25 @@ World: PowerDownButton: WallLoadHook@sbag: ActorType: sbag - OverlayIndices: 0,24 + OverlayTypes: sbag WallLoadHook@cycl: ActorType: cycl - OverlayIndices: 1 + OverlayTypes: cycl WallLoadHook@brik: ActorType: brik - OverlayIndices: 2 + OverlayTypes: brik WallLoadHook@fenc: ActorType: fenc - OverlayIndices: 3 + OverlayTypes: fenc WallLoadHook@wood: ActorType: wood - OverlayIndices: 4 + OverlayTypes: wood WallLoadHook@barb: ActorType: barb - OverlayIndices: 23 + OverlayTypes: barb ResourceLayer: ResourceType@ore: - Overlays: 5,6,7,8 + Overlays: gold01,gold02,gold03,gold04 Palette: terrain SpriteNames: gold01,gold02,gold03,gold04 ValuePerUnit: 25 @@ -239,7 +239,7 @@ World: GrowthInterval: .3 SpreadInterval: .7 ResourceType@gem: - Overlays: 9,10,11,12 + Overlays: gem01,gem02,gem03,gem04 Palette: terrain SpriteNames: gem01,gem02,gem03,gem04 ValuePerUnit: 50