Remove hardcoded references to HideBibPreviewInit.
This commit is contained in:
committed by
RoosterDragon
parent
b2c3a55c12
commit
2a2bd676a3
@@ -17,7 +17,7 @@ using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
public class BibInfo : ITraitInfo, Requires<BuildingInfo>, IRenderActorPreviewSpritesInfo, Requires<RenderSpritesInfo>
|
||||
public class BibInfo : ITraitInfo, Requires<BuildingInfo>, IRenderActorPreviewSpritesInfo, IActorPreviewInitInfo, Requires<RenderSpritesInfo>
|
||||
{
|
||||
[SequenceReference] public readonly string Sequence = "bib";
|
||||
[PaletteReference] public readonly string Palette = TileSet.TerrainPaletteInternalName;
|
||||
@@ -64,6 +64,11 @@ namespace OpenRA.Mods.Common.Traits
|
||||
yield return new SpriteActorPreview(anim, () => offset, () => -(offset.Y + centerOffset.Y + 512), p, rs.Scale);
|
||||
}
|
||||
}
|
||||
|
||||
IEnumerable<object> IActorPreviewInitInfo.ActorPreviewInits(ActorInfo ai, ActorPreviewType type)
|
||||
{
|
||||
yield return new HideBibPreviewInit();
|
||||
}
|
||||
}
|
||||
|
||||
public class Bib : INotifyAddedToWorld, INotifyRemovedFromWorld
|
||||
@@ -120,7 +125,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
}
|
||||
}
|
||||
|
||||
public class HideBibPreviewInit : IActorInit<bool>, ISuppressInitExport
|
||||
class HideBibPreviewInit : IActorInit<bool>, ISuppressInitExport
|
||||
{
|
||||
[FieldFromYamlKey] readonly bool value = true;
|
||||
public HideBibPreviewInit() { }
|
||||
|
||||
Reference in New Issue
Block a user