Merge pull request #9759 from atlimit8/ActorsHavingTrait
Add ActorsHavingTrait<TTrait>()
This commit is contained in:
@@ -70,7 +70,7 @@ namespace OpenRA.Mods.RA.Traits
|
||||
void RefreshGranted()
|
||||
{
|
||||
Granted = actors.Count > 0 && Launched;
|
||||
GrantedAllies = Owner.World.ActorsWithTrait<GpsWatcher>().Any(p => p.Actor.Owner.IsAlliedWith(Owner) && p.Trait.Granted);
|
||||
GrantedAllies = Owner.World.ActorsHavingTrait<GpsWatcher>(g => g.Granted).Any(p => p.Owner.IsAlliedWith(Owner));
|
||||
|
||||
if (Granted || GrantedAllies)
|
||||
Owner.Shroud.ExploreAll(Owner.World);
|
||||
|
||||
Reference in New Issue
Block a user