ModuleManager: patch in ModuleUPFMEvents
during LAST
pass instead of AFTER
.
#94
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.
Closes #46 as fixed.
Closes #91 as duplicate (might have comments that are different issues?..).
Some mods modify existing nodes/modules in parts, others replace them; sometimes this happens in a chained manner.
Not all parts fail the same way, too, so OhScrap adds different
*FailureModule
s across many files, often with rules on ordering, depending on which compatible mod is addressed.In the touched ModuleManager patch, all parts that already have a
*FailureModule
also get aModuleUPFMEvents
.Before this commit, RemoteTech antennas would get a
RTAntennaFailureModule
after theModuleUPFMEvents
patch has already run (and you don't get a second pass). This was because RemoteTech parts would only get their*FailureModule
after getting aModuleRTAntenna
, different from antennas untouched by RT, which get a*FailureModule
based on having aModuleDataTransmitter
, itself different from a customModuleRTDataTransmitter
...After this commit, parts having a
*FailureModule
are guaranteed to have aModuleUPFMEvents
. We do get a second pass!This commit may also activate warranty and immediately expire it on all parts that were supposed to fail long ago, but were unable to communicate their intent to OhScrap.
More on ModuleManager patch ordering:
https://github.com/sarbian/ModuleManager/wiki/Patch-Ordering