Skip to content
This repository has been archived by the owner on Feb 28, 2024. It is now read-only.

added hidelatetypes config and removed old faq #72

Merged
merged 4 commits into from
Aug 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions NeosModLoader/AssemblyHider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
EIA485 marked this conversation as resolved.
Show resolved Hide resolved
}
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
Copy link
Member Author

@EIA485 EIA485 Aug 29, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

swapped to a DebugInternal to avoid needing to store __result to a var

}

// Pretend the type doesn't exist
__result = null;
}
}
}
Expand Down
5 changes: 5 additions & 0 deletions NeosModLoader/ModLoaderConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ internal static ModLoaderConfiguration Get()
{
_configuration.HideModTypes = false;
}
else if ("hidelatetypes".Equals(key) && "false".Equals(value))
{
_configuration.HideLateTypes = false;
}
}
}
}
Expand Down Expand Up @@ -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;
}
}
1 change: 0 additions & 1 deletion doc/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions doc/modloader_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |