show potential selections in band-box; FindUnits is still wrong.

This commit is contained in:
Chris Forbes
2009-10-08 22:39:26 +13:00
parent 40969087f0
commit f6eb20bbf8
5 changed files with 43 additions and 33 deletions

View File

@@ -24,7 +24,7 @@ namespace OpenRa.Game
public readonly Dictionary<int, Player> players = new Dictionary<int, Player>();
// temporary, until we remove all the subclasses of Building
public Dictionary<string, Func<int2, Player, Building>> buildingCreation;
public Dictionary<string, Func<int2, Player, PlayerOwned>> buildingCreation;
public Player LocalPlayer { get { return players[localPlayerIndex]; } }
@@ -51,11 +51,12 @@ namespace OpenRa.Game
var buildings = new[] { "fact", "powr", "apwr", "barr", "atek", "stek", "dome" };
buildingCreation = buildings.ToDictionary(s => s,
s => (Func<int2, Player, Building>)(
s => (Func<int2, Player, PlayerOwned>)(
(l, o) => new Building(s, l, o, this)));
buildingCreation.Add("proc", (location, owner) => new Refinery(location, owner, this));
buildingCreation.Add("weap", (location, owner) => new WarFactory(location, owner, this));
buildingCreation.Add("3tnk", (location, owner) => new TurretedUnit("3tnk", location, owner, this));
controller = new Controller(this); // CAREFUL THERES AN UGLY HIDDEN DEPENDENCY HERE STILL
worldRenderer = new WorldRenderer(renderer, world);