Add script tags to map editor actor properties.

This commit is contained in:
darkademic
2025-07-20 14:13:45 +01:00
committed by Gustas Kažukauskas
parent 53f959e4bf
commit 0fac8d0d31
5 changed files with 98 additions and 1 deletions

View File

@@ -710,6 +710,21 @@ namespace OpenRA.Mods.Common.Traits
}
}
public class EditorActorTextField : EditorActorOption
{
public readonly Func<EditorActorPreview, string> GetValue;
public readonly Action<EditorActorPreview, string> OnChange;
public EditorActorTextField(string name, int displayOrder,
Func<EditorActorPreview, string> getValue,
Action<EditorActorPreview, string> onChange)
: base(name, displayOrder)
{
GetValue = getValue;
OnChange = onChange;
}
}
[RequireExplicitImplementation]
public interface INotifyEditorPlacementInfo : ITraitInfoInterface
{