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 WaterCheck { NotChecked, EnoughWater, NotEnoughWater }
|
||||
public enum WaterCheck { NotChecked, EnoughWater, NotEnoughWater, DontCheck }
|
||||
|
||||
public static class AIUtils
|
||||
{
|
||||
|
||||
@@ -51,6 +51,8 @@ namespace OpenRA.Mods.Common.Traits
|
||||
failRetryTicks = baseBuilder.Info.StructureProductionResumeDelay;
|
||||
minimumExcessPower = baseBuilder.Info.MinimumExcessPower;
|
||||
this.resourceTypeIndices = resourceTypeIndices;
|
||||
if (!baseBuilder.Info.NavalProductionTypes.Any())
|
||||
waterState = WaterCheck.DontCheck;
|
||||
}
|
||||
|
||||
public void Tick(IBot bot)
|
||||
|
||||
Reference in New Issue
Block a user