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?
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user