Move Interactable and Selectable to Mods.Common.

This commit is contained in:
Paul Chote
2020-02-29 11:29:06 +00:00
committed by atlimit8
parent c5139fb6c2
commit 73a78eadb1
9 changed files with 50 additions and 27 deletions

View File

@@ -123,13 +123,12 @@ namespace OpenRA.Mods.Common.Traits
// Play the selection voice from one of the selected actors
// TODO: This probably should only be considering the newly selected actors
// TODO: Ship this into an INotifySelection trait to remove the engine dependency on Selectable
foreach (var actor in actors)
{
if (actor.Owner != world.LocalPlayer || !actor.IsInWorld)
continue;
var selectable = actor.Info.TraitInfoOrDefault<SelectableInfo>();
var selectable = actor.Info.TraitInfoOrDefault<ISelectableInfo>();
if (selectable == null || !actor.HasVoice(selectable.Voice))
continue;