Avoid WaterCheck crash in base builder
This commit is contained in:
@@ -18,7 +18,7 @@ namespace OpenRA.Mods.Common
|
|||||||
{
|
{
|
||||||
public enum BuildingType { Building, Defense, Refinery }
|
public enum BuildingType { Building, Defense, Refinery }
|
||||||
|
|
||||||
public enum WaterCheck { NotChecked, EnoughWater, NotEnoughWater }
|
public enum WaterCheck { NotChecked, EnoughWater, NotEnoughWater, DontCheck }
|
||||||
|
|
||||||
public static class AIUtils
|
public static class AIUtils
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -51,6 +51,8 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
failRetryTicks = baseBuilder.Info.StructureProductionResumeDelay;
|
failRetryTicks = baseBuilder.Info.StructureProductionResumeDelay;
|
||||||
minimumExcessPower = baseBuilder.Info.MinimumExcessPower;
|
minimumExcessPower = baseBuilder.Info.MinimumExcessPower;
|
||||||
this.resourceTypeIndices = resourceTypeIndices;
|
this.resourceTypeIndices = resourceTypeIndices;
|
||||||
|
if (!baseBuilder.Info.NavalProductionTypes.Any())
|
||||||
|
waterState = WaterCheck.DontCheck;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Tick(IBot bot)
|
public void Tick(IBot bot)
|
||||||
|
|||||||
Reference in New Issue
Block a user