Remove RearmBuildings from Aircraft and Minelayer

In favor of using Rearmable trait.
This commit is contained in:
reaperrr
2018-09-27 17:50:35 +02:00
committed by Paul Chote
parent 2485029452
commit 8f1d8a67cc
19 changed files with 191 additions and 69 deletions

View File

@@ -97,15 +97,9 @@ namespace OpenRA.Mods.Common.Traits
return true;
}
// This mostly serves to avoid complicated ReloadAmmoPool look-ups in various other places.
// TODO: Investigate removing this when the Rearm activity is replaced with a condition-based solution.
public bool AutoReloads { get; private set; }
void INotifyCreated.Created(Actor self)
{
conditionManager = self.TraitOrDefault<ConditionManager>();
AutoReloads = self.TraitsImplementing<ReloadAmmoPool>().Any(r => r.Info.AmmoPool == Info.Name && r.Info.RequiresCondition == null);
UpdateCondition(self);
// HACK: Temporarily needed until Rearm activity is gone for good