Remove obsolete building lock check from BaseProvider.

This commit is contained in:
Paul Chote
2018-10-06 15:06:29 +01:00
committed by abcdefg30
parent 22bd7fd90b
commit de8fa56461

View File

@@ -27,15 +27,13 @@ namespace OpenRA.Mods.Common.Traits
public override object Create(ActorInitializer init) { return new BaseProvider(init.Self, this); }
}
public class BaseProvider : PausableConditionalTrait<BaseProviderInfo>, ITick, INotifyCreated, IRenderAboveShroudWhenSelected, ISelectionBar
public class BaseProvider : PausableConditionalTrait<BaseProviderInfo>, ITick, IRenderAboveShroudWhenSelected, ISelectionBar
{
readonly DeveloperMode devMode;
readonly Actor self;
readonly bool allyBuildEnabled;
readonly bool buildRadiusEnabled;
Building building;
int total;
int progress;
@@ -50,11 +48,6 @@ namespace OpenRA.Mods.Common.Traits
buildRadiusEnabled = mapBuildRadius != null && mapBuildRadius.BuildRadiusEnabled;
}
void INotifyCreated.Created(Actor self)
{
building = self.TraitOrDefault<Building>();
}
void ITick.Tick(Actor self)
{
if (progress > 0)
@@ -68,7 +61,7 @@ namespace OpenRA.Mods.Common.Traits
public bool Ready()
{
if (IsTraitDisabled || IsTraitPaused || (building != null && building.Locked))
if (IsTraitDisabled || IsTraitPaused)
return false;
return devMode.FastBuild || progress == 0;