Fix broken condition support for InstantlyRepairable.
This commit is contained in:
committed by
Gustas
parent
593c2735ce
commit
fa01c24f23
@@ -87,11 +87,11 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
bool IsValidActor(Actor target)
|
||||
{
|
||||
var instantlyRepairable = target.Info.TraitInfoOrDefault<InstantlyRepairableInfo>();
|
||||
if (instantlyRepairable == null)
|
||||
var instantlyRepairable = target.TraitOrDefault<InstantlyRepairable>();
|
||||
if (instantlyRepairable == null || instantlyRepairable.IsTraitDisabled)
|
||||
return false;
|
||||
|
||||
if (!instantlyRepairable.Types.IsEmpty && !instantlyRepairable.Types.Overlaps(Info.Types))
|
||||
if (!instantlyRepairable.Info.Types.IsEmpty && !instantlyRepairable.Info.Types.Overlaps(Info.Types))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user