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)
|
bool IsValidActor(Actor target)
|
||||||
{
|
{
|
||||||
var instantlyRepairable = target.Info.TraitInfoOrDefault<InstantlyRepairableInfo>();
|
var instantlyRepairable = target.TraitOrDefault<InstantlyRepairable>();
|
||||||
if (instantlyRepairable == null)
|
if (instantlyRepairable == null || instantlyRepairable.IsTraitDisabled)
|
||||||
return false;
|
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 false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user