production stuff: fixes #54
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,6 +62,8 @@ namespace OpenRa.Game
|
||||
|
||||
Game.controller.orderGenerator = null;
|
||||
Game.worldRenderer.uiOverlay.KillOverlay();
|
||||
|
||||
order.Player.FinishProduction(Rules.UnitCategory[building.Name]);
|
||||
} );
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user