Move ValidRelations from Capturable to Captures

To better match weapon definitions
This commit is contained in:
Gustas
2023-09-05 17:55:14 +03:00
committed by Matthias Mailänder
parent 161f4cbdff
commit 5cc59ae3ac
12 changed files with 125 additions and 81 deletions

View File

@@ -130,7 +130,7 @@ namespace OpenRA.Mods.Common.Traits
if (captureManager == null)
return false;
return capturers.Any(tp => captureManager.CanBeTargetedBy(target, tp.Actor, tp.Trait));
return capturers.Any(tp => tp.Trait.CanTarget(captureManager));
})
.OrderByDescending(target => target.GetSellValue())
.Take(maximumCaptureTargetOptions);