diff --git a/NeosModLoader/AssemblyHider.cs b/NeosModLoader/AssemblyHider.cs index ad4cf77..f08db02 100644 --- a/NeosModLoader/AssemblyHider.cs +++ b/NeosModLoader/AssemblyHider.cs @@ -60,16 +60,16 @@ private static void FindTypePostfix(ref Type? __result) // an assembly was in neither neosAssemblies nor modAssemblies // this implies someone late-loaded an assembly after NML, and it was later used in-game // this is super weird, and probably shouldn't ever happen... but if it does, I want to know about it. - Logger.WarnInternal($"The \"{__result}\" type does not appear to part of Neos or a mod. It is unclear whether it should be hidden or not."); + // since this is an edge case users may want to handle in different ways, the HideLateTypes nml config option allows them to choose. + bool hideLate = ModLoaderConfiguration.Get().HideLateTypes; + Logger.WarnInternal($"The \"{__result}\" type does not appear to part of Neos or a mod. It is unclear whether it should be hidden or not. due to the HideLateTypes config option being {hideLate} it will be {(hideLate ? "Hidden" : "Shown")}"); + if(hideLate) __result = null; } else { - Type type = __result; - Logger.DebugFuncInternal(() => $"Hid type \"{type}\" from Neos"); + Logger.DebugInternal($"Hid type \"{__result}\" from Neos"); + __result = null; // Pretend the type doesn't exist } - - // Pretend the type doesn't exist - __result = null; } } } diff --git a/NeosModLoader/ModLoaderConfiguration.cs b/NeosModLoader/ModLoaderConfiguration.cs index 5c0e254..4c96ca4 100644 --- a/NeosModLoader/ModLoaderConfiguration.cs +++ b/NeosModLoader/ModLoaderConfiguration.cs @@ -63,6 +63,10 @@ internal static ModLoaderConfiguration Get() { _configuration.HideModTypes = false; } + else if ("hidelatetypes".Equals(key) && "false".Equals(value)) + { + _configuration.HideLateTypes = false; + } } } } @@ -101,5 +105,6 @@ private static string GetAssemblyDirectory() public bool AdvertiseVersion { get; private set; } = false; public bool LogConflicts { get; private set; } = true; public bool HideModTypes { get; private set; } = true; + public bool HideLateTypes { get; private set; } = true; } } diff --git a/doc/faq.md b/doc/faq.md index 72f99aa..d3b28e3 100644 --- a/doc/faq.md +++ b/doc/faq.md @@ -27,7 +27,6 @@ Yes, so long as Neos's [Mod & Plugin Policy] is followed. ## Will people know I'm using mods? - By default, NeosModLoader does not do anything identifiable over the network. You will appear to be running the vanilla Neos version to any component that shows your version strings or compatibility hash. -- It is still [technically possible](https://github.com/neos-modding-group/NeosModLoader/issues/64) for a user to determine if you are running NeosModLoader or a specific mod, although this requires a specific LogiX setup. - If you are running other plugins, they will alter your version strings and compatibility hash. - NeosModLoader logs to the same log file Neos uses. If you send your logs to anyone it will be obvious that you are using a plugin. This is intended. - NeosModLoader mods may have effects visible to other users, depending on the mod. diff --git a/doc/modloader_config.md b/doc/modloader_config.md index 6999d2e..5114621 100644 --- a/doc/modloader_config.md +++ b/doc/modloader_config.md @@ -19,3 +19,4 @@ Not all keys are required to be present. Missing keys will use the defaults outl | `unsafe` | `false` | If `true`, the version spoofing safety check is disabled and it will still work even if you have other Neos plugins. DO NOT load plugin components in multiplayer sessions, as it will break things and cause crashes. Plugin components should only be used in your local home or user space. | | `logconflicts` | `true` | If `false`, conflict logging will be disabled. If `true`, potential mod conflicts will be logged. If `debug` is also `true` this will be more verbose. | | `hidemodtypes` | `true` | If `true`, mod-related types will be hidden in-game. If `false`, no types will be hidden, which makes NML detectable in-game. | +| `hidelatetypes` | `true` | If `true` and `hidemodtypes` is `true`, late loaded types will be hidden in-game. If `false`, late loaded types will be shown | \ No newline at end of file