Bugfix: "Unit production requires a right-click before another unit can be produced."
This commit is contained in:
@@ -252,7 +252,8 @@ namespace OpenRa.Game
|
|||||||
mobile.QueueActivity(new Mobile.MoveTo(unit.Location + new int2(0, 3)));
|
mobile.QueueActivity(new Mobile.MoveTo(unit.Location + new int2(0, 3)));
|
||||||
}
|
}
|
||||||
|
|
||||||
world.Add(unit);
|
world.Add( unit );
|
||||||
|
player.FinishProduction( Rules.UnitCategory[ unit.unitInfo.Name ] );
|
||||||
|
|
||||||
if (producer.traits.Contains<RenderWarFactory>())
|
if (producer.traits.Contains<RenderWarFactory>())
|
||||||
producer.traits.Get<RenderWarFactory>().EjectUnit();
|
producer.traits.Get<RenderWarFactory>().EjectUnit();
|
||||||
|
|||||||
@@ -61,6 +61,11 @@ namespace OpenRa.Game
|
|||||||
var item = production[ category ];
|
var item = production[ category ];
|
||||||
if( item == null ) return;
|
if( item == null ) return;
|
||||||
GiveCash( item.TotalCost - item.RemainingCost ); // refund what's been paid so far.
|
GiveCash( item.TotalCost - item.RemainingCost ); // refund what's been paid so far.
|
||||||
|
FinishProduction( category );
|
||||||
|
}
|
||||||
|
|
||||||
|
public void FinishProduction( string category )
|
||||||
|
{
|
||||||
production[ category ] = null;
|
production[ category ] = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user