Editor: ActorEditLogic: support for dynamic generation of items in dropdown#21274
Conversation
|
IMO adding a new constructor just for downstream use isn't a great idea - it is likely to break or be removed in the future. If there's a good motivation for per-actor items then we should make the default logic use the same code paths. |
|
Yes, it might seem it's somewhat specific to our mod, but this can be used any other mod. But I agree that there might be a better solution for our specific use case. I'm reposting two more solutions from Discord here: Another solution that I can think of is to create a completely separate Yet another solution: make it possible to create entirely custom |
RoosterDragon
left a comment
There was a problem hiding this comment.
This changes seems reasonable to me. But agree with pchote's comment. Remove the old constructor and have all existing callsites call your new, more general constructor.
bf11378 to
5fc5699
Compare
This PR makes it possible for
EditorActorDropdownto dynamically generate items for particular actor.This requires second constructor for
EditorActorDropdownto keep backward-compatibility with existing traits (which will still use old callbacksGetLabelsandGetValue).