Unhardcode AI's MinimumRefineryCount numbers.
This commit is contained in:
committed by
abcdefg30
parent
d519cabae3
commit
4cc5104fde
@@ -67,6 +67,12 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
[Desc("Increase maintained excess power by ExcessPowerIncrement for every N base buildings.")]
|
[Desc("Increase maintained excess power by ExcessPowerIncrement for every N base buildings.")]
|
||||||
public readonly int ExcessPowerIncreaseThreshold = 1;
|
public readonly int ExcessPowerIncreaseThreshold = 1;
|
||||||
|
|
||||||
|
[Desc("Number of refineries to build before building a barracks.")]
|
||||||
|
public readonly int InititalMinimumRefineryCount = 1;
|
||||||
|
|
||||||
|
[Desc("Number of refineries to build additionally after building a barracks.")]
|
||||||
|
public readonly int AdditionalMinimumRefineryCount = 1;
|
||||||
|
|
||||||
[Desc("Additional delay (in ticks) between structure production checks when there is no active production.",
|
[Desc("Additional delay (in ticks) between structure production checks when there is no active production.",
|
||||||
"StructureProductionRandomBonusDelay is added to this.")]
|
"StructureProductionRandomBonusDelay is added to this.")]
|
||||||
public readonly int StructureProductionInactiveDelay = 125;
|
public readonly int StructureProductionInactiveDelay = 125;
|
||||||
@@ -270,9 +276,7 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
// Unless we have no barracks (higher priority), require a 2nd refinery.
|
return AIUtils.CountBuildingByCommonName(Info.BarracksTypes, player) > 0 ? Info.InititalMinimumRefineryCount + Info.AdditionalMinimumRefineryCount : Info.InititalMinimumRefineryCount;
|
||||||
// TODO: Possibly unhardcode this, at least the targeted minimum of 2 (the fallback can probably stay at 1).
|
|
||||||
return AIUtils.CountBuildingByCommonName(Info.BarracksTypes, player) > 0 ? 2 : 1;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user