Skip to content

Use the shared name-tag module from KSPCommunityPartModules#3197

Draft
djungelorm wants to merge 1 commit into
KSP-KOS:developfrom
djungelorm:nametag-shared-module
Draft

Use the shared name-tag module from KSPCommunityPartModules#3197
djungelorm wants to merge 1 commit into
KSP-KOS:developfrom
djungelorm:nametag-shared-module

Conversation

@djungelorm

@djungelorm djungelorm commented Jul 17, 2026

Copy link
Copy Markdown

Problem. kOS ships its own KOSNameTag part module and KOSNameTagWindow editor 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 by loadedAssemblies order - 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 removes KOSNameTag/KOSNameTagWindow, points the tag suffixes (part:TAG, PARTSTAGGED/PARTSDUBBED/ALLTAGGEDPARTS), the processor Tag property and the terminal/telnet/toolbar labels at ModuleNameTag, adds a build-time reference to KSPCommunityPartModules.dll and a KSPAssemblyDependency on it, and keeps the ModuleManager patch that adds the module to every part. The now-unused Career.CanTagInEditor helpers are dropped.

KSPCommunityPartModules is 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 legacy KOSNameTag module name on load), so part:TAG keeps working.

Draft - blocked on a KSPCommunityPartModules release. The build references KSPCommunityPartModules.dll and declares KSPAssemblyDependency("KSPCommunityPartModules", 0, 5), so this needs the KSPCommunityPartModules release that contains ModuleNameTag (0.5.0). The CKAN metadata also needs a depends on KSPCommunityPartModules.

Companion PRs

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant