.Trait[OrDefault]<Trait> => .Info.Traits.Get[OrDefault]<TraitInfo> where applicable
This commit is contained in:
@@ -26,7 +26,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
public bool CanBeTargetedBy(Actor captor, Player owner)
|
||||
{
|
||||
var c = captor.TraitOrDefault<ExternalCaptures>();
|
||||
var c = captor.Info.Traits.GetOrDefault<ExternalCapturesInfo>();
|
||||
if (c == null)
|
||||
return false;
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
if (playerRelationship == Stance.Neutral && !AllowNeutral)
|
||||
return false;
|
||||
|
||||
if (!c.Info.CaptureTypes.Contains(Type))
|
||||
if (!c.CaptureTypes.Contains(Type))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user