Fix new NewProductionCashThreshold check ignore player cash.
This commit is contained in:
@@ -263,7 +263,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
}
|
||||
|
||||
// Make sure that we can spend as fast as we are earning
|
||||
if (baseBuilder.Info.NewProductionCashThreshold > 0 && playerResources.Resources > baseBuilder.Info.NewProductionCashThreshold)
|
||||
if (baseBuilder.Info.NewProductionCashThreshold > 0 && playerResources.GetCashAndResources() > baseBuilder.Info.NewProductionCashThreshold)
|
||||
{
|
||||
var production = GetProducibleBuilding(baseBuilder.Info.ProductionTypes, buildableThings);
|
||||
if (production != null && HasSufficientPowerForActor(production))
|
||||
@@ -281,7 +281,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
// Only consider building this if there is enough water inside the base perimeter and there are close enough adjacent buildings
|
||||
if (waterState == WaterCheck.EnoughWater && baseBuilder.Info.NewProductionCashThreshold > 0
|
||||
&& playerResources.Resources > baseBuilder.Info.NewProductionCashThreshold
|
||||
&& playerResources.GetCashAndResources() > baseBuilder.Info.NewProductionCashThreshold
|
||||
&& AIUtils.IsAreaAvailable<GivesBuildableArea>(world, player, world.Map, baseBuilder.Info.CheckForWaterRadius, baseBuilder.Info.WaterTerrainTypes))
|
||||
{
|
||||
var navalproduction = GetProducibleBuilding(baseBuilder.Info.NavalProductionTypes, buildableThings);
|
||||
|
||||
Reference in New Issue
Block a user