Factor silos needed warning to a new trait.

This commit is contained in:
Sean Hunt
2015-12-22 03:33:22 -05:00
parent 23dc6f64ac
commit 8f4ec87b63
9 changed files with 87 additions and 22 deletions

View File

@@ -272,7 +272,7 @@ namespace OpenRA.Mods.Common.AI
}
// Create some head room for resource storage if we really need it
if (playerResources.AlertSilo)
if (playerResources.Resources > 0.8 * playerResources.ResourceCapacity)
{
var silo = GetProducibleBuilding("Silo", buildableThings);
if (silo != null && HasSufficientPowerForActor(silo))