Require explicit INotifySelected and INotifySelection
This commit is contained in:
@@ -301,8 +301,11 @@ namespace OpenRA.Traits
|
|||||||
[SuppressMessage("StyleCop.CSharp.NamingRules", "SA1302:InterfaceNamesMustBeginWithI", Justification = "Not a real interface, but more like a tag.")]
|
[SuppressMessage("StyleCop.CSharp.NamingRules", "SA1302:InterfaceNamesMustBeginWithI", Justification = "Not a real interface, but more like a tag.")]
|
||||||
public interface UsesInit<T> : ITraitInfo where T : IActorInit { }
|
public interface UsesInit<T> : ITraitInfo where T : IActorInit { }
|
||||||
|
|
||||||
|
[RequireExplicitImplementation]
|
||||||
public interface INotifySelected { void Selected(Actor self); }
|
public interface INotifySelected { void Selected(Actor self); }
|
||||||
|
[RequireExplicitImplementation]
|
||||||
public interface INotifySelection { void SelectionChanged(); }
|
public interface INotifySelection { void SelectionChanged(); }
|
||||||
|
|
||||||
public interface IWorldLoaded { void WorldLoaded(World w, WorldRenderer wr); }
|
public interface IWorldLoaded { void WorldLoaded(World w, WorldRenderer wr); }
|
||||||
public interface ICreatePlayers { void CreatePlayers(World w); }
|
public interface ICreatePlayers { void CreatePlayers(World w); }
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
paletteWidget = Exts.Lazy(() => Ui.Root.GetOrNull(info.ProductionPaletteWidget) as ProductionPaletteWidget);
|
paletteWidget = Exts.Lazy(() => Ui.Root.GetOrNull(info.ProductionPaletteWidget) as ProductionPaletteWidget);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SelectionChanged()
|
void INotifySelection.SelectionChanged()
|
||||||
{
|
{
|
||||||
// Disable for spectators
|
// Disable for spectators
|
||||||
if (world.LocalPlayer == null)
|
if (world.LocalPlayer == null)
|
||||||
|
|||||||
Reference in New Issue
Block a user