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:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user