Editor: ActorEditLogic: support for dynamic generation of items in dropdown
This commit is contained in:
@@ -59,8 +59,8 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
// Make sure the no-plug option is always available
|
||||
EditorOptions[""] = EmptyOption;
|
||||
yield return new EditorActorDropdown("Plug", EditorDisplayOrder, EditorOptions,
|
||||
actor =>
|
||||
yield return new EditorActorDropdown("Plug", EditorDisplayOrder, _ => EditorOptions,
|
||||
(actor, _) =>
|
||||
{
|
||||
var init = actor.GetInitOrDefault<PlugInit>(this);
|
||||
return init?.Value ?? "";
|
||||
|
||||
Reference in New Issue
Block a user