Remove no-op on harvester creation.
This commit is contained in:
@@ -89,7 +89,7 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
readonly ResourceLayer resLayer;
|
readonly ResourceLayer resLayer;
|
||||||
readonly ResourceClaimLayer claimLayer;
|
readonly ResourceClaimLayer claimLayer;
|
||||||
readonly Dictionary<ResourceTypeInfo, int> contents = new Dictionary<ResourceTypeInfo, int>();
|
readonly Dictionary<ResourceTypeInfo, int> contents = new Dictionary<ResourceTypeInfo, int>();
|
||||||
bool idleSmart = true;
|
bool idleSmart = false;
|
||||||
INotifyHarvesterAction[] notifyHarvesterAction;
|
INotifyHarvesterAction[] notifyHarvesterAction;
|
||||||
ConditionManager conditionManager;
|
ConditionManager conditionManager;
|
||||||
int conditionToken = ConditionManager.InvalidConditionToken;
|
int conditionToken = ConditionManager.InvalidConditionToken;
|
||||||
@@ -130,10 +130,8 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
notifyHarvesterAction = self.TraitsImplementing<INotifyHarvesterAction>().ToArray();
|
notifyHarvesterAction = self.TraitsImplementing<INotifyHarvesterAction>().ToArray();
|
||||||
conditionManager = self.TraitOrDefault<ConditionManager>();
|
conditionManager = self.TraitOrDefault<ConditionManager>();
|
||||||
UpdateCondition(self);
|
UpdateCondition(self);
|
||||||
|
|
||||||
// Note: This is queued in a FrameEndTask because otherwise the activity is dropped/overridden while moving out of a factory.
|
|
||||||
if (Info.SearchOnCreation)
|
if (Info.SearchOnCreation)
|
||||||
self.World.AddFrameEndTask(w => self.QueueActivity(new FindResources(self)));
|
idleSmart = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetProcLines(Actor proc)
|
public void SetProcLines(Actor proc)
|
||||||
@@ -280,8 +278,7 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
if (LastSearchFailed)
|
if (LastSearchFailed)
|
||||||
{
|
{
|
||||||
// Wait a bit before searching again.
|
// Wait a bit before searching again.
|
||||||
idleDuration += 1;
|
if (idleDuration++ < Info.WaitDuration)
|
||||||
if (idleDuration <= Info.WaitDuration)
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user