production stuff: fixes #54

This commit is contained in:
Chris Forbes
2009-10-31 22:40:26 +13:00
parent cb518ba25d
commit 6cd9d468d3
2 changed files with 19 additions and 12 deletions

View File

@@ -163,7 +163,8 @@ namespace OpenRa.Game
if( mi.Button == MouseButtons.Left && mi.Event == MouseInputEvent.Down )
{
string group = Rules.UnitCategory[ item.Tag ];
if (player.Producing(group) == null)
var producing = player.Producing(group);
if (producing == null)
{
var ui = Rules.UnitInfo[item.Tag];
var time = ui.Cost
@@ -173,6 +174,10 @@ namespace OpenRa.Game
player.BeginProduction(group,
new ProductionItem(item.Tag, (int)time, ui.Cost));
//Build(item);
}
else if (producing.Item == item.Tag)
{
Build(item);
}
}

View File

@@ -62,6 +62,8 @@ namespace OpenRa.Game
Game.controller.orderGenerator = null;
Game.worldRenderer.uiOverlay.KillOverlay();
order.Player.FinishProduction(Rules.UnitCategory[building.Name]);
} );
break;
}