Use the shared name-tag module from KSPCommunityPartModules#3197
Draft
djungelorm wants to merge 1 commit into
Draft
Use the shared name-tag module from KSPCommunityPartModules#3197djungelorm wants to merge 1 commit into
djungelorm wants to merge 1 commit into
Conversation
Removes kOS's own KOSNameTag part module and KOSNameTagWindow editor UI and points the tag suffixes (part:TAG, PARTSTAGGED/PARTSDUBBED/ALLTAGGEDPARTS), the processor's Tag property, and the terminal/telnet/toolbar labels at the ModuleNameTag part module now provided by KSPCommunityPartModules. Sharing a single module avoids two mods each defining a KOSNameTag type, which KSP would otherwise resolve by load order. kOS references KSPCommunityPartModules.dll at build time and declares a KSPAssemblyDependency on it, and its ModuleManager patch now adds ModuleNameTag to every part. The now-unused Career.CanTagInEditor helpers are dropped.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem. kOS ships its own
KOSNameTagpart module andKOSNameTagWindoweditor UI. The same module is duplicated in other mods, so when more than one is installed two assemblies define the same simple type name and KSP resolves the type-by-name lookup byloadedAssembliesorder - fragile, and it breaks as soon as anything perturbs load order. This was reported in krpc/krpc#829.Change. The name-tag module moves to the shared KSPCommunityPartModules mod as
ModuleNameTag(see KSPModdingLibs/KSPCommunityPartModules#23), and kOS depends on it instead of shipping its own. This removesKOSNameTag/KOSNameTagWindow, points the tag suffixes (part:TAG,PARTSTAGGED/PARTSDUBBED/ALLTAGGEDPARTS), the processorTagproperty and the terminal/telnet/toolbar labels atModuleNameTag, adds a build-time reference toKSPCommunityPartModules.dlland aKSPAssemblyDependencyon it, and keeps the ModuleManager patch that adds the module to every part. The now-unusedCareer.CanTagInEditorhelpers are dropped.KSPCommunityPartModulesis a new required dependency. The editor name-tag window's click-through and lock-id bugs are fixed in the shared module, and name tags on existing craft and saves are migrated automatically (a Harmony patch in KSPCommunityPartModules rewrites the legacyKOSNameTagmodule name on load), sopart:TAGkeeps working.Draft - blocked on a KSPCommunityPartModules release. The build references
KSPCommunityPartModules.dlland declaresKSPAssemblyDependency("KSPCommunityPartModules", 0, 5), so this needs the KSPCommunityPartModules release that containsModuleNameTag(0.5.0). The CKAN metadata also needs adependson KSPCommunityPartModules.Companion PRs