Resources stuff works with overlay names, not indices
This commit is contained in:
@@ -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";
|
||||
|
||||
|
||||
@@ -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?
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user