Replace ITraitInfo interface with TraitInfo class.
This commit is contained in:
@@ -19,7 +19,7 @@ using OpenRA.Traits;
|
||||
namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
[Desc("Load a PNG and use its embedded palette.")]
|
||||
class PaletteFromPngInfo : ITraitInfo, IProvidesCursorPaletteInfo
|
||||
class PaletteFromPngInfo : TraitInfo, IProvidesCursorPaletteInfo
|
||||
{
|
||||
[PaletteDefinition]
|
||||
[FieldLoader.Require]
|
||||
@@ -41,7 +41,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
[Desc("Whether this palette is available for cursors.")]
|
||||
public readonly bool CursorPalette = false;
|
||||
|
||||
public object Create(ActorInitializer init) { return new PaletteFromPng(init.World, this); }
|
||||
public override object Create(ActorInitializer init) { return new PaletteFromPng(init.World, this); }
|
||||
|
||||
string IProvidesCursorPaletteInfo.Palette { get { return CursorPalette ? Name : null; } }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user