Add INotifyEditorPlacementInfo interface.

This allows TraitInfos to act when the actor preview is placed
in the editor, returning arbitrary data which the editor stores
and gives back if the preview is removed.
This commit is contained in:
Paul Chote
2020-06-20 11:49:33 +01:00
committed by abcdefg30
parent ac7eda8ca2
commit 3bc5d2d02c
3 changed files with 24 additions and 1 deletions

View File

@@ -590,6 +590,13 @@ namespace OpenRA.Mods.Common.Traits
}
}
[RequireExplicitImplementation]
public interface INotifyEditorPlacementInfo : ITraitInfoInterface
{
object AddedToEditor(EditorActorPreview preview, World editorWorld);
void RemovedFromEditor(EditorActorPreview preview, World editorWorld, object data);
}
[RequireExplicitImplementation]
public interface IPreventMapSpawn
{