Make CHL a dependency, add CHL hooks/fixes to reduce hacks/workarounds in NPSBD
robojumper opened this issue · 7 comments
What's the appropriate solution for substituting New Promotion Screen By Default for UIArmory_Promotion
? Find wherever UIArmory_Promotion
is spawned and add a config option/event hook to use a different class in each place?
There is a single function (HQPres:UIArmory_Promotion
) responsible for spawning the appropriate screen. We should try to use that.
It looks like the better place would be HQPRES:ShowPromotionUI()
. We could either support config options for the UI class to use for each of the normal, hero, and psiops promotion screens, or we could have a simple event that allows mods to override the class used.
I'm guessing one or more events would be the most flexible option.
Additionally, a patch to UIAfterAction:GetPromotionBlueprintTag
will be required in order to correctly place units on the after action screen depending on which promotion screen should be used. The event should thus have a way to yield to UIAfterAction
the correct tag (centered or right side of the screen, according to the pattern Blueprint_AfterAction_(Hero)?Promote(Wounded)? $ i;
).
I think that will require a separate event. Or at least that seems the most straightforward way to do it.
I've updated the pull request to include an override event for the blueprint tag prefixes.