Implement Issue #26 - Ease migration #33
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes implemented by this PR:
Mod project is recreated using a new mod name:
X2WOTCCommunityPromotionScreen, in line withX2WOTCCommunityHighlander.Mod project now includes NPSBD's script package, copied without any alteration from the current workshop version of the NPSBD. That will allow CPS to read config that was intended for NPSBD, and also make CPS able to do this without having NPSBD as a requirement and without conflicting with it. This means it's technically possible to have CPS and NPSBD active together, although it would be completely redundant, as CPS overrides and disables NPSBD by neutering its UIScreenListener, used by NPSBD to inject its promotion screens. This is done specifically so that people that don't read mod description can use CPS without causing issues.
All of the new functionality added by CPS is moved into a separate script package.
NPSBD uses an
IgnoreClassNamesconfig array so it can be configured not to replace specific promotion screens. CPS will necessarily have to ignore that config, because we always want to replace both regular and hero promotion screens by default, but NPSBD shipsIgnoreClassNamesconfig that would make us not replace the hero promotion screen. It makes sense for NPSBD to do so, since it uses a Mod Class Override to replace that promotion screen anyway.Currently, CPS is set up to always replace both regular and hero promotion screens, but if other contributors deem it necessary, a couple of bool flags can be added to let the CPS user or modmaker disable either regular or hero promotion screen replacement, although the usefulness of such flags is questionable.
CPS uses an Event Listener to replace promotion screens, so it will replace NPSBD's MCO'd hero promotion screen anyway, but CPS ships
XComEngine.inithat may or may not disable NPSBD's MCO, depending on config load order. This is more of a "just in case" things.Since CPS will be incompatible with RPGO by default (either by breaking RPGO promotion screen, or by being broken by RPGO promotion screen), CPS includes
XComGame.iniconfig that will use the Highlander to inform the user that RPGO is incompatible with CPS via popup window.